All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH-user-cr] restart: handle dead/dummy tasks like ghosts
Date: Thu, 01 Oct 2009 10:59:34 -0400	[thread overview]
Message-ID: <4AC4C3D6.3060509@librato.com> (raw)
In-Reply-To: <20091001032650.GA9491-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>



Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org):
>> 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-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
> 
> 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.

      parent reply	other threads:[~2009-10-01 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01  1:36 [PATCH-user-cr] restart: handle dead/dummy tasks like ghosts Oren Laadan
     [not found] ` <1254360988-29553-1-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-01  3:26   ` Serge E. Hallyn
     [not found]     ` <20091001032650.GA9491-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-01 14:59       ` Oren Laadan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AC4C3D6.3060509@librato.com \
    --to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.