Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [203.94.167.77] X-Originating-Email: [arashp AT hotmail DOT com] X-Sender: arashp AT hotmail DOT com From: "Arash Partow" To: cygwin AT cygwin DOT com Subject: Problem with pthreads and signaling, behavior broken... Date: Mon, 08 Dec 2003 03:40:42 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 08 Dec 2003 03:40:43.0008 (UTC) FILETIME=[0E7AA800:01C3BD3D] 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 completed. 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: http://www.partow.net/downloads/ThreadTest.zip 19th Nov SN-dll: http://www.partow.net/downloads/cygwin1-20031119.dll.bz2 Regards 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. http://www.partow.net _________________________________________________________________ E-mail just got a whole lot better. New ninemsn Premium. Click here http://ninemsn.com.au/premium/landing.asp -- 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/