From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 581 invoked by alias); 11 Mar 2007 18:04:50 -0000 Received: (qmail 570 invoked by uid 22791); 11 Mar 2007 18:04:48 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.174) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 Mar 2007 18:04:44 +0000 Received: by ug-out-1314.google.com with SMTP id 75so1966234ugb for ; Sun, 11 Mar 2007 11:04:42 -0700 (PDT) Received: by 10.70.39.11 with SMTP id m11mr8471745wxm.1173636281112; Sun, 11 Mar 2007 11:04:41 -0700 (PDT) Received: by 10.100.14.9 with HTTP; Sun, 11 Mar 2007 11:04:41 -0700 (PDT) Message-ID: <3187bd480703111104r46b15863g2d59714f5cc3793e@mail.gmail.com> Date: Sun, 11 Mar 2007 18:04:00 -0000 From: "Rich Rattanni" To: gdb@sourceware.org Subject: Debugging glibc crashes with GDB MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00155.txt.bz2 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