Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2007 12:33:38 -0500
From:      "Stephane E. Potvin" <sepotvin@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        brooks@FreeBSD.org, current@FreeBSD.org
Subject:   Re: HEADS UP: UNIX domain socket locking changes merged to CVS HEAD
Message-ID:  <45E70E72.60009@FreeBSD.org>
In-Reply-To: <20070228234754.Q13593@fledge.watson.org>
References:  <20070226204916.C56223@fledge.watson.org> <45E5D589.3080202@FreeBSD.org> <20070228234754.Q13593@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E70E72.60009>