Created attachment 369618 [details] Source code of the pth_cancel2 test program. Description of problem: Programs using pthread's thread cancellation feature sometimes hang. Version-Release number of selected component (if applicable): glibc-2.11-2.x86_64 How reproducible: Happens every now and then. Steps to Reproduce: Run the following command: for ((i=0;i<100;i++)); do date; ./pth_cancel2; done Actual results: The test program pth_cancel2 sometimes hangs. Expected results: The test program pth_cancel2 never hangs. Additional info: The test program none/tests/pth_cancel2 is one of Valgrinds regression test programs. This program is run every night on several different Linux distro's. I have never seen it hanging during the past two years, except on Fedora 12. Call stacks at the time of the hang: (gdb) info thread * 2 Thread 0x7fbe02aa9710 (LWP 22681) __pthread_disable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:114 1 Thread 0x7fbe02aab700 (LWP 22680) 0x000000349ba07bfd in pthread_join (threadid=140454065248016, thread_return=0x0) at pthread_join.c:89 (gdb) thread 1 [Switching to thread 1 (Thread 0x7fbe02aab700 (LWP 22680))]#0 0x000000349ba07bfd in pthread_join (threadid=140454065248016, thread_return=0x0) at pthread_join.c:89 Current language: auto The current source language is "auto; currently c". (gdb) bt #0 0x000000349ba07bfd in pthread_join (threadid=140454065248016, thread_return=0x0) at pthread_join.c:89 #1 0x0000000000400a63 in main () at pth_cancel2.c:91 (gdb) thread 2 [Switching to thread 2 (Thread 0x7fbe02aa9710 (LWP 22681))]#0 __pthread_disable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:114 Current language: auto The current source language is "auto; currently asm". (gdb) bt #0 __pthread_disable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:114 #1 0x000000349ba0e0c9 in write () at ../sysdeps/unix/syscall-template.S:82 #2 0x0000000000400917 in io (arg=0x600f50) at pth_cancel2.c:57 #3 0x000000349ba06a3a in start_thread (arg=<value optimized out>) at pthread_create.c:297 #4 0x000000349aeddf3d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #5 0x0000000000000000 in ?? () (gdb)
Fixed upstream by Andreas, will be in the next rawhide and hopefully F12 build.
glibc-2.11-4 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/glibc-2.11-4
glibc-2.11-4 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update glibc'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12470
glibc-2.11.1-1 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update glibc'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12470
glibc-2.11.1-1 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.