Bug 111663

Summary: cancellation is enabled in pthread cleanup handlers
Product: [Retired] Red Hat Linux Reporter: Davide Guerri <tatonet>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 9CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: FC1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-05-27 20:58:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test program for the bug. none

Description Davide Guerri 2003-12-08 10:05:53 UTC
From Bugzilla Helper: 
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1) 
 
Description of problem: 
A thread can be canceled in cancellation cleanup handlers. This can 
leads to re-execution of handlers. 
 
 
Version-Release number of selected component (if applicable): 
glibc-2.3.2-27.9.7 
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1. Compile and execute test program below 
     
 
Actual Results:  1) 
cleanup handler (begin) 
cleanup handler (end) 
cleanup handler (begin) 
cleanup handler (end) 
 
2) 
cleanup handler (begin) 
cleanup handler (begin) 
cleanup handler (end) 
cleanup handler (begin) 
cleanup handler (end) 
Bye! 
 
 
Expected Results:  Cancellation should be disabled during the 
execution of cleanup handlers. 
(http://www.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_09.html#tag_02_09_05_03) 
 
Additional info:

Comment 1 Davide Guerri 2003-12-08 10:06:57 UTC
Created attachment 96395 [details]
Test program for the bug.

Comment 2 Ulrich Drepper 2003-12-18 07:15:10 UTC
Even with the oldest FC1 glibc I have around I get

1)
cleanup handler (begin)
cleanup handler (end)
 
2)
cleanup handler (begin)
cleanup handler (end)
Bye!

I don't have a RHL9 system here.  If your program indeed produces the
output you say it gives, then it's only a matter of patches which are
not backported.