|
From: | Harrow, Jerry |
Subject: | [libunwind] libunwind segv with gcc 2.96 programs run on Redhat EL 3 with GLIBC 2.3.2 |
Date: | Wed, 4 Feb 2004 11:28:13 -0500 |
My project has been using libunwind to trace the stack at event points within a process. When testing with the new Redhat EL V3 on Itanium (glibc 2.3.2) we started to see a segv from libunwind when attempting to unwind through main(). I downloaded and built the latest libunwind 0.96, but the behavior is the same. I tracked it down to the following case:
If the main program has been built on RH AS 2.1 (with gcc 2.96), and we attempt to unwind past main() we get a segv. It appears that the end of the callstack is not detected. If I rebuild the main program on RH it works fine. Strangely, it also works fine if I set LD_ASSUME_KERNEL=2.4.1 which forces the use the /lib/libc.so.6.1 for linuxthreads instead of the default /lib/tls/libc.so.6.1 which is built to work with the new NPTL threads library.
Is there any known incompatibility that would cause this? I’d be glad to try to help resolve this anyway I can. I am using the attached example bt.c. Below is as much info as I could capture using the debugger.
Thanks.
-Jer
-- On RH AS 2.1 -- > gcc bt.c -o bt -I$VT/lib/libunwind/libunwind-0.96/$VTARCH/include -L$VT/lib/libunwind/libunwind-0.96/$VTARCH/lib -lunwind –g
-- On RH EL 3 -- > gdb bt (gdb) r Starting program: /var/users/harrow/bt ip = 0x4000000000000c10, sp = 0x60000fffffffb200 ip = 0x4000000000000c60, sp = 0x60000fffffffb200 ip = 0x4000000000000cb0, sp = 0x60000fffffffb200 ip = 0x20000000000fe7d0, sp = 0x60000fffffffb200 ip = 0x40000000000008e0, sp = 0x60000fffffffb630
Program received signal SIGSEGV, Segmentation fault. update_frame_state (c=0x60000fffffff97a0) at unwind_i.h:119 119 unwind_i.h: No such file or directory. in unwind_i.h (gdb) where #0 update_frame_state (c=0x60000fffffff97a0) at unwind_i.h:119 #1 0x200000000007c0e0 in _ULia64_step (cursor=0x60000fffffff97b0) at Gstep-ia64.c:341 #2 0x4000000000000ae0 in show_backtrace () at bt.c:19 #3 0x4000000000000c10 in parent2 () at bt.c:31 #4 0x4000000000000c60 in parent1 () at bt.c:35 #5 0x4000000000000cb0 in main () at bt.c:39 #6 0x20000000000fe7d0 in __libc_start_main () from /lib/tls/libc.so.6.1 (gdb) (gdb) set environ LD_ASSUME_KERNEL=2.4.1 (gdb) break show_backtrace Breakpoint 1 at 0x4000000000000a62: file bt.c, line 15. (gdb) r Starting program: /var/users/harrow/bt
Breakpoint 1, show_backtrace () at bt.c:15 15 unw_getcontext(&uc); (gdb) where #0 show_backtrace () at bt.c:15 #1 0x4000000000000c10 in parent2 () at bt.c:31 #2 0x4000000000000c60 in parent1 () at bt.c:35 #3 0x4000000000000cb0 in main () at bt.c:39 #4 0x20000000000ff280 in __libc_start_main () from /lib/libc.so.6.1 #5 0x40000000000008e0 in _start () (gdb) c Continuing. ip = 0x4000000000000c10, sp = 0x60000fffffffb600 ip = 0x4000000000000c60, sp = 0x60000fffffffb600 ip = 0x4000000000000cb0, sp = 0x60000fffffffb600 ip = 0x20000000000ff280, sp = 0x60000fffffffb600 ip = 0x40000000000008e0, sp = 0x60000fffffffb600
Program exited normally. (gdb)
|
bt.c
Description: bt.c
[Prev in Thread] | Current Thread | [Next in Thread] |