[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xl shutdown --wait "racy"



On Wed, 2014-04-23 at 15:49 +0200, Sander Eikelenboom wrote:
> Wednesday, April 23, 2014, 3:42:32 PM, you wrote:
> 
> > On Wed, 2014-04-23 at 15:38 +0200, Sander Eikelenboom wrote:
> >> 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@xxxxxxxxxx> 
> >> >> 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).
> 
> > It only calls libxl_evenable_domain_death for domains which it should
> > wait for, and by construction the number of deaths passed to
> > wait_for_domain_deaths is equal to the number of domains for which
> > libxl_evenable_domain_death was called.
> 
> Also if i do two times "xl shutdown --wait" with a script in parallel ?
> 
> That would give a event for the guest that shuts down the fastest ..

Both instance of xl are independent and will see the events for the
domain they are interested in, irrespecitve of whether some other xl is
also waiting for hte same domain to die.

>  but wouldn't 
> the "wait_for_domain_deaths" for the other guest also respond to that (and 
> return too early) ?

I don't think libxl will fire events for domains which the particular xl
instance didn't express an interest in.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.