From owner-freebsd-threads@FreeBSD.ORG Mon Jan 5 15:30:19 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F003016A4CE for ; Mon, 5 Jan 2004 15:30:19 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99B0B43D67 for ; Mon, 5 Jan 2004 15:30:14 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i05NUEFR044746 for ; Mon, 5 Jan 2004 15:30:14 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i05NUEMd044745; Mon, 5 Jan 2004 15:30:14 -0800 (PST) (envelope-from gnats) Date: Mon, 5 Jan 2004 15:30:14 -0800 (PST) Message-Id: <200401052330.i05NUEMd044745@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Earl Chew Subject: Re: misc/24641: pthread_rwlock_rdlock can deadlock X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Earl Chew List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2004 23:30:20 -0000 The following reply was made to PR misc/24641; it has been noted by GNATS. From: Earl Chew To: aspiesrule@mcleodusa.net Cc: freebsd-gnats-submit@freebsd.org Subject: Re: misc/24641: pthread_rwlock_rdlock can deadlock Date: Mon, 05 Jan 2004 15:26:25 -0800 aspiesrule@mcleodusa.net wrote: > Oops, running your new program yields an assertion failure at line 37 and a > core dump. The output is as follows: > > --snip-- > Attempt to acquire read lock first > Acquired read lock first > Attempt to acquire write lock > Attempt to acquire read lock second > assertion "pthread_rwlock_rdlock(&rwlock1) == 0" failed: file "test.c", line > 37 > Aborted (core dumped) Right. The test is (correctly) showing an inadequacy in the rwlock implementation. I refer you to the original bug report: http://www.freebsd.org/cgi/query-pr.cgi?pr=24641 and the referenced articles: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=slrn87nusa.rsv.kaz%40ashi.FootPrints.net http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=38828D22.7A98%40LambdaCS.com Earl