misc/24641: pthread_rwlock_rdlock can deadlock

Earl Chew earl_chew at agilent.com
Mon Jan 5 15:30:20 PST 2004


The following reply was made to PR misc/24641; it has been noted by GNATS.

From: Earl Chew <earl_chew at agilent.com>
To: aspiesrule at mcleodusa.net
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: misc/24641: pthread_rwlock_rdlock can deadlock
Date: Mon, 05 Jan 2004 15:26:25 -0800

 aspiesrule at 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
 


More information about the freebsd-threads mailing list