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 Message-Id: <6.1.2.0.0.20041028090536.01e9c470@localhost> X-Sender: jdeifik AT weasel DOT com Date: Thu, 28 Oct 2004 09:11:56 -0700 To: cygwin AT cygwin DOT com From: jdeifik Subject: Re: Problem with pthead.h - child's thread ending, causes main program to exit In-Reply-To: References: <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20041027164547 DOT 01cffec0 AT localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; x-avg-checked=avg-ok-55024AC5; boundary="=======1CB56080=======" X-IsSubscribed: yes --=======1CB56080======= Content-Type: text/plain; x-avg-checked=avg-ok-55024AC5; charset=us-ascii; format=flowed Content-Transfer-Encoding: 8bit >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 Doesn't seem likely, as I never call pthread_join. Perhaps it is called implicitly as a thread exits though. >If so, then please try a snapshot: > >http://cygwin.com/snapshots/ The new cygwin1.dll fixed my problem. Everything seems fine now. > > 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) Ok, then perhaps a non-stripped cygwin1.dll should be supplied by default so gdb can see what is happening. > > 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. there was a thread this week, From: Ben Lavender To: cygwin at cygwin dot com Date: Thu, 21 Oct 2004 15:43:49 +0200 Subject: RE: problem with pthread.h - child thread's ending locks up main thread Since this was from oct 21, and my email was from oct 27, and I quoted the subject, I didn't think I needed more context. Thanks, Jeff Deifik --=======1CB56080======= Content-Type: text/plain; charset=us-ascii -- 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/ --=======1CB56080=======--