Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: We have encountered a failure running qemu-img map on a file with multiple blocks. Failure qemu-img map on FC28: # rpm -qa | grep qemu qemu-audio-alsa-2.12.0-0.5.rc1.fc28.x86_64 qemu-block-curl-2.12.0-0.5.rc1.fc28.x86_64 qemu-block-nfs-2.12.0-0.5.rc1.fc28.x86_64 qemu-ui-sdl-2.12.0-0.5.rc1.fc28.x86_64 qemu-img-2.12.0-0.5.rc1.fc28.x86_64 qemu-common-2.12.0-0.5.rc1.fc28.x86_64 qemu-audio-oss-2.12.0-0.5.rc1.fc28.x86_64 qemu-audio-sdl-2.12.0-0.5.rc1.fc28.x86_64 qemu-block-dmg-2.12.0-0.5.rc1.fc28.x86_64 qemu-block-iscsi-2.12.0-0.5.rc1.fc28.x86_64 qemu-block-rbd-2.12.0-0.5.rc1.fc28.x86_64 qemu-ui-gtk-2.12.0-0.5.rc1.fc28.x86_64 qemu-system-x86-core-2.12.0-0.5.rc1.fc28.x86_64 qemu-kvm-2.12.0-0.5.rc1.fc28.x86_64 libvirt-daemon-driver-qemu-4.2.0-1.fc28.x86_64 ipxe-roms-qemu-20170710-3.git0600d3ae.fc28.noarch qemu-audio-pa-2.12.0-0.5.rc1.fc28.x86_64 qemu-block-gluster-2.12.0-0.5.rc1.fc28.x86_64 qemu-ui-curses-2.12.0-0.5.rc1.fc28.x86_64 qemu-system-x86-2.12.0-0.5.rc1.fc28.x86_64 [root@dhcp163-43 vdsm]# python Python 2.7.15 (default, May 16 2018, 17:50:09) [GCC 8.1.1 20180502 (Red Hat 8.1.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import io >>> filename = "/tmp/test2" >>> with io.open(filename, "wb") as f: ... f.write(b"x") ... f.seek(16 * 1024) ... f.write(b"x") ... f.seek(42 * 1024) ... f.write(b"x") ... 1L 16384L 1L 43008L 1L >>> Run the following command on that file: /usr/bin/qemu-img map --output json /tmp/test2 /usr/bin/qemu-img map --output json /tmp/test2 [{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": 0}, { "start": 4096, "length": 12288, "depth": 0, "zero": true, "data": false, "offset": 4096}, { "start": 16384, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": 16384}, qemu-img: /builddir/build/BUILD/qemu-2.12.0-rc1/qemu-img.c:2680: get_block_status: Assertion `bytes' failed. Aborted (core dumped) A successful qemu-img map on FC27 # rpm -qa | grep qemu qemu-system-x86-2.11.0-4.fc27.x86_64 qemu-guest-agent-2.11.0-4.fc27.x86_64 qemu-block-rbd-2.11.0-4.fc27.x86_64 qemu-img-2.11.0-4.fc27.x86_64 qemu-system-x86-core-2.11.0-4.fc27.x86_64 qemu-block-iscsi-2.11.0-4.fc27.x86_64 libvirt-daemon-driver-qemu-4.0.0-2.fc27.x86_64 ipxe-roms-qemu-20170710-3.git0600d3ae.fc27.noarch qemu-sanity-check-nodeps-1.1.5-8.fc27.x86_64 qemu-kvm-2.11.0-4.fc27.x86_64 qemu-block-dmg-2.11.0-4.fc27.x86_64 qemu-common-2.11.0-4.fc27.x86_64 qemu-block-nfs-2.11.0-4.fc27.x86_64 qemu-block-ssh-2.11.0-4.fc27.x86_64 qemu-block-gluster-2.11.0-4.fc27.x86_64 qemu-block-curl-2.11.0-4.fc27.x86_64 Creating a file with the following python script: >>> import io >>> filename = "/tmp/test" >>> with io.open(filename, "wb") as f: ... f.write(b"x") ... f.seek(16 * 1024) ... f.write(b"x") ... f.seek(42 * 1024) ... f.write(b"x") ... 1L 16384L 1L 43008L 1L Run the following command on that file: /usr/bin/qemu-img map --output json /tmp/test Output: [{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": 0}, { "start": 4096, "length": 12288, "depth": 0, "zero": true, "data": false, "offset": 4096}, { "start": 16384, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": 16384}, { "start": 20480, "length": 20480, "depth": 0, "zero": true, "data": false, "offset": 20480}, { "start": 40960, "length": 2560, "depth": 0, "zero": false, "data": true, "offset": 40960}] Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Kevin, can you take a look?
Patch posted upstream: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg02905.html
Eric, is this fixed in Fedora 28?
Confirmed that qemu-img.x86_64 2:2.11.2-1.fc28 contains the fix
However, fedora-virt-preview ships qemu-img.x86_64 2:2.12.0-0.5.rc1.fc28 which still has the bug. Cole?
(In reply to Eric Blake from comment #5) > However, fedora-virt-preview ships qemu-img.x86_64 2:2.12.0-0.5.rc1.fc28 > which still has the bug. Cole? virt-preview has moved to a copr repo now, the old location is discontinued and isn't being updated anymore. So remove the old one and do: sudo dnf copr enable @virtmaint-sig/virt-preview Latest details are here: https://fedoraproject.org/wiki/Virtualization_Preview_Repository
Indeed, that ships with qemu-img.x86_64 2:3.0.0-1.fc28, where the problem is fixed.