1.5.24-2: pthreads rwlock recursive acquisition failing (with cygcheck.out)

Gabriel Landau gabe@securityevaluators.com
Thu Oct 4 15:03:00 GMT 2007


Hello,

I'm trying to develop a program that uses pthreads and needs to 
recursively acquire RO rwlocks and RW rwlocks.  I'm not upgrading or 
trying to acquire an RO lock after an RW lock has been acquired, yet 
pthread_rwlock_rdlock() keeps returning EDEADLK.  I have tested the 
attached test program (includes at top modified slightly) on Ubuntu 
Linux and it has no RO (shared) rwlock recursion problems.

I'm using Windows Vista (copied cygwin dir from a valid XP install), but 
my friend can reproduce the problem on his Windows XP machine just as 
reliably.

I've attached an application that demonstrates this bug.  You can build 
it with: gcc -o cygwin-pthread-bug.exe cygwin-pthread-bug.c

Much less importantly, pthread_rwlockattr_setpshared(&lkattr, 
PTHREAD_PROCESS_SHARED) is failing as well.  See the attached 
cygwin-pthread-bug.c for details.

Please help!  Thanks for your time.

- Gabriel Landau
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20071004/fc5e5d06/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin-pthread-bug.c
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20071004/fc5e5d06/attachment.c>


More information about the Cygwin-developers mailing list