1.5.24-2: pthreads rwlock recursive acquisition failing

Gabriel Landau gabe@securityevaluators.com
Mon Oct 1 17:45:00 GMT 2007


Forgot attachments.  Here they are, sorry.

- Gabriel Landau

Gabriel Landau wrote:
> 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 recursion problem.
> 
> 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: cygwin-pthread-bug.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20071001/1100b3b5/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20071001/1100b3b5/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list