Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Add timeout to xenconsole to fix race condition

To: Anthony Liguori <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Add timeout to xenconsole to fix race condition in xm create -c
From: Christian Limpach <christian.limpach@xxxxxxxxx>
Date: Wed, 31 Aug 2005 11:31:43 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 31 Aug 2005 10:29:51 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tdTINxZj5p2GkXTj/Vp90V30iWA4hR8Vbl8JWi+49IGid3pHC6o5O3YVlsWUPpjpntkt3AiTfyTsYzCC/dkmhskRSLpumObNmwl/R5gBE8Y2CLpgPtZL7i1L/1kGwi+52D6vrXZFODypS7THQ0OWvCIY+dL5LuFdP00G4vlm+Xk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4314D5CC.3020107@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4314D5CC.3020107@xxxxxxxxxx>
Reply-to: Christian.Limpach@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 8/30/05, Anthony Liguori <aliguori@xxxxxxxxxx> wrote:
> This should address the problems people are having now.
> 
> Wait a little bit for tty to appear.  There is a race condition that
> occurs after xend creates a domain.  Since no event triggers consoled to
> re-examine existing domains, we'll often not see the new pty by the time
> we're here.  Since consoled sleeps for 2 second periods, a 5 second
> timeout should keep us covered.

I've applied this with slighly changed comments since xenconsoled now
uses watches and should setup the tty almost immediately.  The race
still exists though.

> A xenstore watch isn't much better since we don't want to block forever
> if given an invalid domain or worse yes, a domain that someone else has
> connected to.

It would improve the responsiveness but a timeout is still needed for
the reasons you pointed out.

Finally, there's still an issue with storing the console tty
information in /console/<domid> -- there might be stale data from a
previous domain having the same domid and the client might run before
the console daemon has rewritten the tty entry.  I think this is best
fixed by moving the console tty information into the domain's /domain
tree.

    christian

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

<Prev in Thread] Current Thread [Next in Thread>