From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYJzd-00048C-Mu for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYJzX-0005o1-5D for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:46:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYJzW-0005np-S3 for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:46:27 -0400 Message-ID: <1397155607.28469.36.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Thu, 10 Apr 2014 21:46:47 +0300 In-Reply-To: <5346E53B.8020708@redhat.com> References: <534694D3.9040504@beyond.pl> <1397137408.28469.3.camel@localhost.localdomain> <5346C5BF.8030706@beyond.pl> <1397147966.28469.28.camel@localhost.localdomain> <5346DFBC.2020701@redhat.com> <5346E53B.8020708@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] qemu 2.0.0-rc2 crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cole Robinson Cc: Marcin =?UTF-8?Q?Gibu=C5=82a?= , qemu-devel@nongnu.org, Stefan Hajnoczi , Andreas =?ISO-8859-1?Q?F=E4rber?= On Thu, 2014-04-10 at 14:38 -0400, Cole Robinson wrote: > On 04/10/2014 02:15 PM, Cole Robinson wrote: > > On 04/10/2014 12:39 PM, Marcel Apfelbaum wrote: > >> On Thu, 2014-04-10 at 18:24 +0200, Marcin Gibu=C5=82a wrote: > >>> W dniu 2014-04-10 15:43, Marcel Apfelbaum pisze: > >>>> On Thu, 2014-04-10 at 14:55 +0200, Marcin Gibu=C5=82a wrote: > >>>>> Hi, > >>>>> > >>>>> I've been playing with QEMU 2.0-rc2 and found a crash that isn't = there > >>>>> in 1.7.1. > >>>> Hi Marcin, > >>>> Thanks for reporting the bug! > >>>> > >>>> Do you have a development environment? > >>>> If you do, and the reproduction is fast (and you already have a se= tup), > >>>> a git bisect to find the problematic commit would be appreciated, > >>> > >>> Hi, > >>> > >>> yes, it's on development environment. If you could point me to some= =20 > >>> quick guide to bisecting qemu, I'll be happy to do it. > >> > >> Sure! Thanks for helping. > >> > >> 1. Start: > >> git bisect start > >> git bisect good (Ex: v1.7.1) > >> git bisect bad (Ex: HEAD) > >> 2. Git will checkout commits for you and you have to check and answe= r: > >> git bisect good or git bisect bad=20 > >> 3. Git will show you the first bad commit. > >> > >> A more detailed version here: > >> http://git-scm.com/book/en/Git-Tools-Debugging-with-Git > >> Look for git-bisect. > >=20 > > Actually I was just independently bisecting this :) Culprit is: > >=20 > > commit 9561fda8d90e176bef598ba87c42a1bd6ad03ef7 > > Author: Stefan Hajnoczi > > Date: Wed Mar 19 08:58:55 2014 +0100 > >=20 > > qom: Make QOM link property unref optional > >=20 > > Simple reproducer: > >=20 > > ./x86_64-softmmu/qemu-system-x86_64 -qmp unix:./qmp.sock,server > >=20 > > ./scripts/qmp/qmp-shell ./qmp.sock > > (QEMU) qom-list path=3D//machine/i440fx/pci.0/child[2] > >=20 > > Seems like trying to qom-list any link property will crash > >=20 >=20 > I think this is the fix: >=20 > diff --git a/qom/object.c b/qom/object.c > index f4de619..9a730e7 100644 > --- a/qom/object.c > +++ b/qom/object.c > @@ -1225,7 +1225,8 @@ Object *object_resolve_path_component(Object *par= ent, cons > } >=20 > if (object_property_is_link(prop)) { > - return *(Object **)prop->opaque; > + LinkProperty *lprop =3D prop->opaque; > + return *lprop->child; Seems OK to me, but I am not so familiar with this part... maybe we'll get a feedback from the maintainers. Thanks, Marcel > } else if (object_property_is_child(prop)) { > return prop->opaque; > } else { >=20 > The commit mentioned above changed the type of opaque for link properti= es, but > forgot to update this site. I'll send a top level patch. >=20 > - Cole >=20