From: Ian Campbell Subject: Re: libxl: cannot start guest Date: Tue, 22 May 2012 15:20:22 +0100 Message-ID: <1337696422.10118.134.camel@zakaz.uk.xensource.com> References: <4FB64BDC.6010801@amd.com> <1337347821.22316.122.camel@zakaz.uk.xensource.com> <4FB65B61.7000902@amd.com> <4FB66FED.5080704@amd.com> <1337356698.22316.138.camel@zakaz.uk.xensource.com> <4FBA185A.3080306@amd.com> <1337602541.24660.105.camel@zakaz.uk.xensource.com> <4FBA3EC8.3060104@amd.com> <1337608191.24660.138.camel@zakaz.uk.xensource.com> <4FBA62F7.9080308@gmx.de> <1337615835.24660.169.camel@zakaz.uk.xensource.com> <4FBB882B.1020902@amd.com> <1337691225.10118.114.camel@zakaz.uk.xensource.com> <4FBB9228.70001@gmx.de> <1337692887.10118.127.camel@zakaz.uk.xensource.com> <4FBB9C9F.4090401@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4FBB9C9F.4090401@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Christoph Egger Cc: Daniel De Graaf , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-05-22 at 15:03 +0100, Christoph Egger wrote: > On 05/22/12 15:21, Ian Campbell wrote: > > > On Tue, 2012-05-22 at 14:18 +0100, Christoph Egger wrote: > >> I thinkIn xs_talkv() something must fail. > >> > >>> The only thing which springs to mind is that it may generate an > >>> @IntroduceDomain watch event. However xl is single threaded so we won't > >>> process that event until we unwind to whichever point we do an event > >>> loop iteration, in which case the corruption would have to happen later > >>> than right after xs_introduce_domain(). > >>> > >>> Did you manage to determine if "Bad file descriptor" was due to it being > >>> closed vs. the value being corrupted? > >> > >> My suspicion is that > >> > >> if (msg.type != type) > >> > >> in xs_talkv() is true. > >> > > > > Yes, that definitely seems worth investigating. > > > Ok, I got it. > > xenstored crashes due to dereferencing NULL pointer. Huh, xenstore has materially changed for quite a while (since February). > In xenstored_domain.c, map_interface() *xcg_handle is NULL > and in xc_gnttab.c, xc_gnttab_map_grant_ref() it is dereferenced. This comes from 24757:aae516b78fce. Diego and Alex aren't around any more but CCing Daniel in case he remembers anything. I guess the original xc_gnttab_open which sets *xcg_handle is failing for you, I suppose that is to be expected on NetBSD? Either way it should still work after this has failed. All the >= checks on *xcg_handle seem wrong to me. Really they should be checking != NULL, since otherwise they don't actually discriminate the two cases! Does making that change help? Ian.