Fixed in eglibc-2.12 ** Changed in: eglibc (Ubuntu) Status: New => Fix Released
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to eglibc in Ubuntu. https://bugs.launchpad.net/bugs/775374 Title: pthread_exit() causes pthread_join() hang when library destructor called Status in eglibc package in Ubuntu: Fix Released Bug description: Binary package hint: libc6 Hello, I have a simple program that loads and then unloads a shared object. Source code attached. Shared object constructor launchs a joinable thread, that terminates with pthread_exit() call. Shared object destructor contains pthread_join() call. When I call destructor, pthread_join() hangs. This behavior disappears if I substitute pthread_exit() with a return. Here the gdb trace: (gdb) info threads 2 Thread 0xb7fefb70 (LWP 1134) 0x0012d422 in __kernel_vsyscall () * 1 Thread 0xb7ff06c0 (LWP 1131) 0x0012d422 in __kernel_vsyscall () (gdb) bt #0 0x0012d422 in __kernel_vsyscall () #1 0x00138b5d in pthread_join () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x002a57a4 in TestModExit () at TestMod.c:49 #3 0x002a5678 in __do_global_dtors_aux () from ./libTestMod.so #4 0x002a5810 in _fini () from ./libTestMod.so #5 0x0012273e in ?? () from /lib/ld-linux.so.2 #6 0x001231b7 in ?? () from /lib/ld-linux.so.2 #7 0x0012eca4 in ?? () from /lib/tls/i686/cmov/libdl.so.2 #8 0x0011d7e6 in ?? () from /lib/ld-linux.so.2 #9 0x0012f09c in ?? () from /lib/tls/i686/cmov/libdl.so.2 #10 0x0012ecda in dlclose () from /lib/tls/i686/cmov/libdl.so.2 #11 0x08048549 in main (argc=1, argv=0xbffff874) at main.c:15 (gdb) thread 2 [Switching to thread 2 (Thread 0xb7fefb70 (LWP 1134))]#0 0x0012d422 in __kernel_vsyscall () (gdb) bt #0 0x0012d422 in __kernel_vsyscall () #1 0x0013eaf9 in __lll_lock_wait () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x0013a149 in _L_lock_839 () from /lib/tls/i686/cmov/libpthread.so.0 #3 0x00139fdb in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0 #4 0x0012157d in ?? () from /lib/ld-linux.so.2 #5 0x0024f4a2 in ?? () from /lib/tls/i686/cmov/libc.so.6 #6 0x0011d7e6 in ?? () from /lib/ld-linux.so.2 #7 0x0024f5a1 in ?? () from /lib/tls/i686/cmov/libc.so.6 #8 0x0024f6bb in __libc_dlopen_mode () from /lib/tls/i686/cmov/libc.so.6 #9 0x00140b47 in pthread_cancel_init () from /lib/tls/i686/cmov/libpthread.so.0 #10 0x00140cbd in _Unwind_ForcedUnwind () from /lib/tls/i686/cmov/libpthread.so.0 #11 0x0013e788 in __pthread_unwind () from /lib/tls/i686/cmov/libpthread.so.0 #12 0x001389e0 in pthread_exit () from /lib/tls/i686/cmov/libpthread.so.0 #13 0x002a5719 in MyThreadFun (arg=0x0) at TestMod.c:25 #14 0x0013796e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #15 0x00218a4e in clone () from /lib/tls/i686/cmov/libc.so.6 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/775374/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp