Activity log for bug #1681439

Date Who What changed Old value New value Message
2017-04-10 13:23:46 Michał Kępień bug added bug
2017-04-10 22:08:46 John Snow qemu: assignee John Snow (jnsnow)
2017-04-11 07:45:58 Michał Kępień attachment added Output of "bt full" when the assertion fails https://bugs.launchpad.net/qemu/+bug/1681439/+attachment/4860013/+files/bt-full.log
2017-09-25 17:33:47 Thomas Huth qemu: status New Incomplete
2018-08-21 06:44:05 Thomas Huth qemu: assignee John Snow (jnsnow)
2018-10-21 04:17:26 Launchpad Janitor qemu: status Incomplete Expired
2020-06-16 15:52:59 Bugs SysSec attachment added ide_assert1.zip https://bugs.launchpad.net/qemu/+bug/1681439/+attachment/5384437/+files/ide_assert1.zip
2020-06-16 15:53:46 Bugs SysSec qemu: status Expired New
2020-07-27 22:37:59 John Snow qemu: status New Confirmed
2020-07-27 22:38:01 John Snow qemu: assignee John Snow (jnsnow)
2020-07-28 01:29:34 John Snow qemu: status Confirmed In Progress
2020-11-04 23:47:12 John Snow qemu: assignee John Snow (jnsnow)
2020-11-04 23:47:17 John Snow qemu: status In Progress Confirmed
2020-11-04 23:50:34 John Snow summary qemu-system-x86_64: hw/ide/core.c:685: ide_cancel_dma_sync: Assertion `s->bus->dma->aiocb == NULL' failed. dma_blk_cb leaks memory map handles on misaligned IO
2020-11-04 23:54:13 John Snow 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. Maintainer Edit: The functions in dma-helpers mismanage misaligned IO, badly enough to cause an infinite loop where no progress can be made. This allows the IDE state machine to get wedged such that cancelling DMA can fail; because the DMA helpers have bodged the state of the DMA transfer. See Comment #15 for the in-depth analysis. I've updated the name of this bug to reflect the current status as I understand it. --js Original report: 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.
2021-05-11 05:33:13 Thomas Huth tags fuzzer
2021-05-11 05:34:41 Thomas Huth qemu: status Confirmed Expired
2021-05-11 05:34:42 Thomas Huth bug watch added https://gitlab.com/qemu-project/qemu/-/issues/259