Bug 141896 - false ECHILD result from wait* with zombie group leader
Summary: false ECHILD result from wait* with zombie group leader
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-04 22:21 UTC by Roland McGrath
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-03 08:33:34 UTC
Type: ---
Embargoed:


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

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.


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