Created attachment 1269488 [details] test-suite.log Description of problem: A test in the libguestfs test suite fails with: qemu-system-x86_64: /builddir/build/BUILD/qemu-2.9.0-rc2/block/io.c:948: bdrv_co_do_copy_on_readv: Assertion `child->perm & (BLK_PERM_WRITE_UNCHANGED | BLK_PERM_WRITE)' failed. The test is: https://github.com/libguestfs/libguestfs/blob/master/tests/regressions/rhbz1232192.sh which is a regression test for bug 1232192. Version-Release number of selected component (if applicable): qemu-2.9.0-0.1.rc2.fc26.x86_64 How reproducible: 100% Steps to Reproduce: 1. Run 'make check-direct' in the libguestfs test suite. More information including the exact command line can be found in the attached log file.
The qemu command line is: /usr/bin/qemu-kvm \ -global virtio-blk-pci.scsi=off \ -nodefconfig \ -enable-fips \ -nodefaults \ -display none \ -machine accel=kvm:tcg \ -cpu host \ -m 2000 \ -no-reboot \ -rtc driftfix=slew \ -no-hpet \ -global kvm-pit.lost_tick_policy=discard \ -kernel /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/kernel \ -initrd /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/initrd \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -device virtio-scsi-pci,id=scsi \ -drive file=/home/rjones/d/libguestfs/tmp/v2vovld3c613.qcow2,cache=unsafe,discard=unmap,format=qcow2,copy-on-read=on,id=hd0,if=none \ -device scsi-hd,drive=hd0 \ -drive file=/home/rjones/d/libguestfs/tmp/v2vovl10d0af.qcow2,cache=unsafe,discard=unmap,format=qcow2,copy-on-read=on,id=hd1,if=none \ -device scsi-hd,drive=hd1 \ -drive file=/home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \ -device scsi-hd,drive=appliance \ -device virtio-serial-pci \ -serial stdio \ -device sga \ -chardev socket,path=/run/user/1000/libguestfs7XpIFo/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -netdev user,id=usernet,net=169.254.0.0/16 \ -device virtio-net-pci,netdev=usernet \ -append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdc selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color guestfs_identifier=v2v'
The minimal reproducer appears to be: #!/bin/bash set -e set -x rm -f /tmp/blank-disk.img truncate -s 1M /tmp/blank-disk.img qemu-img create -b /tmp/blank-disk.img -f qcow2 /tmp/ovl1.qcow2 /usr/bin/qemu-system-x86_64 \ -device virtio-scsi-pci,id=scsi \ -drive file=/tmp/ovl1.qcow2,cache=unsafe,discard=unmap,format=qcow2,copy-on-read=on,id=hd0,if=none \ -device scsi-hd,drive=hd0 ----------- When run this prints: + rm -f /tmp/blank-disk.img + truncate -s 1M /tmp/blank-disk.img + qemu-img create -b /tmp/blank-disk.img -f qcow2 /tmp/ovl1.qcow2 Formatting '/tmp/ovl1.qcow2', fmt=qcow2 size=1048576 backing_file=/tmp/blank-disk.img encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 + /usr/bin/qemu-system-x86_64 -device virtio-scsi-pci,id=scsi -drive file=/tmp/ovl1.qcow2,cache=unsafe,discard=unmap,format=qcow2,copy-on-read=on,id=hd0,if=none -device scsi-hd,drive=hd0 qemu-system-x86_64: /builddir/build/BUILD/qemu-2.9.0-rc2/block/io.c:948: bdrv_co_do_copy_on_readv: Assertion `child->perm & (BLK_PERM_WRITE_UNCHANGED | BLK_PERM_WRITE)' failed. /tmp/test.sh: line 15: 6880 Aborted (core dumped) /usr/bin/qemu-system-x86_64 -device virtio-scsi-pci,id=scsi -drive file=/tmp/ovl1.qcow2,cache=unsafe,discard=unmap,format=qcow2,copy-on-read=on,id=hd0,if=none -device scsi-hd,drive=hd0
I suggest raising it on qemu-devel since we are still in rc phase
https://lists.nongnu.org/archive/html/qemu-devel/2017-04/msg01096.html Kevin posted a fix which works for me: https://lists.nongnu.org/archive/html/qemu-devel/2017-04/msg01192.html
The upstream commit is 1bf03e66fd03af46ff0f98dd04b6e28f432ac1e3.
https://koji.fedoraproject.org/koji/taskinfo?taskID=18852635
qemu-2.9.0-0.2.rc3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0d191d9d55
qemu-2.9.0-0.2.rc3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0d191d9d55
qemu-2.9.0-0.2.rc3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.