From: John Snow <1681439@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1681439] Re: qemu-system-x86_64: hw/ide/core.c:685: ide_cancel_dma_sync: Assertion `s->bus->dma->aiocb == NULL' failed.
Date: Thu, 13 Apr 2017 22:52:09 -0000 [thread overview]
Message-ID: <28e63b3d-a9d5-ffab-c770-2b886782a34a@redhat.com> (raw)
In-Reply-To: 20170412075155.31027.48612.malone@wampee.canonical.com
On 04/12/2017 03:51 AM, Michał Kępień wrote:
> $ tail -20 qemu.log
>
> == ide_cancel_dma_sync ==
>
> ATA Registers:
> cmd 0x06
> feature 0x01
> error 0x00
> nsector 0x00000001
> sector 0x00
> lcyl 0x00
> hcyl 0x00
> hob_feature 0x00
> hob_nsector 0x00
> hob_sector 0x00
> hob_lcyl 0x00
> hob_hcyl 0x00
> select 0x60
> status 0x58
> lba48 0x00000000
> qemu-system-x86_64: hw/ide/core.c:704: ide_cancel_dma_sync: Assertion `s->bus->dma->aiocb == NULL' failed.
> $ grep ^cmd qemu.log | sort | uniq -c
> 128 cmd 0x06
> 151854 cmd 0xc8
> 217496 cmd 0xca
>
> I am happy to help if any further debugging is required.
>
Whoops, I misunderstood exactly how often cancel would be invoked here,
sorry about that. It looks like when DMA is finished and the guest
signals that it's over, we cancel any outstanding DMA just to be safe,
and that'd explain the nearly 400,000 calls in your logs.
However, this looks like it might legitimately be trying to cancel a
TRIM command (I don't know why ...) but we don't clean up after those
properly.
Let's try and see if this doesn't fix your problem:
https://github.com/jnsnow/qemu/commit/57bf2ccdfe8dd35838c1e6642bf9bd76dc9ad1a9
Optionally, you can delete the printf from the last patch if you want.
I'm still a little concerned that your guest is trying to cancel
in-flight commands which I didn't think would happen under normal
circumstances unless some other problem arose, but I think this will
clear up the assert for us.
Thanks,
-John
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1681439
Title:
qemu-system-x86_64: hw/ide/core.c:685: ide_cancel_dma_sync: Assertion
`s->bus->dma->aiocb == NULL' failed.
Status in QEMU:
New
Bug description:
Since upgrading to QEMU 2.8.0, my Windows 7 64-bit virtual machines
started crashing due to the assertion quoted in the summary failing.
The assertion in question was added by commit 9972354856 ("block: add
BDS field to count in-flight requests"). My tests show that setting
discard=unmap is needed to reproduce the issue. Speaking of
reproduction, it is a bit flaky, because I have been unable to come up
with specific instructions that would allow the issue to be triggered
outside of my environment, but I do have a semi-sane way of testing that
appears to depend on a specific initial state of data on the underlying
storage volume, actions taken within the VM and waiting for about 20
minutes.
Here is the shortest QEMU command line that I managed to reproduce the
bug with:
qemu-system-x86_64 \
-machine pc-i440fx-2.7,accel=kvm \
-m 3072 \
-drive file=/dev/lvm/qemu,format=raw,if=ide,discard=unmap \
-netdev tap,id=hostnet0,ifname=tap0,script=no,downscript=no,vhost=on \
-device virtio-net-pci,netdev=hostnet0 \
-vnc :0
The underlying storage (/dev/lvm/qemu) is a thin LVM snapshot.
QEMU was compiled using:
./configure --python=/usr/bin/python2.7 --target-list=x86_64-softmmu
make -j3
My virtualization environment is not really a critical one and
reproduction is not that much of a hassle, so if you need me to gather
further diagnostic information or test patches, I will be happy to help.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1681439/+subscriptions
next prev parent reply other threads:[~2017-04-13 23:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 13:23 [Qemu-devel] [Bug 1681439] [NEW] qemu-system-x86_64: hw/ide/core.c:685: ide_cancel_dma_sync: Assertion `s->bus->dma->aiocb == NULL' failed Michał Kępień
2017-04-10 13:31 ` [Qemu-devel] [Bug 1681439] " Michał Kępień
2017-04-10 21:17 ` John Snow
2017-04-10 22:08 ` John Snow
2017-04-11 7:45 ` Michał Kępień
2017-04-11 22:16 ` John Snow
2017-04-12 7:51 ` Michał Kępień
2017-04-13 22:52 ` John Snow [this message]
2017-04-14 6:38 ` Michał Kępień
2017-09-25 4:34 ` Michał Kępień
2017-09-25 17:24 ` John Snow
2017-09-25 17:33 ` Thomas Huth
2018-08-21 6:44 ` Thomas Huth
2018-10-21 4:17 ` Launchpad Bug Tracker
2020-06-16 15:52 ` Bugs SysSec
2020-07-11 18:34 ` Alexander Bulekov
2020-07-27 22:37 ` John Snow
2020-07-28 1:11 ` John Snow
2020-07-28 1:29 ` John Snow
2020-11-04 23:48 ` John Snow
2020-11-09 10:41 ` [Bug 1681439] Re: dma_blk_cb leaks memory map handles on misaligned IO Stefan Hajnoczi
2020-11-09 16:07 ` John Snow
2021-05-11 5:34 ` Thomas Huth
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=28e63b3d-a9d5-ffab-c770-2b886782a34a@redhat.com \
--to=1681439@bugs.launchpad.net \
--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).