From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDDOW-00037G-JC for qemu-devel@nongnu.org; Wed, 15 Jun 2016 12:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDDOU-000270-CN for qemu-devel@nongnu.org; Wed, 15 Jun 2016 12:10:19 -0400 References: <20160615095831.h3da5z7jm3xmwtog@eukaryote> <786ed869-7737-4e95-4489-7acf54dad9c6@redhat.com> <57617690.4070401@redhat.com> From: Eric Blake Message-ID: <57617DDE.6080306@redhat.com> Date: Wed, 15 Jun 2016 10:10:06 -0600 MIME-Version: 1.0 In-Reply-To: <57617690.4070401@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BtjKRuaj5dq9fCSnbm8o5Rdacn2nULblT" Subject: Re: [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , Kashyap Chamarthy , qemu-devel@nongnu.org Cc: armbru@redhat.com, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BtjKRuaj5dq9fCSnbm8o5Rdacn2nULblT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/15/2016 09:38 AM, Eric Blake wrote: > On 06/15/2016 09:17 AM, Max Reitz wrote: >> On 15.06.2016 11:58, Kashyap Chamarthy wrote: >>> Seems like supplying "qcow2" file BlockdevDriver option to QMP >>> `blockdev-add` results in a SIGSEGV: >>> >>> [...] >>> Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation = fault. >>> 0x0000555555a0121f in visit_type_BlockdevRef () >>> [...] >>> >>> Reproducer >>> ---------- >> >> Even simpler reproducer: >> >> {'execute':'blockdev-add','arguments':{'options':{'driver':'raw'}}} >> >> Seems like a QAPI problem to me, and bisecting yields >> dbf11922622685934bfb41e7cf2be9bd4a0405c0 as the culprit. >=20 > I'm looking into it. Thanks for the testcase. Okay, the problem is based on error handling - you have a missing 'file' argument. That patch consolidated things to do two things at once instead of two calls where the second was skipped if the first failed; and now ends up dereferencing NULL. I didn't notice or test it at the time, so I get to enhance the testsuite as part of my patch. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BtjKRuaj5dq9fCSnbm8o5Rdacn2nULblT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXYX3eAAoJEKeha0olJ0NqdkYH/2xVYDpwXiBLJqX6A8Gyh7k6 xjp1uh55IcGoDSUc7/rvT3iqJUBVPiNYS5iI8yFDfOceXhusQFcAUyoh+nNxXZpk DnEIOjzhWWLMdKvOAaLCgHPSZ0RsgR+4u9ggNrc4jrLBXEP7micgBn7yjC5bhoxW fR6hteVCivRmVd9noMe8zmLNVvsdm3wHngGiq1EpiUWw8rMdRwBDw+8mupiFY8Cw wE8gnIFbmlCRUX6M3mrr8AeKEb+/XKGDvxxt+KjmodafVTKMFL24HRUvLZvGopvW RBq8nl4toxxvxeHIYYRd1JjJZY9Sx30KG8UBx5bv09msJPpxR9LIWM2ZqkklCJc= =nzpw -----END PGP SIGNATURE----- --BtjKRuaj5dq9fCSnbm8o5Rdacn2nULblT--