All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Limpach <christian.limpach@gmail.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Add timeout to xenconsole to fix race condition in xm create -c
Date: Wed, 31 Aug 2005 11:31:43 +0100	[thread overview]
Message-ID: <3d8eece20508310331244b808@mail.gmail.com> (raw)
In-Reply-To: <4314D5CC.3020107@us.ibm.com>

On 8/30/05, Anthony Liguori <aliguori@us.ibm.com> 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

  reply	other threads:[~2005-08-31 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-30 21:55 [PATCH] Add timeout to xenconsole to fix race condition in xm create -c Anthony Liguori
2005-08-31 10:31 ` Christian Limpach [this message]
2005-08-31 20:42   ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2005-08-31  5:54 Nakajima, Jun

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=3d8eece20508310331244b808@mail.gmail.com \
    --to=christian.limpach@gmail.com \
    --cc=Christian.Limpach@cl.cam.ac.uk \
    --cc=aliguori@us.ibm.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.