Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Rich Rattanni" <rattanni@gmail.com>
To: gdb@sourceware.org
Subject: Debugging glibc crashes with GDB
Date: Sun, 11 Mar 2007 18:04:00 -0000	[thread overview]
Message-ID: <3187bd480703111104r46b15863g2d59714f5cc3793e@mail.gmail.com> (raw)

Below you will find the GDB output related to my question.  My problem
is that when I try to debug a program after receiving a glibc abort
error (MALLOC_CHECK = 2) I cannot backtrace the program to find out
what piece of my application caused the problem.  I can see the call
to raise and abort, but then I get the error message "Backtrace
stopped:
frame did not save the PC".  Could this be due to code compiled with
the -fomit-frame-pointers options.  I am really pulling my hair out
over this one, any guidance or suggests would be vastly appreciated.
If further forensic info is required just ask.  Thanks in advance.
Note: I can switch the thread I am in and view other stack backtraces
with no problem.
-------------------------------------------------------------------------------------------
*** glibc detected *** /lifecor/shell: double free or corruption
(!prev): 0x000e8368 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread 1224766608 (LWP 3149)]
0x4039aa24 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x4039aa24 in raise () from /lib/libc.so.6
#1  0x4039bd5c in abort () from /lib/libc.so.6 Backtrace stopped:
frame did not save the PC
(gdb) info threads
 353 Thread 1241867408 (LWP 3482)  0x4035fed4 in
pthread_cond_timedwait@@GLIBC_2.4 () from /lib/libpthread.so.0
* 20 Thread 1224766608 (LWP 3149)  0x4039aa24 in raise () from
/lib/libc.so.6
 18 Thread 1206998160 (LWP 3147)  0x40362c54 in accept () from
/lib/libpthread.so.0
 17 Thread 1198609552 (LWP 3146)  0x4035fbdc in
pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
 16 Thread 1189414032 (LWP 3145)  0x403629a4 in read () from
/lib/libpthread.so.0
 15 Thread 1180988560 (LWP 3142)  0x403629a4 in read () from
/lib/libpthread.so.0
 14 Thread 1172599952 (LWP 3141)  0x403629a4 in read () from
/lib/libpthread.so.0
 13 Thread 1163916432 (LWP 3140)  0x4035fbdc in
pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
 12 Thread 1155527824 (LWP 3135)  0x403ee074 in nanosleep () from
/lib/libc.so.6
 11 Thread 1137185936 (LWP 3134)  0x4035fbdc in
pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
 10 Thread 1145574544 (LWP 3133)  0x403ee074 in nanosleep () from
/lib/libc.so.6
 7 Thread 1128797328 (LWP 3123)  0x40404d7c in sched_yield () from
/lib/libc.so.6
 6 Thread 1120408720 (LWP 3122)  0x403ee074 in nanosleep () from
/lib/libc.so.6
 5 Thread 1112020112 (LWP 3121)  0x4035fed4 in
pthread_cond_timedwait@@GLIBC_2.4 () from /lib/libpthread.so.0
 4 Thread 1103631504 (LWP 3120)  0x4035fbdc in
pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
 3 Thread 1095242896 (LWP 3119)  0x403629a4 in read () from
/lib/libpthread.so.0
 2 Thread 1086854288 (LWP 3118)  0x40363e90 in do_sigwait () from
/lib/libpthread.so.0
 1 Thread 1073871200 (LWP 3117)  0x403ee074 in nanosleep () from
/lib/libc.so.6
(gdb) quit


             reply	other threads:[~2007-03-11 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 18:04 Rich Rattanni [this message]
2007-03-11 21:36 ` Mark Kettenis
2007-03-11 22:37   ` shanevolpe
2007-03-12  0:19     ` Rich Rattanni
2007-03-12  1:15 ` Daniel Jacobowitz
2007-03-12  8:32   ` Mark Kettenis
2007-03-12 11:04     ` Daniel Jacobowitz
2007-03-12 23:59       ` Michael Snyder
2007-03-13 15:51         ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3187bd480703111104r46b15863g2d59714f5cc3793e@mail.gmail.com \
    --to=rattanni@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox