This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Which thread caused dump?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Steffen Schumacher <STEFF at tdc dot dk>
- Cc: gdb at sourceware dot org
- Date: Tue, 29 Aug 2006 08:39:02 -0400
- Subject: Re: Which thread caused dump?
- References: <1156847520.29200.ezmlm@sourceware.org> <2B1831460E7C6B46A19066A0E9147A4E0C173F@VESTMB403A.tdk.dk>
On Tue, Aug 29, 2006 at 12:42:40PM +0200, Steffen Schumacher wrote:
> Hi!
>
> I have a multithreaded program which coredumps after ~20 hours of
> running.
> Is it possible to see which thread caused the crash?
> Usually I use thr x and bt for seeing if some exception was thrown, but
> I have a case where no thread is throwing any exceptions.
>
> I've enclosed output from the actual core dump.. any other cmd's I
> should know of?
> Any help on discovering why it is crashing would be greatly
> appreciated..
Generally the first thread that comes up is the one that crashed.
> Program terminated with signal 11, Segmentation fault.
> * 10 LWP 100080 0x2834f4ab in pthread_testcancel () from
> /usr/lib/libpthread.so.2
> (gdb) thr 10
> [Switching to thread 10 (LWP 100080)]#0 0x2834f46b in
> pthread_testcancel () from /usr/lib/libpthread.so.2
> (gdb) bt
> #0 0x2834f46b in pthread_testcancel () from /usr/lib/libpthread.so.2
> #1 0x28347e3c in pthread_mutexattr_init () from
> /usr/lib/libpthread.so.2
> #2 0x284fa450 in ?? ()
> (gdb)
>
So probably right there.
--
Daniel Jacobowitz
CodeSourcery