Bug 1663828 - qemu core dump when installing win2019 guest on scsi-block device(with blockdev) with q35+ovmf
Summary: qemu core dump when installing win2019 guest on scsi-block device(with blockd...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Vadim Rozenfeld
QA Contact: qing.wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-07 08:17 UTC by Peixiu Hou
Modified: 2021-07-29 06:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-15 07:32:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
install via ovmf (9.71 KB, image/png)
2019-06-27 10:21 UTC, Xueqiang Wei
no flags Details
check_disk_by_boot_from_cdrom (35.47 KB, image/png)
2019-06-27 10:22 UTC, Xueqiang Wei
no flags Details
failed_to_online (40.64 KB, image/png)
2019-06-27 10:23 UTC, Xueqiang Wei
no flags Details

Description Peixiu Hou 2019-01-07 08:17:45 UTC
Description of problem:

qemu core dump when installing win2019 guest on scsi-block device(with blockdev) with GPT disk type

under q35 + ovmf mode, install win2019 guest on scsi-block device, hit qemu core dump.

Version-Release number of selected component (if applicable):
RHEL8.0 fast train
kernel-4.18.0-57.el8.x86_64
qemu-kvm-3.1.0-0.module+el8+2266+616cf026.next.candidate.x86_64
edk2-ovmf-20180508gitee3198e672e2-8.el8.noarch
virtio-win-prewhql-162

How reproducible:
hit 2 times.

Steps to Reproduce:
1.prepare a passthrough disk device on host. like a LIO-ORG device /dev/sdd.

2.boot guest up with q35+ovmf:
===============================================================================
/usr/libexec/qemu-kvm \
-name win2016-ovmf \
-M q35 \
-cpu SandyBridge,+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_relaxed,hv_vapic,hv_time \
-enable-kvm \
-m 2G \
-smp 4,maxcpus=8 -cpu SandyBridge \
-rtc base=localtime,clock=host,driftfix=slew \
-uuid a2e4360e-7009-4d0a-a729-6bceb50c9121 \
-object iothread,id=thread0 \
-device pcie-root-port,bus=pcie.0,id=root1.0,slot=1 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=root1.0,iothread=thread0,num_queues=4 \
-blockdev driver=host_device,cache.direct=off,cache.no-flush=on,filename=/dev/sdd,node-name=my_file \
-blockdev driver=raw,node-name=my,file=my_file \
-device scsi-block,drive=my,bus=virtio_scsi_pci0.0 \
-drive file=/home/kvm_autotest_root/iso/ISO/Win2019/en_windows_server_2019_x64_dvd_4cb967d8.iso,media=cdrom,id=cdrom,if=none -device ide-drive,drive=cdrom,bootindex=0 \
-device piix3-usb-uhci,id=usb \
-device usb-tablet,id=tablet0 \
-k en-us \
-vnc 0.0.0.0:1 \
-vga std \
-monitor stdio \
-qmp tcp:0:4446,server,nowait \
-boot menu=on \
-device pcie-root-port,bus=pcie.0,id=root2.0,slot=2 \
-netdev tap,script=/etc/qemu-ifup,id=hostnet0,vhost=on,queues=4 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:e2:52:22:16:03,mq=on,vectors=10,bus=root2.0 \
-cdrom /home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-162.iso \
-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/usr/share/OVMF/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \
===============================================================================
3. install the win2019 os to guest.

Actual results:
qemu core dump

Expected results:
no core dump and guest can work normally

Additional info:

Tested with blockdev:
1. Tried test with q35+ovmf, reproduced this issue.
2. Tried test with q35+seabios, cannot reproduce this issue.

Tested with drive:
command lines as:
===============================================================================
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=root1.0,iothread=thread0,num_queues=4 \
-drive file=/dev/sdd,id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=raw \
-device scsi-block,id=image1,drive=drive_image1,bootindex=1 \
===============================================================================
1. Tried test with q35+ovmf, not hit qemu core dump, but hit a error in guest, guest error message "Windows cannot install requied files. The file may be corrupt or missing. Make sure all files required for installation are available and restart the installation. Error Code:0X80070570".
2. Tried test with q35+seabios, not hit issue, the guest works normally.

Comment 1 Peixiu Hou 2019-01-07 08:29:17 UTC
And, qemu also report this error message:
(qemu) qemu-kvm: hw/scsi/scsi-bus.c:1374: scsi_req_complete: Assertion `req->status == -1' failed.
bug2.sh: line 31: 16507 Aborted                 (core dumped) /usr/libexec/qemu-kvm -name win2016-ovmf...

Comment 3 Xueqiang Wei 2019-06-27 10:18:49 UTC
Tested with the same command lines as Description on rhel8.1.0 (blockdev+q35+ovmf), not hit core dumped, but guest can not boot up after installation.


Fast train:

Host:
kernel-4.18.0-100.el8.x86_64
qemu-kvm-4.0.0-4.module+el8.1.0+3513+32057e89
edk2-ovmf-20190308git89910a39dcfd-4.el8.noarch

Guest:
win2019 with virtio-win-prewhql-0.1-172.iso



1. list host disks

# lsscsi 
[0:0:0:0]    storage HP       P420i            7.02  -        
[0:1:0:0]    disk    HP       LOGICAL VOLUME   7.02  /dev/sda 
[1:0:0:0]    cd/dvd  hp       DVDRAM GT80N     EA02  /dev/sr0 
[2:0:0:0]    disk    IBM      2145             0000  /dev/sdb 
[2:0:1:0]    disk    IBM      2145             0000  /dev/sdc 
[3:0:0:0]    disk    LIO-ORG  stor0            4.0   /dev/sdd 
[4:0:0:0]    disk    LIO-ORG  stor0            4.0   /dev/sde 
[5:0:0:0]    disk    LIO-ORG  stor1            4.0   /dev/sdf

# lsblk
NAME                           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                              8:0    0 279.4G  0 disk  
├─sda1                           8:1    0     1G  0 part  /boot
└─sda2                           8:2    0 278.4G  0 part  
  ├─rhel_hp--dl385pg8--03-root 253:0    0    50G  0 lvm   /
  ├─rhel_hp--dl385pg8--03-swap 253:1    0  15.8G  0 lvm   [SWAP]
  └─rhel_hp--dl385pg8--03-home 253:2    0 212.6G  0 lvm   /home
sdb                              8:16   0   130G  0 disk  
└─mpatha                       253:3    0   130G  0 mpath 
sdc                              8:32   0   130G  0 disk  
└─mpatha                       253:3    0   130G  0 mpath 
sdd                              8:48   0    40G  0 disk  
└─mpathb                       253:4    0    40G  0 mpath 
sde                              8:64   0    40G  0 disk  
└─mpathb                       253:4    0    40G  0 mpath 
sdf                              8:80   0    20G  0 disk  
sr0                             11:0    1  1024M  0 rom

# multipath -ll
mpathb (36001405b59f0a376aed4caf9dc8998c0) dm-4 LIO-ORG,stor0
size=40G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 3:0:0:0 sdd 8:48 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
  `- 4:0:0:0 sde 8:64 active ready running
mpatha (360050763008084e6e00000000000019d) dm-3 IBM,2145
size=130G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 2:0:0:0 sdb 8:16 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  `- 2:0:1:0 sdc 8:32 active ready running



2. passthrough /dev/sdb, and install guest on it. (fc storage)

/usr/libexec/qemu-kvm \
-name win2019-ovmf \
-M q35 \
-cpu 'Opteron_G5',hv_stimer,hv_synic,hv_vpindex,hv_reset,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,+kvm_pv_unhalt \
-enable-kvm \
-m 4G \
-smp 4,maxcpus=8 \
-rtc base=localtime,clock=host,driftfix=slew \
-uuid a2e4360e-7009-4d0a-a729-6bceb50c9121 \
-object iothread,id=thread0 \
-device pcie-root-port,bus=pcie.0,id=root1.0,slot=1 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=root1.0,iothread=thread0,num_queues=4 \
-blockdev driver=host_device,cache.direct=off,cache.no-flush=on,filename=/dev/sdb,node-name=my_file \
-blockdev driver=raw,node-name=my,file=my_file \
-device scsi-block,drive=my,bus=virtio_scsi_pci0.0 \
-drive file=/home/kvm_autotest_root/iso/ISO/Win2019/en_windows_server_2019_updated_march_2019_x64_dvd_2ae967ab.iso,media=cdrom,id=cdrom,if=none \
-device ide-drive,drive=cdrom,bootindex=0 \
-device piix3-usb-uhci,id=usb \
-device usb-tablet,id=tablet0 \
-k en-us \
-vnc 0.0.0.0:1 \
-vga std \
-monitor stdio \
-qmp tcp:0:4446,server,nowait \
-boot menu=on \
-device pcie-root-port,bus=pcie.0,id=root2.0,slot=2 \
-netdev tap,script=/etc/qemu-ifup,id=hostnet0,vhost=on,queues=4 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:e2:52:22:16:03,mq=on,vectors=10,bus=root2.0 \
-cdrom /home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-172.iso \
-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/usr/share/OVMF/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \


3. passthrough /dev/sdd, and install guest on it. (iscsi logined disk)


after step 2, install successfully, and guest boot up normally.

after step 3, guest can not boot up after installation. I found the disk change to offline. Please refer to attachment for screenshot.



Also hit this issue on slow train:

Host:
kernel-4.18.0-100.el8.x86_64
qemu-kvm-2.12.0-78.module+el8.1.0+3434+46ed87c2
edk2-ovmf-20190308git89910a39dcfd-4.el8.noarch

Guest:
win2019 with virtio-win-prewhql-0.1-172.iso




By the way, the core dumped message mentioned in Comment 1 seems similar with bug[1]. bug[1] is for slow train.

[1] Bug 1665903 - hw/scsi/scsi-bus.c:1374: scsi_req_complete: Assertion `req->status == -1' failed.

Comment 4 Xueqiang Wei 2019-06-27 10:21:44 UTC
Created attachment 1585116 [details]
install via ovmf

Comment 5 Xueqiang Wei 2019-06-27 10:22:44 UTC
Created attachment 1585117 [details]
check_disk_by_boot_from_cdrom

Comment 6 Xueqiang Wei 2019-06-27 10:23:32 UTC
Created attachment 1585118 [details]
failed_to_online

Comment 7 Ademar Reis 2020-02-05 22:53:34 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 10 RHEL Program Management 2021-03-15 07:32:49 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 11 qing.wang 2021-07-28 06:12:32 UTC
QE agree to close due to

It can not reproduce on 
Red Hat Enterprise Linux release 8.5 Beta (Ootpa)
4.18.0-315.el8.x86_64
qemu-kvm-common-6.0.0-25.module+el8.5.0+11890+8e7c3f51.x86_64


ENV:
create lvm on simulated disk which created by targetcli


/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -blockdev node-name=file_ovmf_code,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_code,driver=raw,read-only=on,file=file_ovmf_code \
    -blockdev node-name=file_ovmf_vars,driver=file,filename=/home/kvm_autotest_root/images/test_VARS.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_vars,driver=raw,read-only=off,file=file_ovmf_vars \
    -machine q35,memory-backend=mem-machine_mem,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars \
    -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
    -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
    -nodefaults \
    -device VGA,bus=pcie.0,addr=0x2 \
    -m 30720 \
    -object memory-backend-ram,size=30720M,id=mem-machine_mem  \
    -smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2  \
    -cpu 'Cascadelake-Server-noTSX',hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,+kvm_pv_unhalt \
    \
    -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
    -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
    -blockdev node-name=host_device_image0,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/vg_test/lv_test,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image0,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=host_device_image0 \
    -device scsi-block,id=image0,drive=drive_image0 \
    -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
    -device virtio-net-pci,mac=9a:bd:97:f6:1e:45,id=id5qwtQB,netdev=idkA0p0F,bus=pcie-root-port-3,addr=0x0  \
    -netdev tap,id=idkA0p0F,vhost=on \
    \
    -blockdev node-name=file_cd1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/ISO/Win2019/en_windows_server_2019_updated_may_2020_x64_dvd_5651846f.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
    -device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=0 \
    -blockdev node-name=file_winutils,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-201.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_winutils,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_winutils \
    -device ide-cd,id=winutils,drive=drive_winutils,bus=ide.1,unit=0 \
    \
    -vnc :5  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=d,strict=off \
    -enable-kvm -monitor stdio \
    -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5


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