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]

Problem with pthreads and signaling, behavior broken...

Hi all,

I've been testing some of the new snapshot dlls etc made
recently (last 1.5 weeks) due to the increase of activity
in the areas of threads and signaling and I think some
of the Pthread and signaling behavior has been broken.

A pthread test case that I had written before, displayed
memory leak issues and win32 handle issue, which later
were fixed has begun to fail again. The snapshot dll from
Nov 19th had fixed all the issues that were being brought
about by the ThreadTest.

However now I see 2 new problems arising.

1.) As the ThreadTest is running, the number of win32 handles the cygwin1.dll
is making does not decrease and is continually increasing until such
a point where the OS runs of handles and either the program crashes
or the OS itself stalls. This can be seen around 100k threads being

2.) This is to do with signal handling. The application can catch SIGINT
   (ie: ctrl+c) in order to allow the user to have a graceful exit out
   of the program. After about the 1000th thread this functionality doesn't
   work anymore. You press ctrl+c but for some reason the signal handler
   doesn't return to the thread that is running, meanwhile the number of
   handles is still incrementing.

I've tried compiling with optimizations on and off and o1 o2 and o3 and also with debug modes on and off nothing seems change. As I've explained before I've compiled and run the ThreadTest on OpenBSD, FreeBSD and RHL and it runs fine on those systems.

On a good note, the memory leaks from before haven't snuck back in.

Ok here are the system details and dll details:

1.) System:
   PII 2.4, 512Mb RAM, Win2k, SP4
   PII 2.4, 512Mb RAM, Win2k, SP3
   PII 2.4, 512Mb RAM, WinXP, SP4

2.) current full cygwin install with gcc 3.3.3-1

3.) All snapshot dlls from 27Nov - 6Dec demonstrate this problem.

4.) snapshot dll from the 19th of Nov seems to be the last dll
   i have that doesn't have this problem.

I've uploaded the test and the dll from Nov 19th to my server if a few
people can download them and confirm my results it would be great, btw i
used TaskInfo to view the win32 handles and memory usage.

ThreadTest source code: 19th Nov SN-dll:


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.

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]