Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1809553 - core dump instead of error message on '' backing file
Summary: core dump instead of error message on '' backing file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.2
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: 8.0
Assignee: Connor Kuehl
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-03 12:00 UTC by Attila Fazekas
Modified: 2021-05-25 06:41 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 06:41:21 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Attila Fazekas 2020-03-03 12:00:23 UTC
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)

Comment 1 Tingting Mao 2020-03-03 12:17:02 UTC
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

Comment 2 Tingting Mao 2020-03-03 12:25:39 UTC
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

Comment 4 Xueqiang Wei 2020-08-31 07:51:48 UTC
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)

Comment 5 Connor Kuehl 2020-08-31 13:38:40 UTC
A patch for this issue has been accepted upstream: https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg06721.html

Comment 6 John Ferlan 2020-09-11 19:12:22 UTC
We'll let the rebase pick this up for RHEL AV 8.4.0

Comment 8 Xueqiang Wei 2020-12-10 14:55:48 UTC
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

Comment 11 Xueqiang Wei 2020-12-16 02:26:23 UTC
According to Comment 8, set status to VERIFIED.

Comment 16 errata-xmlrpc 2021-05-25 06:41:21 UTC
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


Note You need to log in before you can comment on or make changes to this bug.