This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
-- 
Can't think of a witty .sigline today....


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]