Description of problem: core dump on 0 size filename. Version-Release number of selected component (if applicable): qemu-img-4.2.0-10.module+el8.2.0+5740+c3dff59e.x86_64 How reproducible: always Steps to Reproduce: qemu-img create -f qcow2 -b '' /tmp/foo Actual results: qemu-img: block.c:5811: bdrv_img_create: Assertion `full_backing' failed. Aborted (core dumped) Expected results: Regular error massage, not assert, not making angry the core dump handlers. Additional info: #0 0x00007ffff52b08df in raise () from /lib64/libc.so.6 #1 0x00007ffff529acf5 in abort () from /lib64/libc.so.6 #2 0x00007ffff529abc9 in __assert_fail_base.cold.0 () from /lib64/libc.so.6 #3 0x00007ffff52a8e96 in __assert_fail () from /lib64/libc.so.6 #4 0x00005555555a8423 in bdrv_img_create () #5 0x0000555555594a20 in img_create () #6 0x000055555559334d in main () (sorry, no dbg symbols)
Reproduced this bug in latest rhel8.2. Tested with: qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae kernel-4.18.0-176.el8 Steps: # qemu-img create -f qcow2 -b '' foo qemu-img: block.c:5811: bdrv_img_create: Assertion `full_backing' failed. Aborted (core dumped) (gdb) bt #0 0x00007f63f144770f in raise () from /lib64/libc.so.6 #1 0x00007f63f1431b25 in abort () from /lib64/libc.so.6 #2 0x00007f63f14319f9 in __assert_fail_base.cold.0 () from /lib64/libc.so.6 #3 0x00007f63f143fcc6 in __assert_fail () from /lib64/libc.so.6 #4 0x0000555cab927423 in bdrv_img_create (filename=0x7ffe78e89474 "foo", fmt=0x7ffe78e8946a "qcow2", base_filename=<optimized out>, base_fmt=<optimized out>, options=<optimized out>, img_size=<optimized out>, flags=0, quiet=false, errp=0x7ffe78e87708) at block.c:5811 #5 0x0000555cab913a20 in img_create (argc=6, argv=0x7ffe78e87880) at qemu-img.c:553 #6 0x0000555cab91234d in main (argc=6, argv=<optimized out>) at qemu-img.c:5079
Tried with 8.1 qemu package, hit the same issue. But not with 8.0 qemu package. With 8.1 qemu package. # qemu-img create -f qcow2 -b '' foo qemu-img: block.c:5769: bdrv_img_create: Assertion `full_backing' failed. Aborted (core dumped) # qemu-img --version qemu-img version 4.1.0 (qemu-kvm-4.1.0-23.module+el8.1.1+5748+5fcc84a8.1) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers With 8.0 package. # qemu-img create -f qcow2 -b '' foo qemu-img: foo: The 'file' block driver requires a file name Could not open backing image to determine size. # qemu-img --version qemu-img version 3.1.0 (qemu-kvm-3.1.0-30.module+el8.0.1+4607+7ea9baa9.2) Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
Tested with qemu 5.1, hit this issue. Versions: kernel-4.18.0-234.el8.x86_64 qemu-kvm-5.1.0-4.module+el8.3.0+7846+ae9b566f # qemu-img create -f qcow2 -b '' foo qemu-img: /builddir/build/BUILD/qemu-5.1.0/block.c:6139: bdrv_img_create: Assertion `full_backing' failed. Aborted (core dumped)
A patch for this issue has been accepted upstream: https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg06721.html
We'll let the rebase pick this up for RHEL AV 8.4.0
Tested with qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a, not hit this issue. Versions: kernel-4.18.0-259.el8.x86_64 qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a # qemu-img create -f qcow2 -b '' foo qemu-img: foo: Expected backing file name, got empty string
According to Comment 8, set status to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:2098