From: Sander Eikelenboom <linux@eikelenboom.it>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
xen-devel <xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: xl shutdown --wait "racy"
Date: Wed, 23 Apr 2014 15:38:02 +0200 [thread overview]
Message-ID: <1871588644.20140423153802@eikelenboom.it> (raw)
In-Reply-To: <21328.6371.684785.657474@mariner.uk.xensource.com>
Thursday, April 17, 2014, 8:09:39 PM, you wrote:
> George Dunlap writes ("Re: [Xen-devel] xl shutdown --wait "racy""):
>> On Wed, Apr 16, 2014 at 3:13 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> > It is waiting for the domain to be shutdown (state 's') not for the
>> > domain to be destroyed. So it's doing what it said it would (I
>> > appreciate you might not find this distinction helpful under the
>> > circumstances...)
>>
>> For any reasonable person's definition of "shutdown", it does *not*
>> wait until it's shutdown. "In the shutdown state" is not something
>> anyone outside of Xen cares about: what they care about is being able
>> to, for example, start the domain again (or start a domain that
>> depends on resources currently held by the shutting down domain).
> Quite. I think this is simply a bug and it should wait for the domain
> to be destroyed.
It seems the shutdown is racy in another aspect as well, the code in "wait_for_domain_deaths"
on receiving a event doesn't actually check if it's a event related to the
domain it should wait for. It only checks a count (1 if you shutdown only one
domain, nb_domains -1 if you shutdown all).
To be less error prone it should ideally pass an array of domids it needs to
wait for through to wait_for_domain_deaths and check on it.
> It's IMO a tolerable side-effect if this means that when the domain
> shuts down in a way that causes it to be preserved (ie the daemonic xl
> doesn't reap it) xl shutdown -w gets stuck. (There should be an
> option to restore the former behaviour but it should not be the
> default.)
> Ideally xl would record something somewhere so that it would know
> what's going on and could make "xl shutdown -w" fail in the default
> case if it's going to wait "forever".
There isn't a generic timeout function that could raise an timeout event
when it is taking too long ?
But i'm running into my all too limited C skills here ..
(passive reading is fairly ok, actively building something somewhat more complex
in a sane way is not :-) )
> Ian.
next prev parent reply other threads:[~2014-04-23 13:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 14:08 xl shutdown --wait "racy" Sander Eikelenboom
2014-04-16 14:13 ` Ian Campbell
2014-04-16 14:26 ` Sander Eikelenboom
2014-04-16 14:33 ` Ian Campbell
2014-04-16 14:55 ` Sander Eikelenboom
2014-04-16 15:02 ` Ian Campbell
2014-04-16 15:10 ` George Dunlap
2014-04-16 15:20 ` Sander Eikelenboom
2014-04-16 16:27 ` Ian Campbell
2014-04-16 17:04 ` Sander Eikelenboom
2014-04-17 8:07 ` Ian Campbell
2014-04-16 14:29 ` George Dunlap
2014-04-17 18:09 ` Ian Jackson
2014-04-23 13:38 ` Sander Eikelenboom [this message]
2014-04-23 13:42 ` Ian Campbell
2014-04-23 13:49 ` Sander Eikelenboom
2014-04-23 14:12 ` Ian Campbell
2014-04-16 15:19 ` Konrad Rzeszutek Wilk
2014-04-16 15:21 ` Sander Eikelenboom
2014-04-16 17:08 ` Konrad Rzeszutek Wilk
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=1871588644.20140423153802@eikelenboom.it \
--to=linux@eikelenboom.it \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.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.