From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: Xen crashing when killing a domain with no VCPUs allocated Date: Mon, 21 Jul 2014 11:12:59 +0100 Message-ID: <53CCE7AB.5060901@eu.citrix.com> References: <53C920DD.6060300@linaro.org> <1405701560.14973.1.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1405701560.14973.1.camel@kazak.uk.xensource.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: Ian Campbell , Julien Grall Cc: jgross@suse.com, Stefano Stabellini , Dario Faggioli , Tim Deegan , george.dunlap@citrix.com, xen-devel , "jbeulich@suse.com" List-Id: xen-devel@lists.xenproject.org On 07/18/2014 05:39 PM, Ian Campbell wrote: > On Fri, 2014-07-18 at 14:27 +0100, Julien Grall wrote: >> Hi all, >> >> I've been played with the function alloc_vcpu on ARM. And I hit one case >> where this function can failed. >> >> During domain creation, the toolstack will call DOMCTL_max_vcpus which may >> fail, for instance because alloc_vcpu didn't succeed. In this case, the >> toolstack will call DOMCTL_domaindestroy. And I got the below stack trace. >> >> It can be reproduced on Xen 4.5 (and I also suspect Xen 4.4) by returning >> in an error in vcpu_initialize. >> >> I'm not sure how to correctly fix it. > I think a simple check at the head of the function would be ok. > > Alternatively perhaps in sched_mode_domain, which could either detect > this or could detect a domain in pool0 being moved to pool0 and short > circuit. > > [...] >> (XEN) [<00226870>] sched_move_domain+0x3cc/0x42c >> (XEN) [<0020925c>] domain_kill+0xc8/0x178 > This call path surprised me but it is from: > > commit bac6334b51d9bcfe57ecf4a4cb5288348fcf044a > Author: Juergen Gross > Date: Tue May 20 15:55:42 2014 +0200 > > move domain to cpupool0 before destroying it And this is the second unforseen hypervisor crash that happened as a side effect of this patch. Obviously I need to be more of a bastard as a mainainer. -George