Bug 1770140
Summary: | Don't perform tseg validation when reading configs from disk | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Yanqiu Zhang <yanqzhan> | ||||
Component: | libvirt | Assignee: | Daniel Berrangé <berrange> | ||||
Status: | CLOSED ERRATA | QA Contact: | Meina Li <meili> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 8.1 | CC: | chhu, dyuan, jdenemar, jsuchane, knoel, lmen, pkrempa, xuzhang, yafu, yanqzhan | ||||
Target Milestone: | rc | Keywords: | Triaged | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-7.3.0-1.el8 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-11-16 07:49:56 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: | 7.1.0 | ||||
Embargoed: | |||||||
Attachments: |
|
Description
Yanqiu Zhang
2019-11-08 09:46:56 UTC
Created attachment 1633951 [details]
libvirtd.log
Reproduces on rhel-av8.1.1 Pkgs info: libvirt-daemon-5.6.0-8.module+el8.1.1+4828+0f2d78eb.x86_64 qemu-kvm-4.1.0-15.module+el8.1.1+4700+209eec8f.x86_64 # virsh list --all|grep rhel8.1-ovmf - rhel8.1-ovmf shut off # rpm -e --nodeps qemu-kvm-core # systemctl restart libvirtd # virsh list --all|grep rhel8.1-ovmf # cat /var/log/libvirt/libvirtd.log |grep "error :" 2019-11-22 04:19:29.583+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.583+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.583+0000: 12438: error : virCapabilitiesDomainDataLookupInternal:754 : invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm 2019-11-22 04:19:29.584+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.584+0000: 12438: error : virCapabilitiesDomainDataLookupInternal:754 : invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm 2019-11-22 04:19:29.585+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.585+0000: 12438: error : qemuDomainDefTsegPostParse:4271 : unsupported configuration: Setting TSEG size is not supported with this QEMU binary 2019-11-22 04:19:29.585+0000: 12438: error : virDomainObjListLoadAllConfigs:638 : Failed to load config for domain 'rhel8.1-ovmf' 2019-11-22 04:19:29.586+0000: 12438: error : virCapabilitiesDomainDataLookupInternal:754 : invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm 2019-11-22 04:19:29.587+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.587+0000: 12438: error : qemuDomainDefTsegPostParse:4271 : unsupported configuration: Setting TSEG size is not supported with this QEMU binary 2019-11-22 04:19:29.588+0000: 12438: error : virDomainObjListLoadAllConfigs:638 : Failed to load config for domain 'full-rhel8.0' 2019-11-22 04:19:29.588+0000: 12438: error : virCapabilitiesDomainDataLookupInternal:754 : invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm 2019-11-22 04:19:29.588+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.589+0000: 12438: error : virCapabilitiesDomainDataLookupInternal:754 : invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm 2019-11-22 04:19:29.589+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory 2019-11-22 04:19:29.590+0000: 12438: error : virCapabilitiesDomainDataLookupInternal:754 : invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm 2019-11-22 04:19:29.590+0000: 12438: error : virQEMUCapsNewForBinaryInternal:4668 : Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory ... qemuDomainDefTsegPostParse does not skip the validation if qemuCaps is NULL. This is necessary for exactly this reason. As of upstream commit: commit 8d157c13ccd5201385e8038669e24c3c47d4f302 Author: Daniel P. Berrangé <berrange> Date: Tue Dec 10 11:35:43 2019 +0000 qemu: honour parseOpaque instead of refetching caps The use of the parseOpaque parameter was mistakenly removed in commit 4a4132b4625778cf80acb9c92d06351b44468ac3 Author: Daniel P. Berrangé <berrange> Date: Tue Dec 3 10:49:49 2019 +0000 conf: don't use passed in caps in post parse method causing the method to re-fetch qemuCaps that were already just fetched and put into parseOpaque. This is inefficient when parsing incoming XML, but for live XML this is more serious as it means we use the capabilities for the current QEMU binary on disk, rather than the running QEMU. That commit, however, did have a useful side effect of fixing a crasher bug in the qemu post parse callback introduced by commit 5e939cea896fb3373a6f68f86e325c657429ed3d Author: Jiri Denemark <jdenemar> Date: Thu Sep 26 18:42:02 2019 +0200 qemu: Store default CPU in domain XML The qemuDomainDefSetDefaultCPU() method in that patch did not allow for the possibility that qemuCaps would be NULL and thus resulted in a SEGV. This shows a risk in letting each check in the post parse callback look for qemuCaps == NULL. The safer option is to check once upfront and immediately stop (postpone) further validation. The post-parse callbacks are postponed if qemuCaps are not present, so the VM will not vanish. v5.10.0-224-g8d157c13cc Verified Version: libvirt-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64 qemu-kvm-6.0.0-16.module+el8.5.0+10848+2dccc46d.x86_64 Verified Steps: 1. Prepare a guest with smm. # virsh list --all Id Name State --------------------------------- - lmn shut off # virsh dumpxml lmn | grep /smm -B2 <smm state='on'> <tseg unit='MiB'>48</tseg> </smm> 2. Uninstall qemu-kvm package. # rpm -e --nodeps qemu-kvm # virsh list --all Id Name State --------------------------------- - lmn shut off 3. Restart libvirtd and check virsh list. # systemctl restart libvirtd # virsh list --all Id Name State --------------------------------- - lmn shut off 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 (virt:av 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/RHBA-2021:4684 |