All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] xend: Sleep before sending SIGKILL to device model
Date: Wed, 28 Jan 2009 17:46:32 +0900	[thread overview]
Message-ID: <49801B68.5060700@ab.jp.nec.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

When we destroy a domain, xend sends SIGTERM to the device model and
wait by waitpid() until the device model process disappears.
If we restarted xend during the lifetime of the domain, waitpid() fails
because the device model is no longer a child of xend, and in that case
xend gives up waiting for the shutdown of process and just send it
SIGKILL immediately. This is problematic because most of the case the
device model will be forcibly killed by xend before shutting itself
down.
This patch adds time.sleep before sending SIGKILL to the device model.
On my test box shutdown of a device model usually takes about 0.5 sec,
so waiting two seconds should be enough in most cases.

Regards,
-----------------------
Yosuke Iwamatsu
        NEC Corporation

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

[-- Attachment #2: xend_dm_sigkill.patch --]
[-- Type: all/allfiles, Size: 957 bytes --]

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2009-01-28  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  8:46 Yosuke Iwamatsu [this message]
2009-01-28 11:14 ` [PATCH] xend: Sleep before sending SIGKILL to device model Ian Jackson
2009-01-29  8:40   ` Yosuke Iwamatsu
2009-01-29 11:12     ` Ian Jackson
2009-02-04  6:14     ` Yosuke Iwamatsu

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=49801B68.5060700@ab.jp.nec.com \
    --to=y-iwamatsu@ab.jp.nec.com \
    --cc=xen-devel@lists.xensource.com \
    /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.