This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.


------- Additional Comments From jorge dot monteagudo at gmail dot com  2005-12-02 15:12 -------

I've tested on Fedora Core 4 distribution with no luck too.

$ ./a.out
Thread canceled.

$ uname -a
Linux localhost.localdomain 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 
i686 i686 i386 GNU/Linux

$ g++ --version
g++ (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
Copyright (C) 2005 Free Software Foundation, Inc.
Esto es software libre; vea el código para las condiciones de copia.  NO hay
garantía; ni siquiera para MERCANTIBILIDAD o IDONEIDAD PARA UN PROPÓSITO EN
PARTICULAR

$ ldd --version
ldd (GNU libc) 2.3.5
Copyright (C) 2005 Free Software Foundation, Inc.
Esto es software libre; vea el código fuente para las condiciones de copia.
No hay NINGUNA garantía; ni siquiera de COMERCIABILIDAD o IDONEIDAD PARA UN
FIN DETERMINADO.
Written by Roland McGrath and Ulrich Drepper.

$ ldd ./a.out
        linux-gate.so.1 =>  (0x00fee000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00e8c000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00111000)
        libm.so.6 => /lib/libm.so.6 (0x00e19000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x007f5000)
        libc.so.6 => /lib/libc.so.6 (0x001f7000)
        /lib/ld-linux.so.2 (0x007b1000)

$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.5

$ gdb ./a.out
GNU gdb Red Hat Linux (6.3.0.0-1.21rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r
Starting program: /home/user/a.out
Reading symbols from shared object read from target memory...(no debugging 
symbols found)...done.
Loaded system supplied DSO at 0xca6000
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208523072 (LWP 3127)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread -1208525904 (LWP 3130)]
Interrupted sem_wait?: Interrupted system call

Program received signal SIG32, Real-time event 32.
[Switching to Thread -1208525904 (LWP 3130)]
0x00ca6402 in __kernel_vsyscall ()

(gdb) thread apply all bt

Thread 2 (Thread -1208525904 (LWP 3130)):
#0  0x00ca6402 in __kernel_vsyscall ()
#1  0x00910730 in sem_wait@GLIBC_2.0 () from /lib/libpthread.so.0
#2  0x00915ff4 in ?? () from /lib/libpthread.so.0
#3  0x0804882d in cancel_thread ()
#4  0x0090cb80 in start_thread () from /lib/libpthread.so.0
#5  0x0075ddee in clone () from /lib/libc.so.6

Thread 1 (Thread -1208523072 (LWP 3127)):
#0  0x00ca6402 in __kernel_vsyscall ()
#1  0x0090cf98 in pthread_join () from /lib/libpthread.so.0
#2  0x080489b8 in main ()

(gdb) shared
Symbols already loaded for /lib/libpthread.so.0
Symbols already loaded for /usr/lib/libstdc++.so.6
Symbols already loaded for /lib/libm.so.6
Symbols already loaded for /lib/libgcc_s.so.1
Symbols already loaded for /lib/libc.so.6
Symbols already loaded for /lib/ld-linux.so.2
(gdb) k
Kill the program being debugged? (y or n) y
(gdb) q


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1913

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]