From owner-freebsd-threads@FreeBSD.ORG Sun Jul 5 15:40:02 2009 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1F531065672 for ; Sun, 5 Jul 2009 15:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AFF5E8FC1A for ; Sun, 5 Jul 2009 15:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n65Fe2TA052139 for ; Sun, 5 Jul 2009 15:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n65Fe2R1052138; Sun, 5 Jul 2009 15:40:02 GMT (envelope-from gnats) Date: Sun, 5 Jul 2009 15:40:02 GMT Message-Id: <200907051540.n65Fe2R1052138@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Rink Springer Cc: Subject: Re: threads/136345: Recursive read rwlocks in thread A cause deadlock with write lock in thread B X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rink Springer List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 15:40:03 -0000 The following reply was made to PR threads/136345; it has been noted by GNATS. From: Rink Springer To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: Re: threads/136345: Recursive read rwlocks in thread A cause deadlock with write lock in thread B Date: Sun, 5 Jul 2009 17:37:40 +0200 On Sun, Jul 05, 2009 at 03:20:02PM +0000, Attilio Rao wrote: > I think that rdlock_count in libthr is not updated properly. > Can you test the following patch: > http://www.freebsd.org/~attilio/libthr.diff This seems to resolve the issue; it seems to solve the deadlock the attached test program has. I'll retry it with my real workload and see if this fixes the problem - will let you know. Thanks! -- Rink P.W. Springer - http://rink.nu "Doom, gloom and despair. I like it!" - Tiresias