All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Philipp Hahn <hahn@univention.de>,
	Xen-devel@lists.xen.org, Keir Fraser <keir.fraser@citrix.com>
Subject: Re: [BUG,PATCH] race in xen-block-hotplug
Date: Wed, 15 Jan 2014 09:07:51 +0100	[thread overview]
Message-ID: <52D641D7.8000904@citrix.com> (raw)
In-Reply-To: <52D638B5.5090202@univention.de>

On 15/01/14 08:28, Philipp Hahn wrote:
> Hello,
> 
> we encountered a strange race condition in tools/hotplug/Linux/block,
> which only shows very rarely and only once for the first domain started
> after the host server is started. The complete details are in our
> Bugzilla at <https://forge.univention.org/bugzilla/show_bug.cgi?id=20481>.
> 
> In our case its Xen-4.1.3 (yes I know it's ancient, but the code is
> still the same in current Xen-git) and it only happens for file-backed
> files (in our case a ISO-image as CD-ROM).
> 
>>        # Avoid a race with the remove if the path has been deleted, or
>> »···# otherwise changed from "InitWait" state e.g. due to a timeout
>>         xenbus_state=$(xenstore_read_default "$XENBUS_PATH/state" 'unknown')
>>         if [ "$xenbus_state" != '2' ]
>>         then
>>           release_lock "block"
>>           fatal "Path closed or removed during hotplug add: $XENBUS_PATH state: $xenbus_state"
>>         fi
> 
> The problem is that sometimes the other end (kernel/qemu?) is too slow
> and the device is still in in state 1=Initializing. If that happens, the
> domU stat is aborted and destroyed.
> If the same VM is then started again, it works flawlessly.

This problem only manifests itself with xend and xl from Xen versions <
4.2, since 4.2 onwards libxl waits for the backend to switch to state 2
before launching hotplug scripts.

I would like to avoid having this kind of infinite loop in the block
hotplug script, is there anyway this can be fixed in xend? (which is the
only toolstack that has this problem in upstream versions).

Roger.


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

  reply	other threads:[~2014-01-15  8:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  7:28 [BUG,PATCH] race in xen-block-hotplug Philipp Hahn
2014-01-15  8:07 ` Roger Pau Monné [this message]
2014-01-15 14:24   ` Ian Campbell

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=52D641D7.8000904@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Xen-devel@lists.xen.org \
    --cc=hahn@univention.de \
    --cc=keir.fraser@citrix.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.