Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 531911

Summary: exiting pthreads hang if clone() process sets uid/gid
Product: Red Hat Enterprise Linux 5 Reporter: Ken Giusti <kgiusti>
Component: glibcAssignee: Andreas Schwab <schwab>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-tools-bugs
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.4CC: ebachalo, fweimer, iboverma, jkurik, matt, plyons, tross
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-03 17:39:29 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:
Bug Depends On:    
Bug Blocks: 528544    
Attachments:
Description Flags
reproduces the thread hang. none

Description Ken Giusti 2009-10-29 20:11:24 UTC
Created attachment 366702 [details]
reproduces the thread hang.

Description of problem:

If a pthread'ed application creates a new process via the clone() call, and the cloned process calls any routine that sets the group or user id (eg, setgid()), then exiting pthreads hang.

Version-Release number of selected component (if applicable): Fedora 12, RHEL 5.4


How reproducible: Very, see attached test.


Steps to Reproduce:
1.  Compile the attached test: gcc -o test.exe -lpthread test.c
2.  Run it: ./test.exe
3.  Loop should exit after a couple of seconds, but it does not.
  
Actual results:

pthread hangs in pthread library cleanup code.

Expected results:

pthread should exit cleanly.

Additional info:  Found while root-causing bug BZ528544.

Comment 2 Andreas Schwab 2009-11-03 17:39:29 UTC

*** This bug has been marked as a duplicate of bug 491995 ***