panic: Lock so_rcv_sx not exclusively locked

Robert Watson rwatson at
Thu Jan 31 00:25:21 PST 2008

On Wed, 30 Jan 2008, Jos Backus wrote:

> On Wed, Jan 30, 2008 at 01:45:08PM +0000, Robert Watson wrote:
> [snip]
>> Thanks, looks like that's enough for now.  I've attached a patch, could you 
>> let me know if it works?  There turned out to be a number of issues here, 
>> not least the possibility of an inter-thread deadlock if the blocked socket 
>> read was never going to return, so if you could watch out for processes 
>> failing to exit, not just panics, that would be good.  I've CC'd Randall as 
>> this change touches SCTP in a few places.
> After applying this patch I can no longer panic the system by killing 
> npviewer.bin. Firefox feels more responsive, too.
> Thanks, Robert!

No problem.  I've committed to HEAD and will look at an MFC, possibly for 7.0. 
I need to get Randall to OK the sctp tweaks first though (CC'd).

Improved responsiveness is slightly surprising, but not impossible if Firefox 
expects shutdown() to return quickly after canceling a connection, and 
therefore does it from a thread used for interactive stuff such as rendering. 
Previously, shutdown() might block waiting on an outstanding I/O to complete 
or time out, so if it was called from an interactive thread it might lead to 
apparent non-responsiveness.


Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the freebsd-current mailing list