WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] domain id number on xen unstable

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] domain id number on xen unstable
From: Andrew Lyon <andrew.lyon@xxxxxxxxx>
Date: Mon, 9 Mar 2009 10:16:03 +0000
Cc:
Delivery-date: Mon, 09 Mar 2009 03:16:47 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=6KXgrjweyRxB1jfYoP3aGii5Oz1/IV9EtkpnDpO7JGw=; b=VCZSRUmGvYYFUlJX3/MDigFUGFTtgW7JRwuHUVzagCFWv+ohbK1bYfEihnut549wFY 3LYU4r00PDrxrJqPNPw5DVcNgqxqpMiwm9eUH08d+x2+NpF3WK4d9FUzKa57rtOuLjeU SSzgG3HT+5ERjrbQPQk+ohJAZwtLQxlOMkuEE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=wFK14pzb1XlRR339uhcB/3HfotmIJZT4yDSboK3Zxxyey/zFFCi9B2yhqviLjqtHwJ 2bNSen+0RdtOnMpVHWKFztkfbQodNSRpv+rzFhSzhf4VYc+euQugytgWOGA5AuoaHhJ/ Ckske4XN+cWMsXTyxYIP0/etw+fFBlrykeEAQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5D99843.4775%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <f4527be0903080732l58b62959tec8c4eaca8bd4653@xxxxxxxxxxxxxx> <C5D99843.4775%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sun, Mar 8, 2009 at 3:44 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> On 08/03/2009 14:32, "Andrew Lyon" <andrew.lyon@xxxxxxxxx> wrote:
>
>> I've also noticed that if i shutdown the domain cleanly (ie from
>> inside windows) then I can start it again without any problems, but if
>> i have to use xm destroy then when I next try to start the domain the
>> xm process hangs, if I ctrl+c the xm process the domain is listed and
>> paused, I can unpause it and it seems to work ok.
>>
>> xenstore-ls shows that some of the domain devices etc are not removed,
>> should they be when it is destroyed?
>
> What changeset of xen-unstable are you running and when did you start seeing
> this? I have my suspicions about changeset 19250, which was checked in on
> Monday -- you could try reverting it (hg revert 19250), re-install dom0
> tools, and see if that helps.
>
>  -- Keir

Keir,

I tried that but it didn't help, however I noticed that there were
several xen-hotplug-cleanup scripts running, and that script has
changed between 3.3.1 and unstable, on my 3.3.1 system I can run the
script and it exits very quickly, but on my unstable system the script
can only be run once, after that it hangs trying to get the lock, I
added a couple of echo's to the script as you can see below, only the
first one is executed, the second is not and as the rest of the script
is not run the lock is never released.

So the offending line is vm=$(xenstore-read "/local/domain/${path_array[2]}/vm")

Andy

#! /bin/bash

dir=$(dirname "$0")
. "$dir/xen-hotplug-common.sh"

# Claim the lock protecting /etc/xen/scripts/block.  This stops a race whereby
# paths in the store would disappear underneath that script as it attempted to
# read from the store checking for device sharing.
# Any other scripts that do similar things will have to have their lock
# claimed too.
# This is pretty horrible, but there's not really a nicer way of solving this.
claim_lock "block"
# split backend/DEVCLASS/VMID/DEVID on slashes
path_array=( ${XENBUS_PATH//\// } )
# get /vm/UUID path
echo "echo test 1"
vm=$(xenstore-read "/local/domain/${path_array[2]}/vm")
echo "echo test 2"
# construct /vm/UUID/device/DEVCLASS/DEVID
vm_dev="$vm/device/${path_array[1]}/${path_array[3]}"
# remove device frontend store entries
xenstore-rm -t \
  $(xenstore-read "$XENBUS_PATH/frontend" 2>/dev/null) 2>/dev/null || true

# remove device backend store entries
xenstore-rm -t "$XENBUS_PATH"        2>/dev/null || true
xenstore-rm -t "error/$XENBUS_PATH"  2>/dev/null || true

# remove device path from /vm/UUID
xenstore-rm -t "$vm_dev" 2>/dev/null || true
release_lock "block"


>
>
>

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