Bug 141896

Summary: false ECHILD result from wait* with zombie group leader
Product: [Fedora] Fedora Reporter: Roland McGrath <roland>
Component: kernelAssignee: Roland McGrath <roland>
Status: CLOSED NEXTRELEASE QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: davej, drepper, mingo, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-03 08:33:34 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 case for wait bug
none
proposed fix none

Description Roland McGrath 2004-12-04 22:21:15 UTC
Description of problem:

wait* syscall can sometimes return ECHILD though a multithreaded process child
exists and is in the process of exitting.

Version-Release number of selected component (if applicable):

2.6.9 or thereabouts.

How reproducible:
test program does 50 runs, usually happens in < 10 on 2-CPU machine

Steps to Reproduce:
1. gcc -g waitpidbug.c -lpthread -o waitpidbug
2. ./waitpidbug
3.
  
Actual results:
Will eventually say "Kill failed!", exit 1.

Expected results:
No such error from test program, exit 0.

Additional info:

Fix on the way.

Comment 1 Roland McGrath 2004-12-04 22:21:15 UTC
Created attachment 107907 [details]
test case for wait bug

Comment 2 Roland McGrath 2004-12-04 22:23:14 UTC
Created attachment 107908 [details]
proposed fix

I've just posted this fix upstream.

Comment 3 Ulrich Drepper 2004-12-13 10:38:49 UTC
Seems to work nicely with 2.6.9-1.1032_FC4smp.  But I only tested the SMP kernel
on a UP HT machine.

Comment 4 Roland McGrath 2004-12-14 02:23:45 UTC
Patch is in 2.6.10-rc3-mm1 tree upstream, not yet in Linus tree.

Comment 5 Roland McGrath 2004-12-24 23:59:36 UTC
This went into Linus's kernel and should be in 2.6.10 when released.

Comment 6 Roland McGrath 2005-01-03 08:33:34 UTC
2.6.10 has this fixed.