qemu 4.2 segfaults on VF detach
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After updating Ubuntu 20.04 to the Beta version, we get the following error and the virtual machines stucks when detaching PCI devices using virsh command:
Error:
error: Failed to detach device from /tmp/vf_
error: internal error: End of file from qemu monitor
steps to reproduce:
1. create a VM over Ubuntu 20.04 (5.4.0-14-generic)
2. attach PCI device to this VM (Mellanox VF for example)
3. try to detaching the PCI device using virsh command:
a. create a pci interface xml file:
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address type='pci' domain='0x0000' bus='0x11' slot='0x00' function='0x2' />
</source>
</hostdev>
b. #virsh detach-device <VM-Doman-name> <pci interface xml file>
- Ubuntu release:
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04
- Package ver:
libvirt0:
Installed: 6.0.0-0ubuntu3
Candidate: 6.0.0-0ubuntu5
Version table:
6.0.0-0ubuntu5 500
500 http://
*** 6.0.0-0ubuntu3 100
100 /var/lib/
- What you expected to happen:
PCI device detached without any errors.
- What happened instead:
getting the errors above and he VM stuck
additional info:
after downgrading the libvirt0 package and all the dependent packages to 5.4 the previous, version, seems that the issue disappeared
Related branches
- Rafael David Tinoco (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
- Diff: 7167 lines (+6697/-18)
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
- Diff: 3765 lines (+3470/-0)
summary: |
- libvirt 6.0 : virtual machines stuck when detaching PCI device + libvirt 6.0 : virtual machine stuck when detaching PCI device using + virsh command |
Changed in qemu (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
Hi Mohammad,
I'll to recreate your issue, but while that goes on I already would want to ask if you could report the following tracked while you try to detach the device:
1. host dmesg -wlibvirt/qemu/<questname>.log
2. journalctl -f
3. /var/log/
Please report all these in case there is something that helps to pinpoint the root cause.
Could you also please try more devices to know which kind this issue it restricted to?
1. try other VFs on the same device
2. try VFs on a different device (if you have any)
3. try non-VF but full PCI passthrough
Does the issue occor on your system for all of these ?