From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: crash in nvmx_vcpu_destroy Date: Thu, 21 Feb 2013 15:19:19 +0100 Message-ID: <20130221141919.GA20093@aepfle.de> References: <20130220145823.GA18129@aepfle.de> <20130221110119.GE24051@ocelot.phlegethon.org> <20130221111000.GG24051@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130221111000.GG24051@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: Eddie Dong , Jun Nakajima , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Feb 21, Tim Deegan wrote: > At 11:01 +0000 on 21 Feb (1361444479), Tim Deegan wrote: > > (Cc'ing the vmx maintainers) > > > > At 15:58 +0100 on 20 Feb (1361375903), Olaf Hering wrote: > > > while doing "while xm migrate --live domU localhost;do sleep 1;done" I > > > just got the crash shown below. And it can be reproduced. > > > > > > The guest has 2 vcpus and 512mb, it runs pvops 3.7.9 > > > > Anything interesting printed before the crash? My best guess by code > > inspection is that nvmx->launched_list never got initialized, because of > > some failure in vcpu init. > > > > Also, if you have the xen-syms for this image, can you extract a > > file/line-number for the crashing %rip (ffff82c4c01dd197)? > > I'd expect it to be vvmx.c:150 or thereabouts. > > > > And thirdly, can you try the attached patch? > > Oops - not sure what I tested before , but that one doesn't even > compile! Try this instead. This patch fixes the crash for me. Thanks. Olaf > diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c > index 4f3f94d..5d00ff7 100644 > --- a/xen/arch/x86/hvm/vmx/vvmx.c > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > @@ -147,10 +147,13 @@ void nvmx_vcpu_destroy(struct vcpu *v) > nvcpu->nv_n2vmcx = NULL; > } > > - list_for_each_entry_safe(item, n, &nvmx->launched_list, node) > + if ( nvmx->launched_list.next ) > { > - list_del(&item->node); > - xfree(item); > + list_for_each_entry_safe(item, n, &nvmx->launched_list, node) > + { > + list_del(&item->node); > + xfree(item); > + } > } > > if ( v->arch.hvm_vmx.vmread_bitmap )