From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24173 invoked by alias); 6 Mar 2007 16:42:27 -0000 Received: (qmail 24156 invoked by uid 22791); 6 Mar 2007 16:42:26 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.mxtelecom.com (HELO puma.mxtelecom.com) (82.110.36.85) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Mar 2007 16:42:20 +0000 Received: from aileron.mxtelecom.com ([192.168.2.120]) by puma.mxtelecom.com with esmtp (Exim 4.66) (envelope-from ) id 1HOcjy-0006XH-3J for gdb@sourceware.org; Tue, 06 Mar 2007 16:42:18 +0000 Message-ID: <45ED99E9.8050404@mxtelecom.com> Date: Tue, 06 Mar 2007 16:42:00 -0000 From: Richard van der Hoff User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Backtrace not working from within nanosleep Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00088.txt.bz2 Hi all, I have a problem with gdb on my live servers, whereby it doesn't seem to be able to unwind the stacks of threads which have been interrupted in nanosleep. Typically I get a backtrace like this: (gdb) bt #0 0x41166f56 in nanosleep () from /lib/libc.so.6 #1 0x00000000 in ?? () (gdb) This looks very much like the same problem as http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2141; and I had hoped that upgrading my glibc would solve the problem, but it persists. The stack looks fine - it just looks like gdb can't unwind it. Any ideas what might be the problem here? I have: Linux kernel 2.4.26 GNU gdb 6.6 gcc (GCC) 3.3.4 glibc-2.3.6 The state of the thread is as follows: (gdb) info registers eax 0xfffffffc -4 ecx 0x0 0 edx 0x41168ff4 1091997684 ebx 0xbf5ff588 -1084230264 esp 0xbf5ff570 0xbf5ff570 ebp 0xbf5ff740 0xbf5ff740 esi 0xbf5ff588 -1084230264 edi 0x0 0 eip 0x41166f56 0x41166f56 eflags 0x282 [ SF IF ] cs 0x23 35 ss 0x2b 43 ds 0x2b 43 es 0x2b 43 fs 0x0 0 gs 0x0 0 (gdb) disassemble Dump of assembler code for function nanosleep: 0x41166f10 : call 0x41162303 <__i686.get_pc_thunk.cx> 0x41166f15 : add $0x20df,%ecx 0x41166f1b : cmpl $0x0,0x2c70(%ecx) 0x41166f22 : jne 0x41166f3f 0x41166f24 : mov %ebx,%edx 0x41166f26 : mov 0x8(%esp),%ecx 0x41166f2a : mov 0x4(%esp),%ebx 0x41166f2e : mov $0xa2,%eax 0x41166f33 : int $0x80 0x41166f35 : mov %edx,%ebx 0x41166f37 : cmp $0xfffff001,%eax 0x41166f3c : jae 0x41166f69 0x41166f3e : ret 0x41166f3f : call 0x4115d890 <__pthread_enable_asynccancel> 0x41166f44 : push %eax 0x41166f45 : mov %ebx,%edx 0x41166f47 : mov 0xc(%esp),%ecx 0x41166f4b : mov 0x8(%esp),%ebx 0x41166f4f : mov $0xa2,%eax 0x41166f54 : int $0x80 0x41166f56 : mov %edx,%ebx 0x41166f58 : xchg %eax,(%esp) 0x41166f5b : call 0x4115d930 <__pthread_disable_asynccancel> 0x41166f60 : pop %eax 0x41166f61 : cmp $0xfffff001,%eax 0x41166f66 : jae 0x41166f69 0x41166f68 : ret 0x41166f69 : push %ebx 0x41166f6a : call 0x4115d047 <__i686.get_pc_thunk.bx> 0x41166f6f : add $0x2085,%ebx 0x41166f75 : xor %edx,%edx 0x41166f77 : sub %eax,%edx 0x41166f79 : push %edx 0x41166f7a : call 0x4115cf74 <__errno_location@plt> 0x41166f7f : pop %ecx 0x41166f80 : pop %ebx 0x41166f81 : mov %ecx,(%eax) 0x41166f83 : or $0xffffffff,%eax 0x41166f86 : jmp 0x41166f68 End of assembler dump. (gdb) x /20 $esp 0xbf5ff570: 0x00000000 0x4116227f 0xbf5ff588 0x00000000 0xbf5ff580: 0xbf5ff638 0x40ddd8f0 0x0000001d 0x3b9aba60 0xbf5ff590: 0x45ed6181 0x000e320a 0x41168ff4 0xbf5ff7b0 0xbf5ff5a0: 0x00000000 0xbf5ff740 0xbf5ff578 0x411621ed 0xbf5ff5b0: 0x00000001 0x80000000 0x00000000 0x411ac9dc (gdb) x /20 $ebp-0x40 0xbf5ff700: 0x00000000 0x00000000 0x00000000 0x00000000 0xbf5ff710: 0x00000000 0x00000000 0x00000000 0x00000000 0xbf5ff720: 0x00000000 0x00000000 0x00000000 0x00000000 0xbf5ff730: 0x00000000 0x00000000 0x41168ff4 0xbf5ff7b0 0xbf5ff740: 0xbf5ff768 0x4115e429 0xbf5ffbe0 0xbf5ff7b0 0x4116227f is <__pthread_timedsuspend_new+191>; 0x4115e429 is . Thanks in advance for any suggestions.