Bug 141896 - false ECHILD result from wait* with zombie group leader
false ECHILD result from wait* with zombie group leader
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-12-04 17:21 EST by Roland McGrath
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-03 03:33:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test case for wait bug (2.30 KB, text/plain)
2004-12-04 17:21 EST, Roland McGrath
no flags Details
proposed fix (1.68 KB, patch)
2004-12-04 17:23 EST, Roland McGrath
no flags Details | Diff

  None (edit)
Description Roland McGrath 2004-12-04 17:21:15 EST
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
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 17:21:15 EST
Created attachment 107907 [details]
test case for wait bug
Comment 2 Roland McGrath 2004-12-04 17:23:14 EST
Created attachment 107908 [details]
proposed fix

I've just posted this fix upstream.
Comment 3 Ulrich Drepper 2004-12-13 05:38:49 EST
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-13 21:23:45 EST
Patch is in 2.6.10-rc3-mm1 tree upstream, not yet in Linus tree.
Comment 5 Roland McGrath 2004-12-24 18:59:36 EST
This went into Linus's kernel and should be in 2.6.10 when released.
Comment 6 Roland McGrath 2005-01-03 03:33:34 EST
2.6.10 has this fixed.

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