X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <47013115.1050609@securityevaluators.com>
Date: Mon, 01 Oct 2007 13:40:37 -0400
From: Gabriel Landau <gabe@securityevaluators.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: 1.5.24-2: pthreads rwlock recursive acquisition failing
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

--
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/

