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 Date: Thu, 28 Oct 2004 09:50:56 -0500 From: Brian Ford Reply-To: cygwin AT cygwin DOT com To: jdeifik cc: cygwin AT cygwin DOT com Subject: Re: Problem with pthead.h - child's thread ending, causes main program to exit In-Reply-To: <6.1.2.0.0.20041027164547.01cffec0@localhost> Message-ID: References: <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20041027164547 DOT 01cffec0 AT localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes On Wed, 27 Oct 2004, jdeifik wrote: > I have a somewhat complex program that I rewrote to use pthreads. > It uses threads in a very simple fashion. > > Though I don't have much experience with pthreads, the program works fine > using mandrake 10.0 linux. > > Using cygwin and windows xp sp2, when one thread reaches the end > of execution, the entire program exits. And you know this is really what happens because...? Or, is it this bug? http://cygwin.com/ml/cygwin/2004-09/msg00257.html If so, then please try a snapshot: http://cygwin.com/snapshots/ > When I run the program with gdb, I get really weird segmentation faults, > for example: http://www.cygwin.com/ml/cygwin/2004-10/msg01033.html > Program received signal SIGSEGV, Segmentation fault. > [Switching to thread 3280.0xcdc] > 0x610b479d in random () from /usr/bin/cygwin1.dll [snip] > The details of the backtrace vary a bit, but always start off in random in > cygwin1.dll You can not trust the back trace from a stripped cygwin1.dll. You must compile your own with debugging symbols if you want to see a valid trace into it. (Hint: random is NOT where your problem is) > I know others have problems with pthreads locking up main, but this seems > different to me. You should quote a reference here as I am not aware of any such issue. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... -- 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/