This is the mail archive of the 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: Problem with pthreads and signaling, behavior broken...

Hi Chris,

The ThreadTest was used to demonstrate a deficiency in cygwin's pthreads
implementation, and in doing so was successful in finding 4 serious
problems that ranged from memory leaks, application crashes to improper
handling of context switches in the thread pools. So continue to be
mystified as much as you like. :) But if you really want to know, all it
tests, are simple cases of thread creation and thread cleanup, and also
mutexes and also expanding thread stack size and also calling of methods
outside of threads, all the while looking for memory leaks, threads not
being cleaned up properly and non-defined pthreads behavior.

Now some more on the ThreadTest. The ThreadTest as is with no changes to the source code works "FINE" with cygwin1.dll (snapshot) from 19th Nov and I think even a couple prior to that. The ThreadTest works fine as is with no changes on BSDs(Open and Free), RHL, and Solaris 9. The source code affecting functionality in the ThreadTest itself should not need to be changed. (btw IMO adding debug strings is ok)

I basically tried to run the modified version of ThreadTestPrototype.cpp, and new makefile it worked fine, I began removing the delays and subsequently recompiling, it worked fine, then I started modifying the for-loop signatures to get them back to the way they were before you had modified them in order to see what actual modification(s) was making the ThreadTest now work.

In conclusion I was able to replicate the problem "again" by simply
removing the check for the keepRunning variable in the for-loop signature
on line 205. (I've attached the source code)

In a way the problem still remains, if you like send me the dll that "you"
use during your runs and I'll see if I can get it working on my systems.
It would be really nice if we could get this small bug out of the way.


Arash Partow

__________________________________________________ Be one who knows what they don't know, Instead of being one who knows not what they don't know, Thinking they know everything about all things.

I must admit that I'm mystified as to what this test is trying to accomplish
but I've modified it so that it will terminate more quickly when a
signal is delivered, rather than continuing to create threads after
CTRL-C is pressed and added some more debugging output.

I've attached the modified source to this message.  I also modified the
Makefile so that it created ThreadTest.exe by default.


E-mail just got a whole lot better. New ninemsn Premium. Click here

-- Unsubscribe info: Problem reports: Documentation: FAQ:

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