Bug 108676

Summary: Backtraces in gdb do not work when using abort(3)
Product: Red Hat Enterprise Linux 3 Reporter: Suhua Ding <suhua.ding>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-28 04:43:30 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Suhua Ding 2003-10-30 21:48:24 EST
(manish.singh@oracle.com reporting)

Simple test case:

#include <stdlib.h>
 
static void
test (void)
{
  abort ();
}
 
int
main (void)
{
  test ();
 
  return 0;
}

When running under gdb:

Program received signal SIGABRT, Aborted.
0x20000000000a18a1 in raise () from /lib/tls/libc.so.6.1
(gdb) bt
#0  0x20000000000a18a1 in raise () from /lib/tls/libc.so.6.1

When running under LD_ASSUME_KERNEL=2.4.19, it works as expected:

Program received signal SIGABRT, Aborted.
0x20000000000a5c02 in kill () from /lib/libc.so.6.1
(gdb) bt
#0  0x20000000000a5c02 in kill () from /lib/libc.so.6.1
#1  0x20000000000a58f0 in raise () from /lib/libc.so.6.1
#2  0x20000000000a81e0 in abort () from /lib/libc.so.6.1
#3  0x4000000000000660 in test () at testit2.c:6
#4  0x40000000000006a0 in main () at testit2.c:12

This is with glibc-2.3.2-95.3.
Comment 1 Ulrich Drepper 2004-09-28 04:43:30 EDT
I tried it with a RHEL3U2 system and it works as expected:

Program received signal SIGABRT, Aborted.
0x2000000000002d01 in _dl_sysinfo_break () from /lib/ld-linux-ia64.so.2
(gdb) bt
#0  0x2000000000002d01 in _dl_sysinfo_break () from
/lib/ld-linux-ia64.so.2
#1  0x2000000000090cb0 in raise () from /lib/tls/libc.so.6.1
#2  0x2000000000093a50 in abort () from /lib/tls/libc.so.6.1
#3  0x4000000000000670 in test () at u.c:6
#4  0x40000000000006b0 in main () at u.c:12


As you can see, /lib/tls is used.  I'm closing the bug.