Mail Archives: cygwin/2005/07/22/11:47:40
> ---------- Forwarded message ----------
> From: "Dave Korn" <dave DOT korn AT artimi DOT com>
> To: <cygwin AT cygwin DOT com>
> Date: Fri, 22 Jul 2005 11:47:40 +0100
> Subject: RE: Known issues with Pthreads in 1.5.18?
> ----Original Message----
> >From: Fred Smith
> >Sent: 22 July 2005 01:03
>
> > I can't determine yet if I've got a subtle bug (quite possible) or if
> > there's something whacko in cygwin. I'm hoping some of you can
> > enlighten me as to the state of cygwin's pthreads functions.
> >
> > The program has a particular mutex that fails the SECOND time it is
> > unlocked. I'm at home right now so I don't have the particular error
> > code.
> >
> > It acts like the stack is wedged, because if I put an extra variable
> > on the stack in the routine that calls the pthread unlock function the
> > problem goes away, but so far it has eluded me.
> >
> > I'll keep looking for it, but thought to inquire of any known issues
> > in the pthreads implementation.
>
>
> The default type of mutex just got changed, from error checking, to
> normal. If your code is setting up a default mutex and then one thread
> attempts to recursively take the mutex, it will now deadlock where before it
> would have succeeded. Or it may be possible your code is unlocking the
> mutex more times than it takes it, which would probably show the same
> symptom. See the thread starting at:
>
> http://www.cygwin.com/ml/cygwin/2005-05/msg01298.html
>
> and the announcment for 1.5.18
>
> http://www.cygwin.com/ml/cygwin-announce/2005-07/msg00001.html
>
> in particular the line that says
>
> "cgf: Change default value for PTHREAD_MUTEX_DEFAULT to PTHREAD_NORMAL."
>
>
> cheers,
> DaveK
Thanks for the reply, Dave!
The error I'm getting back from pthread_mutex_unlock() is 1,
"operation not permitted". I suppose this would be a valid response to
attempting to unlock a mutex that isn't locked. I'm pretty sure the
code isn't calling the unlock an extra time (else I think I'd be
having trouble on other platforms) but I'll go take (yet) another look
into that possibility.
I'll also verify the initialization values I'm using, too.
thanks again!
Fred
--
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 -