Skip to contentSkip to conversation

block: qcow2: dd segfaults qemu

Qemu-devel Luiz Capitulino 1 participant 1 message Aug 31, 2011

lore
Share & tools
lore
#0 lore raw

Hi Kevin,

Test case is:

1. Create a 100MB logical volume and create a 200MB qcow2 image on it
2. Run qemu with the following command-line:

   # qemu -drive file=disks/test.img,if=virtio,cache=writeback,aio=native \
          -drive file=/dev/vg_doriath/kvmtest,if=virtio -enable-kvm -m 1G \
          -monitor stdio -netdev type=tap,id=guest0,script=qemu-ifup-switch \
          -device virtio-net-pci,netdev=guest0 -cpu host

3. Log into the guest and run dd to write 150MB on /dev/vdb
4. The VM will stop
5. Assign extra space to the logical volume, say 200MB
6. Type 'cont' in the monitor

Qemu will crash or hang. Sometimes I also get a crash while dd is running on step 3.

I bisected this and the culprit is:

68d100e905453ebbeea8e915f4f18a2bd4339fe8 is the first bad commit commit 68d100e905453ebbeea8e915f4f18a2bd4339fe8

Author: Kevin Wolf <[email protected]>
Date:   Thu Jun 30 17:42:09 2011 +0200

qcow2: Use coroutines

:040000 040000 6b63724de0bc815f285944e4655901718a6676b1 4ebe5ba4d925821310cf3599e8bb7b95b890c7f7 M block