From owner-freebsd-current@FreeBSD.ORG Thu Jan 31 08:25:21 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 405ED16A417; Thu, 31 Jan 2008 08:25:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 068B413C43E; Thu, 31 Jan 2008 08:25:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id ABD0746DDD; Thu, 31 Jan 2008 03:25:20 -0500 (EST) Date: Thu, 31 Jan 2008 08:25:20 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jos Backus In-Reply-To: <20080131004235.GA1186@lizzy.catnook.local> Message-ID: <20080131082244.A32808@fledge.watson.org> References: <20080128180840.GA9582@lizzy.catnook.local> <20080128204730.I56811@fledge.watson.org> <20080129015916.GA5413@lizzy.catnook.local> <20080130134307.P41201@fledge.watson.org> <20080131004235.GA1186@lizzy.catnook.local> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: rrs@FreeBSD.org, freebsd-current@freebsd.org, bz@FreeBSD.org Subject: Re: panic: Lock so_rcv_sx not exclusively locked X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2008 08:25:21 -0000 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. Thanks, Robert N M Watson Computer Laboratory University of Cambridge