public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
@ 2005-11-23 11:59 jordiblasi at gmail dot com
  2005-11-23 19:22 ` [Bug nptl/1913] " drepper at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jordiblasi at gmail dot com @ 2005-11-23 11:59 UTC (permalink / raw)
  To: glibc-bugs

/* 
  This simple .cpp source code tests if thread cancellation unwinds the C++ 
stack.  
  Assuming that C++/NPTL maps cancellation onto a language exception.   
  
  Shows that threads blocked in sem_wait() do not unwind the C++ stack. 
  However sleep(), pthread_testcancel(), ... behave as expected (throw 
exception). 
   
  compiled as g++ nptl_sem_cancel.cpp -lpthread 
   
  bug description: 
  =============== 
  Thread blocked on sem_wait() does not unwind the C++ stack on thread 
cancellation. 
  However cancellation is honored. 
   
  Execution under gdb yields to other conclusions. Thread cancellation lead to 
  SIG32 signal that interrupts sem_wait() system call that terminates the 
thread. 
 
  gdb a.out 
    GNU gdb 6.2-2mdk (Mandrakelinux) 
    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 "i586-mandrake-linux-gnu"...Using host 
libthread_db library "/lib/tls/libthread_db.so.1". 
     
    (gdb) r 
    Starting program: /home/user/a.out 
    [Thread debugging using libthread_db enabled] 
    [New Thread -1210851200 (LWP 19934)] 
    [New Thread -1210852432 (LWP 19937)] 
    Interrupted sem_wait?: Interrupted system call 
    Interrupted sem_wait?: Interrupted system call 
     
    Program received signal SIG32, Real-time event 32. 
    [Switching to Thread -1210852432 (LWP 19937)] 
    0xffffe410 in ?? () 
    (gdb) thread apply all bt 
     
    Thread 2 (Thread -1210852432 (LWP 19937)): 
    #0  0xffffe410 in ?? () 
    #1  0xb7d3daa8 in ?? () 
    #2  0x00000000 in ?? () 
    #3  0x00000000 in ?? () 
    #4  0xb7f66914 in sem_wait@GLIBC_2.0 () from /lib/tls/libpthread.so.0 
    #5  0xb7f6ba4c in __JCR_LIST__ () from /lib/tls/libpthread.so.0 
    #6  0x080487ef in cancel_thread () 
    #7  0xb7f62b3c in start_thread () from /lib/tls/libpthread.so.0 
    #8  0xb7dfe92a in clone () from /lib/tls/libc.so.6 
     
    Thread 1 (Thread -1210851200 (LWP 19934)): 
    #0  0xffffe410 in ?? () 
    #1  0xbfc95f58 in ?? () 
    #2  0x00004de1 in ?? () 
    #3  0x00000000 in ?? () 
    #4  0xb7f632e8 in pthread_join () from /lib/tls/libpthread.so.0 
    #5  0x0804895c in main () 
    #0  0xffffe410 in ?? () 
    (gdb) shared 
    Symbols already loaded for /lib/tls/libpthread.so.0 
    Symbols already loaded for /usr/lib/libstdc++.so.6 
    Symbols already loaded for /lib/tls/libm.so.6 
    Symbols already loaded for /lib/libgcc_s.so.1 
    Symbols already loaded for /lib/tls/libc.so.6 
    Symbols already loaded for /lib/ld-linux.so.2 
    (gdb) 
   
  environment: 
  ============ 
  uname -a 
  Linux wsc-linux8 2.6.12.6 #3 Wed Oct 5 12:27:21 CEST 2005 i686 Intel(R) 
Pentium(R) 4 CPU 3.20GHz unknown GNU/Linux 
   
  g++ --version 
  g++ (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk) 
   
  ldd --version 
  ldd (GNU libc) 2.3.3 
   
  ldd ./a.out 
        linux-gate.so.1 =>  (0xffffe000) 
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7f51000) 
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e7f000) 
        libm.so.6 => /lib/tls/libm.so.6 (0xb7e5c000) 
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e53000) 
        libc.so.6 => /lib/tls/libc.so.6 (0xb7d33000) 
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f79000) 
 
  getconf GNU_LIBPTHREAD_VERSION         
  NPTL 2.3.3 
   
 */ 
 
#include <stdlib.h> 
#include <stdio.h> 
#include <pthread.h> 
#include <unistd.h> 
#include <errno.h> 
#include <exception> 
#include <semaphore.h> 
#include <string.h> 
 
sem_t sem; 
 
bool canceled; 
bool calls_destructor; 
bool exception_thrown; 
 
class MyMonitor { 
    public: 
        MyMonitor() {} 
        ~MyMonitor() {  
            calls_destructor = true;             
         } 
}; 
 
void *cancel_thread(void *arg) { 
     
    try {   
        MyMonitor m; 
 
        while(true)    // sleep(2); // pthread_testcancel(); 
            if(sem_wait(&sem) != 0)  
                printf("Interrupted sem_wait?: %s\n", strerror(errno)); 
         
        exit(2); 
         
    } catch (...) { 
        exception_thrown = true; 
        throw; 
    } 
     
    canceled = false; 
    return NULL; 
} 
 
int main() { 
     
    pthread_t cancel_thread_id; 
    canceled = calls_destructor = exception_thrown = false; 
     
    sem_init(&sem,0,0); 
     
    if ( pthread_create(&cancel_thread_id, NULL, &cancel_thread, NULL) != 0) { 
        printf("Cannot create 'cancel_thread'. %s\n", strerror(errno)); 
        exit(3); 
    } 
                     
    sleep(1);     
     
    if(pthread_cancel(cancel_thread_id)!=0) { 
        printf("Cannot cancel 'cancel_thread'. %s\n", strerror(errno)); 
        exit(4);         
    } 
     
    if(pthread_join(cancel_thread_id,NULL) != 0) { 
        printf("Cannot join 'cancel_thread'. %s\n", strerror(errno)); 
        exit(5); 
    } 
    else canceled = true; 
                 
    if(canceled)    printf("Thread canceled.\n"); 
    if(calls_destructor)    printf("Cancellation calls destructors.\n"); 
    if(exception_thrown)     printf("Cancellation throws exception.\n"); 
         
    return (canceled && calls_destructor && exception_thrown) ? EXIT_SUCCESS : 
6; 
}

-- 
           Summary: Thread blocked on sem_wait() does not unwind the C++
                    stack on thread cancellation.
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: jordiblasi at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: i686 Intel(R) Pentium(R) 4 CPU 3.20GHz unknown GNU/Linux
                    2.6.12.


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
  2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
@ 2005-11-23 19:22 ` drepper at redhat dot com
  2005-11-29 10:58 ` jorge dot monteagudo at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2005-11-23 19:22 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-11-23 19:22 -------
The code certainly works as expected:

Thread canceled.
Cancellation calls destructors.
Cancellation throws exception.

My guess is that the tools shipped with and used for the distribution are
broken.  Use another distribution with better tools.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
  2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
  2005-11-23 19:22 ` [Bug nptl/1913] " drepper at redhat dot com
