Bug 1709791

Summary: QEMU core dumped when quitting guest after deleting the data disk
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Tingting Mao <timao>
Component: qemu-kvmAssignee: Hanna Czenczek <hreitz>
qemu-kvm sub component: Storage QA Contact: CongLi <coli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aliang, areis, coli, ddepaula, hhan, jinzhao, juzhang, knoel, lmen, ngu, qzhang, rjones, timao, virt-maint, warlord
Version: 8.1   
Target Milestone: rc   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-4.1.0-10.module+el8.1.0+4234+33aa4f57 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-06 07:14:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
gdb backtrace none

Description Tingting Mao 2019-05-14 10:39:47 UTC
Created attachment 1568377 [details]
gdb backtrace

Description of problem:
Qemu will core dumped when quitting guest after deleting the data disk. This is a negative test, but should be a valid scenario.


Version-Release number of selected component (if applicable):
qemu-kvm-4.0.0-0.module+el8.1.0+3169+3c501422
kernel-4.18.0-85.el8


How reproducible:
3/3


Steps to Reproduce:
1.Boot guest with a data disk
# /usr/libexec/qemu-kvm \
        -name 'guest' \
        -machine pc \
        -nodefaults \
        -vga qxl \
        -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=base.qcow2 \
        -device virtio-blk-pci,id=virtio_blk_pci0,drive=drive_image1,bus=pci.0,addr=05,bootindex=0 \
        -drive id=drive_image2,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=data.qcow2 \
        -device virtio-blk-pci,id=virtio_blk_pci1,drive=drive_image2,bus=pci.0,addr=06 \
        -vnc :1 \
        -monitor stdio \
        -m 8192 \
        -smp 8 \
        -device virtio-net-pci,mac=9a:b5:b6:b1:b2:b3,id=idMmq1jH,vectors=4,netdev=idxgXAlm,bus=pci.0,addr=0x9  \
        -netdev tap,id=idxgXAlm \
        -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/timao/monitor-qmpmonitor1-20180220-094308-h9I6hRsI,server,nowait \
        -mon chardev=qmp_id_qmpmonitor1,mode=control  \

2. Remove the data disk in CML
# rm data.qcow2 -f

3.Quit the guest in HMP
(qemu) q
Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:923:
qemu-kvm: Could not reopen file: No such file or directory
qemu.sh: line 20:  3418 Aborted                 (core dumped) /usr/libexec/qemu-kvm -name 'guest' -machine pc -nodefaults -vga qxl -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=$1 -device virtio-blk-pci,id=virtio_blk_pci0,drive=drive_image1,bus=pci.0,addr=05,bootindex=0 -drive id=drive_image2,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=data.qcow2 -device virtio-blk-pci,id=virtio_blk_pci1,drive=drive_image2,bus=pci.0,addr=06 -vnc :1 -monitor stdio -m 8192 -smp 8 -device virtio-net-pci,mac=9a:b5:b6:b1:b2:b3,id=idMmq1jH,vectors=4,netdev=idxgXAlm,bus=pci.0,addr=0x9 -netdev tap,id=idxgXAlm -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/timao/monitor-qmpmonitor1-20180220-094308-h9I6hRsI,server,nowait -mon chardev=qmp_id_qmpmonitor1,mode=control


Actual results:
QEMU aborted as above.


Expected results:
Maybe error info, but not core dumped.


Additional info:

Comment 2 Hanna Czenczek 2019-05-22 14:51:55 UTC
Fixed by my upstream series “block: Ignore loosening perm restrictions failures”, so this is effectively the RHEL 8 AV version of BZ 1703793.

Comment 3 Hanna Czenczek 2019-06-25 17:15:38 UTC
*** Bug 1703793 has been marked as a duplicate of this bug. ***

Comment 5 CongLi 2019-07-11 01:45:21 UTC
*** Bug 1728461 has been marked as a duplicate of this bug. ***

Comment 6 John Ferlan 2019-07-11 20:24:59 UTC
*** Bug 1529454 has been marked as a duplicate of this bug. ***

Comment 8 Tingting Mao 2019-09-17 02:52:16 UTC
Retested this issue in qemu-4.1 twice, not hit the bug.


Tested with:
qemu-kvm-4.1.0-9.module+el8.1.0+4210+23b2046a
kernel-4.18.0-141.el8


Steps:
1. Boot a guest with a data disk
# /usr/libexec/qemu-kvm \
        -name 'guest' \
        -machine pc \
        -nodefaults \
        -vga qxl \
        -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=rhel810-64-virtio-scsi.qcow2 \
        -device virtio-blk-pci,id=virtio_blk_pci0,drive=drive_image1,bus=pci.0,addr=05,bootindex=0 \
        -drive id=drive_image2,if=none,snapshot=off,aio=threads,cache=unsafe,format=qcow2,file=data.qcow2 \
        -device virtio-blk-pci,id=virtio_blk_pci1,drive=drive_image2,bus=pci.0,addr=06 \
        -vnc :0 \
        -monitor stdio \
        -m 8192 \
        -smp 8 \
        -device virtio-net-pci,mac=9a:b5:b6:b1:b2:b3,id=idMmq1jH,vectors=4,netdev=idxgXAlm,bus=pci.0,addr=0x9  \
        -netdev tap,id=idxgXAlm \
        -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/timao/monitor-qmpmonitor1-20180220-094308-h9I6hRsI,server,nowait \
        -mon chardev=qmp_id_qmpmonitor1,mode=control  \

2. Remove the data disk 
# rm data.qcow2 -f

3. Quit the guest
(qemu) q  ------------------------------- Quit directly, no other info.
# echo $?
0

Comment 14 Tingting Mao 2019-09-18 03:09:48 UTC
Tested with qemu-kvm-4.1.0-10.module+el8.1.0+4234+33aa4f57, not hit the issue. And the steps are the same as Comment 8. So set this bug as verified. Thanks.

Comment 17 errata-xmlrpc 2019-11-06 07:14:47 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, 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-2019:3723

Comment 18 Richard W.M. Jones 2020-07-27 16:50:26 UTC
*** Bug 1860615 has been marked as a duplicate of this bug. ***