Bug 2020630

Summary: qemu crash when rebooting VM with vhost-vdpa port
Product: Red Hat Enterprise Linux 8 Reporter: Pei Zhang <pezhang>
Component: qemu-kvmAssignee: Eugenio Pérez Martín <eperezma>
qemu-kvm sub component: Networking QA Contact: Pei Zhang <pezhang>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aadam, chayang, jinzhao, jmaloy, juzhang, leiyang, virt-maint, wquan
Version: 8.6Keywords: Regression, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:24:11 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: 2027716    
Bug Blocks:    

Description Pei Zhang 2021-11-05 13:05:28 UTC
Description of problem:
Boot VM with vhost-vdpa, then qemu will crash when rebooting the VM. 

Version-Release number of selected component (if applicable):
4.18.0-348.4.el8.x86_64
qemu-kvm-6.1.50-4.scrmod+el8.6.0+13148+60ec5265.wrb211103.x86_64
libvirt-7.9.0-1.module+el8.6.0+13150+28339563.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Setup vhost-vdpa

# modprobe vhost_vdpa
# modprobe mlx5_vdpa

# ulimit -l unlimited

# echo 1 > /sys/bus/pci/devices/0000\:3b\:00.0/sriov_numvfs

# vdpa mgmtdev show
pci/0000:3b:00.2: 
  supported_classes net

# vdpa dev add name vdpa0 mgmtdev pci/0000:3b:00.2

# vdpa dev list
vdpa0: type network mgmtdev pci/0000:3b:00.2 vendor_id 5555 max_vqs 16 max_vq_size 256

# ls /dev/vhost-vdpa-0 
/dev/vhost-vdpa-0


2. Boot VM with vhost-vdpa port

    <interface type='vdpa'>
      <mac address='18:66:da:5f:dd:02'/>
      <source dev='/dev/vhost-vdpa-0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </interface>

3. Reboot VM

# reboot

4. After step 3, qemu will crash

# virsh list --all
 Id   Name      State
--------------------------
 -    rhel8.6   shut off

# cat /var/log/libvirt/qemu/rhel8.6.log
...
2021-11-05T12:47:31.904537Z qemu-kvm: vhost_set_features failed: Device or resource busy (16)
2021-11-05T12:47:31.908732Z qemu-kvm: unable to start vhost net: 16: falling back on userspace virtio
2021-11-05 12:47:37.018+0000: shutting down, reason=crashed


Actual results:
qemu crash.


Expected results:
qemu should not crash.

Additional info:
1. This is a regression bug. 

qemu-kvm-6.1.0-4.module+el8.6.0+13039+4b81a1dc.x86_64               works well
qemu-kvm-6.1.50-4.scrmod+el8.6.0+13148+60ec5265.wrb211103.x86_64    qemu crash

Comment 8 John Ferlan 2021-12-22 18:01:48 UTC
Mass update of DTM/ITM to +3 values since the rebase of qemu-6.2 into RHEL 8.6 has been delayed or slowed due to process roadblocks (authentication changes, gating issues). This avoids the DevMissed bot and worse the bot that could come along and strip release+. The +3 was chosen mainly to give a cushion. 

Also added the qemu-6.2 rebase bug 2027716 as a dependent.

Comment 11 Yanan Fu 2021-12-24 02:49:07 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 12 Pei Zhang 2022-01-10 04:37:44 UTC
Verified with qemu-kvm-6.2.0-2.module+el8.6.0+13738+17338784.x86_64:

Following steps in Description, qemu and guest keep working well after several reboot. 

So this issue has been fixed very well. Move to Verified.

Comment 14 errata-xmlrpc 2022-05-10 13:24:11 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 (Moderate: virt:rhel and virt-devel:rhel security, 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/RHSA-2022:1759