@ 2005-11-29 10:58 ` jorge dot monteagudo at gmail dot com
  2005-11-29 11:50 ` jorge dot monteagudo at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jorge dot monteagudo at gmail dot com @ 2005-11-29 10:58 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jorge dot monteagudo at gmail dot com  2005-11-29 10:58 -------
Hello,

I've tested the code with the last Mandriva release, with the new
tools' version, with no luck. Following my configuration.


$ ./a.out
Thread canceled.

$ uname -a
Linux wsi-shuttle 2.6.13.4 #1 Tue Nov 15 17:01:49 CET 2005 i686 AMD Sempron
(tm)   2400+ unknown GNU/Linux

$ g++ --version
g++ (GCC) 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)

$ ldd --version
ldd (GNU libc) 2.3.5

$ ldd ./a.out
        linux-gate.so.1 =>  (0xffffe000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7f7c000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7ea0000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7e7b000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e70000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7d41000)
        /lib/ld-linux.so.2 (0xb7fa8000)

$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.5

$ gdb a.out
GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0)
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 "i586-mandriva-linux-gnu"...Using host libthread_db 
library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/user/a.out
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
[Thread debugging using libthread_db enabled]
[New Thread -1211226432 (LWP 2657)]
[New Thread -1211229264 (LWP 2660)]
Interrupted sem_wait?: Interrupted system call
Interrupted sem_wait?: Interrupted system call

