Bug 537690 - Trouble with thread cancellation -- bug in pthread library ?
Summary: Trouble with thread cancellation -- bug in pthread library ?
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 12
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-15 19:07 UTC by Bart Van Assche
Modified: 2010-01-12 23:43 UTC (History)
5 users (show)

Fixed In Version: 2.11.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-12 23:43:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Source code of the pth_cancel2 test program. (2.09 KB, text/x-csrc)
2009-11-15 19:07 UTC, Bart Van Assche
no flags Details

Description Bart Van Assche 2009-11-15 19:07:49 UTC
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)

Comment 1 Ulrich Drepper 2009-11-28 05:42:11 UTC
Fixed upstream by Andreas, will be in the next rawhide and hopefully F12 build.

Comment 2 Fedora Update System 2009-11-30 16:35:41 UTC
glibc-2.11-4 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/glibc-2.11-4

Comment 3 Fedora Update System 2009-12-02 04:25:56 UTC
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

Comment 4 Fedora Update System 2010-01-05 22:45:19 UTC
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

Comment 5 Fedora Update System 2010-01-12 23:42:43 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.