Bug 36568 - infinite _Unwind_Backtrace / thread stack unwinding.
Summary: infinite _Unwind_Backtrace / thread stack unwinding.
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.4
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 36621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-18 19:35 UTC by Pawel Sikora
Modified: 2008-10-28 15:18 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-gnu-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase. (446 bytes, text/plain)
2008-06-18 19:35 UTC, Pawel Sikora
Details
testcase makefile. (54 bytes, text/plain)
2008-06-18 19:36 UTC, Pawel Sikora
Details
A patch which comes with debian and ubuntu which solves this problem (498 bytes, patch)
2008-06-24 21:04 UTC, Vinu Rajashekhar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2008-06-18 19:35:11 UTC
test w/o threads:

$ ./u
0x400a74 handler+0x1a
0x400a95 crash+0x10
0x400afd main+0x60
0x7fa92f9e74a4 __libc_start_main+0xf4

test w/ threads:

$ ./u threaded
0x400a74 handler+0x1a
0x400a95 crash+0x10
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
0x7fcea7803a3d clone+0x6d
(...)

gdb stops unwinding at clone():

$ gdb ./u
(gdb) set args threaded
(gdb) r
(...)
[New Thread 0x7fdd9636b6f0 (LWP 7318)]
[New Thread 0x42501950 (LWP 7322)]
(...)
Breakpoint 2, handler (signalNumber=11) at u.c:25
25              _Unwind_Backtrace( helper, 0 );
(gdb) bt
#0  handler (signalNumber=11) at u.c:25
#1  <signal handler called>
#2  0x0000000000400a95 in crash () at u.c:32
#3  0x00007fa0eef04070 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fa0eea6da3d in clone () from /lib64/libc.so.6

gcc-4.2.4-1.x86_64
glibc-2.8-3.x86_64
gdb-6.8-1.x86_64
Comment 1 Pawel Sikora 2008-06-18 19:35:37 UTC
Created attachment 15781 [details]
testcase.
Comment 2 Pawel Sikora 2008-06-18 19:36:26 UTC
Created attachment 15782 [details]
testcase makefile.
Comment 3 Vinu Rajashekhar 2008-06-24 21:04:10 UTC
Created attachment 15812 [details]
A patch which comes with debian and ubuntu which solves this problem

A patch which is provided with ubuntu and debian which solves the 
problem of the infinite _Unwind_Backtrace automagically. I chanced upon this
luckily. In ubuntu do apt-get install glibc-source and in patches/amd64/ 
you will find it.
Comment 4 Richard Biener 2008-06-24 22:02:28 UTC
*** Bug 36621 has been marked as a duplicate of this bug. ***
Comment 5 Richard Biener 2008-06-24 22:03:03 UTC
This is a glibc bug then.
Comment 6 Pawel Sikora 2008-06-25 07:52:42 UTC
forwarded to libc bugzilla:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=6693
Comment 7 Pawel Sikora 2008-10-28 15:18:35 UTC
(In reply to comment #5)
> This is a glibc bug then.
> 

hmm, Ulrich Drepper rejects this bug report.
http://sources.redhat.com/bugzilla/show_bug.cgi?id=6693#c1