Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionyalzhang@redhat.com
2022-05-07 07:15:46 UTC
Description of problem:
vm with vdpa interface will crash after start
Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm
libvirt-8.2.0-1.el9.x86_64
qemu-kvm-7.0.0-1.el9.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Setup the env for vdpa, prepare the vm with interface as below:
<interface type='vdpa'>
<mac address='00:11:22:33:44:00'/>
<source dev='/dev/vhost-vdpa-0'/>
<model type='virtio'/>
<driver queues='8' page_per_vq='on'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
2. Start the vm, the vm can start successfully, but it crashed later:
# virsh start test ; virsh domstate test; sleep 10; virsh domstate test
Domain 'test' started
running
shut off
3. check the log of the vm:
# cat /var/log/libvirt/qemu/test.log
......
qemu-kvm: ../hw/virtio/vhost-vdpa.c:716: int vhost_vdpa_get_vq_index(struct vhost_dev *, int): Assertion `idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs' failed.
2022-05-07 07:01:08.053+0000: shutting down, reason=crashed
Actual results:
vm with vdpa interface will crash after start
Expected results:
vm should not crash
Additional info:
qemu cmd of the interface change after libvirt upgrade:
<interface type='vdpa'>
<mac address='00:11:22:33:44:00'/>
<source dev='/dev/vhost-vdpa-0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
# rpm -q libvirt qemu-kvm
libvirt-8.0.0-8.1.el9_0.x86_64
qemu-kvm-6.2.0-11.el9_0.2.x86_64
-add-fd set=1,fd=23,opaque=/dev/vhost-vdpa-0
-netdev vhost-vdpa,vhostdev=/dev/fdset/1,id=hostnet0
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:00,bus=pci.1,addr=0x0
# rpm -q libvirt qemu-kvm
libvirt-8.2.0-1.el9.x86_64
qemu-kvm-6.2.0-11.el9_0.2.x86_64
-add-fd set=0,fd=23,opaque=net0-vdpa
-netdev vhost-vdpa,vhostdev=/dev/fdset/0,id=hostnet0
-device {"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:00","bus":"pci.1","addr":"0x0"}
It looks like a kernel bug, what is the host kernel version?
Comment 8yalzhang@redhat.com
2022-05-09 10:33:26 UTC
(In reply to Laurent Vivier from comment #7)
> It looks like a kernel bug, what is the host kernel version?
It's kernel-5.14.0-85.el9.x86_64.
And it only happens on uefi guest, with multiqueue set in the vdpa interface.
Description of problem: vm with vdpa interface will crash after start Version-Release number of selected component (if applicable): # rpm -q libvirt qemu-kvm libvirt-8.2.0-1.el9.x86_64 qemu-kvm-7.0.0-1.el9.x86_64 How reproducible: 100% Steps to Reproduce: 1. Setup the env for vdpa, prepare the vm with interface as below: <interface type='vdpa'> <mac address='00:11:22:33:44:00'/> <source dev='/dev/vhost-vdpa-0'/> <model type='virtio'/> <driver queues='8' page_per_vq='on'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> 2. Start the vm, the vm can start successfully, but it crashed later: # virsh start test ; virsh domstate test; sleep 10; virsh domstate test Domain 'test' started running shut off 3. check the log of the vm: # cat /var/log/libvirt/qemu/test.log ...... qemu-kvm: ../hw/virtio/vhost-vdpa.c:716: int vhost_vdpa_get_vq_index(struct vhost_dev *, int): Assertion `idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs' failed. 2022-05-07 07:01:08.053+0000: shutting down, reason=crashed Actual results: vm with vdpa interface will crash after start Expected results: vm should not crash Additional info: qemu cmd of the interface change after libvirt upgrade: <interface type='vdpa'> <mac address='00:11:22:33:44:00'/> <source dev='/dev/vhost-vdpa-0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> # rpm -q libvirt qemu-kvm libvirt-8.0.0-8.1.el9_0.x86_64 qemu-kvm-6.2.0-11.el9_0.2.x86_64 -add-fd set=1,fd=23,opaque=/dev/vhost-vdpa-0 -netdev vhost-vdpa,vhostdev=/dev/fdset/1,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:00,bus=pci.1,addr=0x0 # rpm -q libvirt qemu-kvm libvirt-8.2.0-1.el9.x86_64 qemu-kvm-6.2.0-11.el9_0.2.x86_64 -add-fd set=0,fd=23,opaque=net0-vdpa -netdev vhost-vdpa,vhostdev=/dev/fdset/0,id=hostnet0 -device {"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:00","bus":"pci.1","addr":"0x0"}