This is the mail archive of the cygwin 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 pthead.h - child's thread ending, causes main program to exit


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/


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