From owner-freebsd-current@FreeBSD.ORG Thu Mar 1 17:33:53 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0925E16A402; Thu, 1 Mar 2007 17:33:53 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 676B013C4A7; Thu, 1 Mar 2007 17:33:52 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from [10.0.0.136] ([67.70.237.74]) by VL-MH-MR001.ip.videotron.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTPA id <0JE800CHVJG2PKT1@VL-MH-MR001.ip.videotron.ca>; Thu, 01 Mar 2007 12:33:51 -0500 (EST) Date: Thu, 01 Mar 2007 12:33:38 -0500 From: "Stephane E. Potvin" In-reply-to: <20070228234754.Q13593@fledge.watson.org> To: Robert Watson Message-id: <45E70E72.60009@FreeBSD.org> Organization: FreeBSD Project MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.94.2.0 References: <20070226204916.C56223@fledge.watson.org> <45E5D589.3080202@FreeBSD.org> <20070228234754.Q13593@fledge.watson.org> User-Agent: Thunderbird 1.5.0.9 (X11/20070127) Cc: brooks@FreeBSD.org, current@FreeBSD.org Subject: Re: HEADS UP: UNIX domain socket locking changes merged to CVS HEAD 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, 01 Mar 2007 17:33:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert Watson wrote: > > On Wed, 28 Feb 2007, Stephane E. Potvin wrote: > >>> Please let me know if you experience any problems with UNIX domain >>> sockets -- these changes will affect applications that consume UNIX >>> domain sockets directly, like MySQL and Postfix, as well as consumers >>> of POSIX fifos, which are implemented using UNIX domain sockets >>> in-kernel. >> >> Since this commit, I've been observing frequent deadlocks on my >> laptop, mostly when starting-up gnome. It usually takes less than 5 to >> 10 minutes for the deadlock to happens. >> >> I was able to drop into ddb once and got the following information: >> (there might be some typos as I had to copy this manually) > > Thanks, this information was very helpful, and indeed the problem is as > you surmise: cases existed where more than one unpcb lock was acquired > at a time when holding only a global read lock, not a global write > lock. I guess these slipped through from an earlier version of the > patch. In any case, could you try the patch at: > > http://www.watson.org/~robert/freebsd/netperf/20070228-unp_deadlock.diff > > This eliminates overlapped unpcb lock acquisition in both datagram and > stream cases, and with any luck will fix the deadlock problem. It may > also marginally improve performance by further reducing unpcb lock > contention. > The attached patch fixes the deadlock that I was experiencing. The laptop used to deadlock within a few minutes and I've been running with the patch for around 3 hours so far without problems. Thanks a lot for the quick fix. Regards Steph -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF5w5xmdOXtTCX/nsRAqpkAJ0RVBn/q5ZFk3AYO1mXJCOQie4HygCfVWjX Ut3ruvvdZjCczPqSNHjA6Mo= =qKEm -----END PGP SIGNATURE-----