Bug 980339
Summary: | libvirtd crashes when starting a guest that uses a hostdev network specifying a nonexistent PF | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Laine Stump <laine> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.4 | CC: | acathrow, dallan, dyuan, gsun, jmiao, laine, mzhan |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.10.2-20.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause: if an incorrect device name was given in the <pf> element of a libvirt network definition, libvirt would crash when a guest attempted to create an interface using that network.
Fix: libvirt now validates the pf device name to verify that it exists and that it is an sriov-capable network device.
Result: libvirt no longer crashes when a network with an incorrect <pf> is referenced. Instead it logs an appropriate error message and prevents the operation.
|
Story Points: | --- |
Clone Of: | 971325 | Environment: | |
Last Closed: | 2013-11-21 09:04:53 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: |
Description
Laine Stump
2013-07-02 06:28:06 UTC
The patch libvirt-pci-initialize-virtual_functions-array-pointer-to-avoid-segfault.patch is not completed to this bug, it do not set up pciConfigAddr to NULL. And this bug also exists in libvirt-0.10.2-19.el6, not be verified. My reproduce step like: # virsh nodedev-list --tree computer | ... +- pci_0000_00_16_0 +- pci_0000_00_16_3 +- pci_0000_00_19_0 | | | +- net_eth0_10_60_4b_78_2a_74 <== this is my network interface, named eth0 | +- pci_0000_00_1a_0 | | ... # cat passthrough.xml <network> <name>passthrough</name> <forward mode='hostdev' managed='yes'> <pf dev='eth99'/> <======== wrong interface </forward> </network> # virsh net-define passthrough.xml Network passthrough defined from passthrough.xml # virsh net-list --all Name State Autostart Persistent ---------------------------------------------------------- default active yes yes passthrough inactive no yes # virsh edit a add following into domain a's xml <interface type='network'> <source network='passthrough'/> </interface> # virsh start a error: Failed to start domain a error: End of file while reading data: Input/output error error: One or more references were leaked after disconnect from the hypervisor error: Failed to reconnect to the hypervisor It turns out there was an additional problem that had already been silently fixed upstream several months prior to the original bug (Bug 971325) being filed. commit ac5cb26a32300d03517692cd15a604dd0517fbd6 Author: John Ferlan <jferlan> Date: Tue Jan 22 09:15:41 2013 -0500 virnetdev: Need to initialize 'pciConfigAddr' It was possible to call VIR_FREE in cleanup prior to initialization I backported and posted this additional patch to rhvirt-patches. http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-July/msg00176.html Additionally, I tested and it does eliminate this slightly different crash. This bug fix is verified, the verification step like below: # rpm -q libvirt libvirt-0.10.2-20.el6.x86_64 # virsh nodedev-list --tree computer | ... +- pci_0000_00_16_0 +- pci_0000_00_16_3 +- pci_0000_00_19_0 | | | +- net_eth0_10_60_4b_78_2a_74 <== this is my network interface, named eth0 | +- pci_0000_00_1a_0 | | ... # cat passthrough.xml <network> <name>passthrough</name> <forward mode='hostdev' managed='yes'> <pf dev='eth99'/> <======== wrong interface </forward> </network> # virsh net-define passthrough.xml Network passthrough defined from passthrough.xml # virsh net-list --all Name State Autostart Persistent ---------------------------------------------------------- default active yes yes passthrough inactive no yes # virsh edit r6 add following into domain a's xml <interface type='network'> <source network='passthrough'/> </interface> # virsh start r6 error: Failed to start domain r6 error: internal error Could not get Virtual functions on eth99 # service libvirtd status libvirtd (pid 3408) is running... So, change the status to VERIFIED. In addition, for the network card that has no SRIOV capability, the verification step of this fix looks like: # vim network.xml <network> <name>passthrough</name> <forward mode='hostdev' managed='yes'> <pf dev='eth1'/> <======== no SRIOV interface </forward> </network> # virsh net-define network.xml Network passthrough defined from network.xml # virsh net-list --all Name State Autostart Persistent -------------------------------------------------- default active yes yes passthrough inactive no yes # virsh edit r6m Domain r6m XML configuration edited. add following into domain r6m's xml <interface type='network'> <source network='passthrough'/> </interface> # virsh start r6m error: Failed to start domain r6m error: internal error No Vf's present on SRIOV PF eth1 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. http://rhn.redhat.com/errata/RHBA-2013-1581.html |