Bug 1994194

Summary: Qemu Core Dumped When Creating Snapshot Bases on '' Backing File
Product: Red Hat Enterprise Linux 8 Reporter: Tingting Mao <timao>
Component: qemu-kvmAssignee: Kevin Wolf <kwolf>
qemu-kvm sub component: qcow2 QA Contact: Tingting Mao <timao>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: medium    
Priority: medium CC: chayang, coli, jferlan, jinzhao, juzhang, kkiwi, virt-maint
Version: 8.0Keywords: Triaged
Target Milestone: beta   
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-17 06:05:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1997410    
Bug Blocks:    

Description Tingting Mao 2021-08-17 02:47:45 UTC
Description of problem:
As subject.


Version-Release number of selected component (if applicable):
qemu-kvm-4.2.0-57.module+el8.5.0+12118+4998563d
kernel-4.18.0-330.el8.x86_64


How reproducible:
100%


Steps to Reproduce:
# qemu-img create -f qcow2 -b '' /home/foo
qemu-img: block.c:6024: bdrv_img_create: Assertion `full_backing' failed.
Aborted (core dumped)


Actual results:
As above, qemu core dumped.


Expected results:
Should list the hint message like below instead of core dumped.
# qemu-img create -f qcow2 -b '' foo
qemu-img: foo: Expected backing file name, got empty string


Additional info:
(gdb) bt
#0  0x00007fec2eb5237f in raise () from /lib64/libc.so.6
#1  0x00007fec2eb3cdb5 in abort () from /lib64/libc.so.6
#2  0x00007fec2eb3cc89 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
#3  0x00007fec2eb4aa76 in __assert_fail () from /lib64/libc.so.6
#4  0x000055e328150b63 in bdrv_img_create (filename=0x7ffe75770342 "/home/foo", fmt=0x7ffe75770338 "qcow2", base_filename=<optimized out>, 
    base_fmt=<optimized out>, options=<optimized out>, img_size=<optimized out>, flags=0, quiet=false, errp=0x7ffe7576f000) at block.c:6024
#5  0x000055e32813c540 in img_create (argc=6, argv=0x7ffe7576f170) at qemu-img.c:574
#6  0x000055e32813ae1d in main (argc=6, argv=<optimized out>) at qemu-img.c:5385

Comment 1 Tingting Mao 2021-08-17 02:53:06 UTC
This issue was fixed in RHELAV, refer to Bug 1809553, please.

Comment 2 Kevin Wolf 2021-08-19 11:06:39 UTC
We're planning to rebase the qemu-kvm package for 8.6, so we'll get this automatically.

Comment 6 Tingting Mao 2021-09-17 06:05:40 UTC
Verified this bug as below.


Tested with:
qemu-kvm-6.1.0-1.module+el8.6.0+12648+6ede71a5
kernel-4.18.0-339.el8.x86_64


Steps:
# qemu-img create -f qcow2 -b '' /home/foo
qemu-img: /home/foo: Expected backing file name, got empty string