From: John Levon Subject: Re: [PATCH] Fix xenconsole's "Could not read tty from store" Date: Mon, 17 Dec 2007 16:42:46 +0000 Message-ID: <20071217164246.GF4172@totally.trollied.org.uk> References: <20071217112254.GA5240@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20071217112254.GA5240@implementation.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Dec 17, 2007 at 11:22:54AM +0000, Samuel Thibault wrote: > I was getting intermittent "Could not read tty from store" when creating > domains. This is because tools/console/daemon/io.c:domain_create_tty() > seems to expect openpty() to initiaze term, but it's the converse: > openpty expects to be given term parameters and doesn't touch it, so > that term mostly contains random data when given to tcsetattr, and thus > console creation failure. Here is a patch that fixes this. I already sent out a patch for this very code to the list for testing last week. Please can I get some testing of that patch?? It'll need merging with Samuel's patch I suppose. Note that we don't see his problem on Solaris as the openpty() implementation above gets the semantics wrong and we get away with it. > + if (tcgetattr(master, &term) < 0) { > + err = errno; Please use the slave not the master. It doesn't matter on Linux but it's critical on Solaris. If it helps I can send out an updated patch merging these fixes. Will you test it if so Samuel? regards john