qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Qemu-devel@nongnu.org" <Qemu-devel@nongnu.org>,
	Alberto Garcia <berto@igalia.com>,
	qemu block <qemu-block@nongnu.org>, Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] help debugging throttle crash
Date: Mon, 3 Apr 2017 09:07:02 -0500	[thread overview]
Message-ID: <13fddf65-e573-cf01-593d-6b02a3071721@redhat.com> (raw)

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

I'm trying to investigate
https://bugzilla.redhat.com/show_bug.cgi?id=1428810, which is a crash
that can be easily reproduced with the following steps:

$ ./x86_64-softmmu/qemu-system-x86_64 -nodefaults -nographic -qmp stdio
-device virtio-scsi-pci,bus=pci.0  -drive
id=drive_image2,if=none,format=raw,file=file2,bps=512000,iops=100,group=foo
-device scsi-hd,id=image2,drive=drive_image2 -drive
id=drive_image3,if=none,format=raw,file=file3,bps=512000,iops=100,group=foo
-device scsi-hd,id=image3,drive=drive_image3
{'execute':'qmp_capabilities'}
{'execute':'device_del','arguments':{'id':'image3'}}
{'execute':'system_reset'}

At this point, it looks like no one is calling
throttle_group_unregister_blk() as a result of the 'device_del', which
leaves stale memory around (I was able to confirm this under gcc - a
breakpoint on that function never fires); then the 'system_reset' causes
next_throttle_token() to dereference the stale memory and crash.
However, I have no idea where the unplug action should be removing the
BB from the throttle group.  Is it as simple as adding it to
blk_io_unplug(), or will that be violating other constraints on making
sure the throttle group is first drained before removing the BB from the
group as one of the final steps during its hot unplug?

-- 
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:[~2017-04-03 14:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 14:07 Eric Blake [this message]
2017-04-03 15:24 ` [Qemu-devel] help debugging throttle crash Alberto Garcia
2017-04-06 18:57   ` Eric Blake

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=13fddf65-e573-cf01-593d-6b02a3071721@redhat.com \
    --to=eblake@redhat.com \
    --cc=Qemu-devel@nongnu.org \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@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).