delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/10/01/13:41:43

X-Recipient: archive-cygwin AT delorie DOT 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 AT securityevaluators DOT com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 1.5.24-2: pthreads rwlock recursive acquisition failing
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019