[Bug target/36621] New: infinite _Unwind_Backtrace / thread stack unwinding.
$ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) GNU C Library stable release version 2.7, by Roland McGrath et al. GNU gdb Red Hat Linux (6.5-8.fc6rh) +++ This bug was initially created as a clone of Bug #36568 +++ 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 #2 0x00400a95 in crash () at u.c:32 #3 0x7fa0eef04070 in start_thread () from /lib64/libpthread.so.0 #4 0x7fa0eea6da3d 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 -- Summary: infinite _Unwind_Backtrace / thread stack unwinding. Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vinutheraj at gmail dot com GCC target triplet: x86_64-gnu-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36621
[Bug target/36621] infinite _Unwind_Backtrace / thread stack unwinding.
--- Comment #1 from vinutheraj at gmail dot com 2008-06-24 18:21 --- This code seems to work against the gcc version in ubuntu 8.04 heres the output : $ ./u threaded 0x400af4 handler+0x1a 0x400b15 crash+0x10 0x7fc507445b2d clone+0x6d $ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36621
[Bug target/36621] infinite _Unwind_Backtrace / thread stack unwinding.
--- Comment #2 from vinutheraj at gmail dot com 2008-06-24 20:58 --- Created an attachment (id=15811) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15811&action=view) Its a patch provided with ubuntu and debian which solves this backtrace problem This patch provided with ubuntu and debian solves this backtrace problem automagically. I chanced upon it by luck. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36621
[Bug target/36568] infinite _Unwind_Backtrace / thread stack unwinding.
--- Comment #3 from vinutheraj at gmail dot com 2008-06-24 21:04 --- Created an attachment (id=15812) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15812&action=view) 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36568
[Bug target/36621] infinite _Unwind_Backtrace / thread stack unwinding.
--- Comment #5 from vinutheraj at gmail dot com 2008-06-24 23:39 --- Yup its a glibc bug, I was working on porting something when I chanced upon it, and was surprised to see the bug reported here. So if somebody can report it over at glibc bugzilla, it would be very helpful. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36621