From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYJsM-0003wY-J9 for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYJsH-00030t-7F for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:39:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYJsG-00030n-VF for qemu-devel@nongnu.org; Thu, 10 Apr 2014 14:38:57 -0400 Message-ID: <5346E53B.8020708@redhat.com> Date: Thu, 10 Apr 2014 14:38:51 -0400 From: Cole Robinson MIME-Version: 1.0 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> In-Reply-To: <5346DFBC.2020701@redhat.com> Content-Type: text/plain; charset=UTF-8 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: Marcel Apfelbaum , =?UTF-8?B?TWFyY2luIEdpYnXFgmE=?= Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= 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 th= ere >>>>> 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 setu= p), >>>> 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 answer: >> 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 I think this is the fix: 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 *paren= t, cons } if (object_property_is_link(prop)) { - return *(Object **)prop->opaque; + LinkProperty *lprop =3D prop->opaque; + return *lprop->child; } else if (object_property_is_child(prop)) { return prop->opaque; } else { The commit mentioned above changed the type of opaque for link properties= , but forgot to update this site. I'll send a top level patch. - Cole