qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>,
	Kashyap Chamarthy <kchamart@redhat.com>,
	qemu-devel@nongnu.org
Cc: armbru@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash
Date: Wed, 15 Jun 2016 10:10:06 -0600	[thread overview]
Message-ID: <57617DDE.6080306@redhat.com> (raw)
In-Reply-To: <57617690.4070401@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

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.
> 
> 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      reply	other threads:[~2016-06-15 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15  9:58 [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash Kashyap Chamarthy
2016-06-15 12:02 ` [Qemu-devel] [Qemu-block] " Kashyap Chamarthy
2016-06-15 15:17 ` [Qemu-devel] " Max Reitz
2016-06-15 15:38   ` Eric Blake
2016-06-15 16:10     ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57617DDE.6080306@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kchamart@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).