Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2011 16:37:19 +0000
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        FreeBSD-Current Current <freebsd-current@freebsd.org>
Subject:   Re: mtx_lock() of destroyed mutex on NFS
Message-ID:  <3C2E7852-5063-4955-BF62-AEB111B1425C@lists.zabbadoz.net>
In-Reply-To: <314699164.103050.1319040049406.JavaMail.root@erie.cs.uoguelph.ca>
References:  <314699164.103050.1319040049406.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19. Oct 2011, at 16:00 , Rick Macklem wrote:

> Bjoern A. Zeeb wrote:
>> Hi,
>> 
>> as a result of a make buildkernel && make installkernel && reboot all
>> on NFS I got this with a HEAD SVN source at r226465. I cannot dump
>> unfortunately and it seems I just killed the obj tree for this kernel
>> though it should be very close.
>> 
>> Oct 18 10:03:22 lion3 reboot: rebooted by test
>> Oct 18 10:03:22 panic: mtx_lock() of destroyed mutex @
>> /zoo/bz/HEAD.svn/sys/kern/uipc_socket.c:1022
>> cpuid = 2
>> ...
>> 
> This seems to have been caused by a premature soclose(), which in
> turn implies a premature call to it from clnt_dg_destroy(). The only
> race I can see is that the socket buffer lock is used to protect
> checking for so_upcall being set (which it then uses to decide if
> a new cs_XXX structure is needed), but this lock isn't held when
> it decides to throw it away and close the socket.
> 
> You could try the attached patch, which I've tested minimally.
> (I think it fixes this race.)

Great, will do.  I couldn't reproduce it every time but I have hit
it again the last 24 hours.

Thanks a lot!

/bz

-- 
Bjoern A. Zeeb                                 You have to have visions!
         Stop bit received. Insert coin for new address family.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C2E7852-5063-4955-BF62-AEB111B1425C>