Re: zombie with CLONE_THREAD

From: Roland McGrath
Date: Wed Jun 30 2004 - 02:15:21 EST


That change sure looks incorrect and unnecessary to me. It wasn't clear to
me from Andrea's description whether there is really any kernel bug here or
not. If some process is ptrace'ing a CLONE_THREAD thread, then the thread
should not disappear as this patch makes it do. It becomes a zombie and
reports its death status to the ptracer. When the ptracer waits for it, it
reverts to its original parent and then the logic in wait_task_zombie
should call release_task for the CLONE_THREAD case.

Are you saying that if the ptracer dies, it can leave some threads in limbo?
I think that case is supposed to work because forget_original_parent will
move all the threads ptrace'd by the dying tracer process to be ptrace'd by
init, which will then clean up their zombies as previously described.


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