Program received signal SIG32, Real-time event 32.
[Switching to Thread -1211229264 (LWP 2660)]
0xffffe410 in __kernel_vsyscall ()

(gdb) thread apply all bt

Thread 2 (Thread -1211229264 (LWP 2660)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7f27980 in sem_wait@GLIBC_2.0 () from /lib/tls/libpthread.so.0
#2  0xb7f2cff4 in ?? () from /lib/tls/libpthread.so.0
#3  0x0804883d in cancel_thread ()
#4  0xb7f23c40 in start_thread () from /lib/tls/libpthread.so.0
#5  0xb7daf0ee in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1211226432 (LWP 2657)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7f24088 in pthread_join () from /lib/tls/libpthread.so.0
#2  0x080489b2 in main ()

(gdb) shared
Symbols already loaded for /lib/tls/libpthread.so.0
Symbols already loaded for /usr/lib/libstdc++.so.6
Symbols already loaded for /lib/tls/libm.so.6
Symbols already loaded for /lib/libgcc_s.so.1
Symbols already loaded for /lib/tls/libc.so.6
Symbols already loaded for /lib/ld-linux.so.2



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
  2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
  2005-11-23 19:22 ` [Bug nptl/1913] " drepper at redhat dot com
  2005-11-29 10:58 ` jorge dot monteagudo at gmail dot com
@ 2005-11-29 11:50 ` jorge dot monteagudo at gmail dot com
  2005-12-02 15:12 ` jorge dot monteagudo at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jorge dot monteagudo at gmail dot com @ 2005-11-29 11:50 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jorge dot monteagudo at gmail dot com  2005-11-29 11:50 -------
Hi Ulrich,

Could you give the tools versions you're using, please?
I don't know where to look to get more info, any comment
is welcome,

Thanks you

-- 


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
  2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
                   ` (2 preceding siblings ...)
  2005-11-29 11:50 ` jorge dot monteagudo at gmail dot com
@ 2005-12-02 15:12 ` jorge dot monteagudo at gmail dot com
  2005-12-05  9:32 ` jorge dot monteagudo at gmail dot com
  2005-12-22 18:00 ` drepper at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jorge dot monteagudo at gmail dot com @ 2005-12-02 15:12 UTC (permalink / raw)
  To: glibc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3539 bytes --]


------- 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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
  2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
                   ` (3 preceding siblings ...)
  2005-12-02 15:12 ` jorge dot monteagudo at gmail dot com
@ 2005-12-05  9:32 ` jorge dot monteagudo at gmail dot com
  2005-12-22 18:00 ` drepper at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jorge dot monteagudo at gmail dot com @ 2005-12-05  9:32 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jorge dot monteagudo at gmail dot com  2005-12-05 09:32 -------
I think I've found a workaround ! 

I've tested on my mandrake 10.1 with success. I've changed the 'sem_wait'
with a 'sem_timedwait', trying to emulate it with a big timeout. The thread
code now is:

void *cancel_thread(void *arg) { 
    timespec delay;
    struct timeval now;
      
    try {   
        MyMonitor m; 
        
        printf("loop...\n"); 
        while(!bSalir) {

              gettimeofday( &now, 0 );
              delay.tv_sec = now.tv_sec + 200;
              delay.tv_nsec = 0;
              if( sem_timedwait(&sem, &delay) != 0 ) {
                 printf("Interrupted sem_timedwait?: %s\n", strerror(errno)); 
              }
              printf("wait ended!!\n"); */
        } 
        printf("end loop\n"); 
        exit(2); 
             
    } catch (...) { 
        exception_thrown = true; 
        throw; 
    }
     
    canceled = false; 
    return NULL; 
} 

and the results:

$ ./a.out
loop...
Thread canceled.
Cancellation calls destructors.
Cancellation throws exception.

$ uname -a
Linux xxxx 2.6.9 #4 Tue Nov 16 09:22:59 CET 2004 i686 Intel(R) Pentium(R) 4 CPU
3.00GHz unknown GNU/Linux

$ g++ --version
g++ (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ldd --version
ldd (GNU libc) 2.3.3
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

$ ldd ./a.out
        linux-gate.so.1 =>  (0xffffe000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7fc2000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7ef0000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7ecd000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ec4000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7da4000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fec000)

$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.3

$ gdb ./a.out
GNU gdb 6.2-2mdk (Mandrakelinux)
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 "i586-mandrake-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/user/a.out
[Thread debugging using libthread_db enabled]
[New Thread -1210437504 (LWP 6078)]
[New Thread -1210438736 (LWP 6081)]
loop...
Interrupted sem_timedwait?: Interrupted system call
Interrupted sem_timedwait?: Interrupted system call

Program received signal SIG32, Real-time event 32.
[Switching to Thread -1210438736 (LWP 6081)]
0xffffe410 in ?? ()
Current language:  auto; currently c
(gdb) thread apply all bt

Thread 2 (Thread -1210438736 (LWP 6081)):
#0  0xffffe410 in ?? ()
#1  0xb7da2aa8 in ?? ()
#2  0x00000000 in ?? ()
#3  0x00000000 in ?? ()
#4  0xb7fcba67 in sem_timedwait () from /lib/tls/libpthread.so.0
#5  0x0804887f in cancel_thread (arg=0x0) at nptl_sem_cancel.cpp:314
#6  0xb7fc7b3c in start_thread () from /lib/tls/libpthread.so.0
#7  0xb7e6392a in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1210437504 (LWP 6078)):
#0  0xffffe410 in ?? ()
#1  0xbfffed58 in ?? ()
#2  0x000017c1 in ?? ()
#3  0x00000000 in ?? ()
#4  0xb7fc82e8 in pthread_join () from /lib/tls/libpthread.so.0
#5  0x08048a08 in main () at nptl_sem_cancel.cpp:358
#0  0xffffe410 in ?? ()
(gdb) shared
Symbols already loaded for /lib/tls/libpthread.so.0
Symbols already loaded for /usr/lib/libstdc++.so.6
Symbols already loaded for /lib/tls/libm.so.6
Symbols already loaded for /lib/libgcc_s.so.1
Symbols already loaded for /lib/tls/libc.so.6
Symbols already loaded for /lib/ld-linux.so.2
(gdb) c
Continuing.
[Thread -1210438736 (zombie) exited]
Thread canceled.
Cancellation calls destructors.
Cancellation throws exception.

Program exited normally.


I hope this could help to clarify this bug.

regards,
Jorge

-- 


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug nptl/1913] Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation.
  2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
                   ` (4 preceding siblings ...)
  2005-12-05  9:32 ` jorge dot monteagudo at gmail dot com
@ 2005-12-22 18:00 ` drepper at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2005-12-22 18:00 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-12-22 18:00 -------
There was a problem with the unwind information itself which is a x86 specific
problem.  This is fixed on the trunk.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-12-22 18:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-23 11:59 [Bug nptl/1913] New: Thread blocked on sem_wait() does not unwind the C++ stack on thread cancellation jordiblasi at gmail dot com
2005-11-23 19:22 ` [Bug nptl/1913] " drepper at redhat dot com
2005-11-29 10:58 ` jorge dot monteagudo at gmail dot com
2005-11-29 11:50 ` jorge dot monteagudo at gmail dot com
2005-12-02 15:12 ` jorge dot monteagudo at gmail dot com
2005-12-05  9:32 ` jorge dot monteagudo at gmail dot com
2005-12-22 18:00 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).