Created attachment 360523 [details] reproducer's source file Description of problem: When a program creates a thread which calls setuid() and terminates, the other thread trying to wait for it hangs. Version-Release number of selected component (if applicable): RHEL5 (2.5-34), also RHEL4 and the newest upstream sources How reproducible: always Steps to Reproduce: 1. Compile attached source file of reproducer: $ gcc -o reproducer reproducer.c -lpthread 2. and run it: $ ./reproducer Actual results: program hangs Expected results: program should end without hanging Additional info: This bug has appeared quite a long ago, you can find it in a sourceware BZ with existing patch at: http://sources.redhat.com/bugzilla/show_bug.cgi?id=3270#c2 The patch solves the problem, but I have no idea why this hasn't been applied in the upstream already. I have attached a slightly modiffied version of the patch to be able to be applied and built on RHEL5 glibc sources and it works and solves the problem. There is also existing BZ for RHEL4: https://bugzilla.redhat.com/show_bug.cgi?id=248671
Created attachment 360525 [details] a patch which fixes the bug this is a slightly modified version of the original patch: http://sources.redhat.com/bugzilla/attachment.cgi?id=1330&action=view
*** This bug has been marked as a duplicate of bug 491995 ***
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0306.html