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
 I refer you to the original bug report:
 and the referenced articles:

More information about the freebsd-threads mailing list