[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: BUG: NTPL: waitpid() doesn't return?
From:       Linus Torvalds <torvalds () osdl ! org>
Date:       2004-01-31 22:52:36
Message-ID: Pine.LNX.4.58.0401311441490.2033 () home ! osdl ! org
[Download RAW message or body]



On Sat, 31 Jan 2004, Matthias Urlichs wrote:
> 
> So there's definitely something fishy going on here.

Yes. Especially as the actual clone() we're waiting for was this 
one:

31342 clone( <unfinished ...>
31342 <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, \
child_tidptr=0x416dbc18) = 31346

which wasn't the detached one at all. I looked at the wrong clone().

> Besides, bert's test program exhibits exactly the same clone()
> arguments, yet it works ...

[ twilight zone music ]

Anyway. It's interesting to see who gets the SIGCHLD (which is why I 
looked at the wrong clone) - that goes to 31340:

	31346 exit_group(0)                     = ?
	31340 --- SIGCHLD (Child exited) @ 0 (0) ---
	31342 waitpid(31346,  <unfinished ...>

which is just because we send a thread-group signal, so the signal isn't 
actually necessarily directed toward the "real parent".

But the real parent _should_ have been woken up by __wake_up_parent().  
And I don't see why that wouldn't happen.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic