Re: Problem with exiting threads under NPTL

From: Martin Schlemmer
Date: Sun Dec 14 2003 - 10:01:21 EST


On Sun, 2003-12-14 at 07:25, Petr Vandrovec wrote:
> Hi,
> several times one of our threads ended up as ZOMBIE and
> nobody wants to pick him up - even init ignores it. Inspection
> of kernel structures revealed that task's exit code is 0,
> exit_signal is -1, ptrace is 0 and state is 8 (ZOMBIE).
>

> So if some process ignores SIGCHLD, and spawns child process
> which creates additional thread, and main thread in child exits
> before child it created, you'll end up with immortal zombie.
>

I can confirm this behavior here, although I must admit I do not
know if the sample code is legal. Latest glibc from cvs + bk kernel.


Cheers,

--
Martin Schlemmer

Attachment: signature.asc
Description: This is a digitally signed message part