Received: from eggs.gnu.org ([2001:4830:134:3::10]:33574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5EcX-00013p-EJ for qemu-devel@nongnu.org; Mon, 20 Jan 2014 08:10:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5EcR-0002Sl-3I for qemu-devel@nongnu.org; Mon, 20 Jan 2014 08:10:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5EcQ-0002Sd-RX for qemu-devel@nongnu.org; Mon, 20 Jan 2014 08:10:23 -0500 From: Markus Armbruster References: <87ppnq6h5y.fsf@blackfin.pond.sub.org> <52D92514.80600@redhat.com> <87d2jmx1ti.fsf@blackfin.pond.sub.org> Date: Mon, 20 Jan 2014 14:10:18 +0100 In-Reply-To: <87d2jmx1ti.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Mon, 20 Jan 2014 13:41:45 +0100") Message-ID: <87txcyu7d1.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] device_add error handling regressed in v1.5.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: Paolo Bonzini , qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= Markus Armbruster writes: > Paolo Bonzini writes: > >> Il 17/01/2014 11:23, Markus Armbruster ha scritto: >>> Watch this: >>> >>> $ upstream-qemu -nodefaults -S -display none -monitor stdio >>> QEMU 1.7.50 monitor - type 'help' for more information >>> (qemu) device_add e1000,netdev=xxx >>> Property 'e1000.netdev' can't find value 'xxx' >>> (qemu) info qtree > [...] >>> Segmentation fault (core dumped) >>> >>> Even though device_add failed, it still created a node in the qtree! >>> >>> Same issue observed with scsi-hd. Looks like a qdev problem, not a >>> device problem. >>> >>> git-bisect blames this one: >>> >>> e0a83fc2c1582dc8d4453849852ebe6c258b7c3a is the first bad commit >>> commit e0a83fc2c1582dc8d4453849852ebe6c258b7c3a >>> Author: Paolo Bonzini >>> Date: Tue Apr 2 15:50:00 2013 +0200 >>> >>> qom: do nothing on unparent of object without parent >>> >>> Otherwise, device_unparent will fail to get a canonical path of >>> the object. >>> >>> Signed-off-by: Paolo Bonzini >>> Message-id: 1364910600-3418-1-git-send-email-pbonzini@redhat.com >>> Signed-off-by: Anthony Liguori >>> >> >> I think Amos had a fix for this. > > Amos, do you? Found it: "[PATCH v2] qdev: add the device to the QOM tree before using it to set a link" seems to fix it.