[Devel] Re: [PATCH-user-cr] restart: handle dead/dummy tasks like ghosts

Oren Laadan orenl at librato.com
Thu Oct 1 07:59:34 PDT 2009



Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl at librato.com):
>> In "subtree" restart (restarting not inside a container), 'restart'
>> uses prctl(PR_DEATH_SIGNAL,...) to ensure proper cleanup should the
>> restart fail prematurely. The death_signal is sent, recursively, to
>> all the descendants of root to force-kill them.
>>
>> However, dead (dummy) tasks, marked with TASK_DEAD, used to exit
>> during the creation of the task tree. Since the task is not within
>> sys_restart it does not have the PF_RESTARTING, and therefore will
>> send the death_signal its children as it exits.
>>
>> To fix it, we observe that dead tasks are much like ghost tasks:
>> they are expected to terminate from within sys_restart, and before
>> the other tasks may resume execution. So we now treat dead (dummy)
>> tasks similarly to ghost tasks.
>>
>> Signed-off-by: Oren Laadan <orenl at cs.columbia.edu>
> 
> Hmm?  But at line 1540 you are still doing do_exit if it's
> TASK_DEAD  :)

Oops... I thought I removed it... will do.

Oren.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list