Bug 1612009
Summary: | libvirtd crash when using perl-Sys-Virt API: get_node_sev_info() | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dan Zheng <dzheng> | |
Component: | libvirt | Assignee: | Erik Skultety <eskultet> | |
Status: | CLOSED ERRATA | QA Contact: | Dan Zheng <dzheng> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.6 | CC: | eskultet, tburke, xuzhang | |
Target Milestone: | rc | Keywords: | Automation | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-4.5.0-7.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1619150 (view as bug list) | Environment: | ||
Last Closed: | 2018-10-30 09:58:28 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1619150 |
Description
Dan Zheng
2018-08-03 08:53:51 UTC
A more simple reproducer for python3 would be: 1) start libvirtd (need to cache the qemu capabilities) 2) restart libvirtd (this reloads the qemu capabilities from a cache) 3) use the following python3 snippet: import libvirt conn = libvirt.open() conn.getSEVInfo() 4) libvirtd encounters SIGSEGV patches proposed upstream: https://www.redhat.com/archives/libvir-list/2018-August/msg00940.html Fixed upstream by commit: commit 77f51ab52049734d80a8ccb79b80189c7fb95c41 Refs: v4.6.0-211-g77f51ab520 Author: Erik Skultety <eskultet> AuthorDate: Thu Aug 9 15:27:26 2018 +0200 Commit: Erik Skultety <eskultet> CommitDate: Mon Aug 20 07:18:21 2018 +0200 qemu: caps: Format SEV platform data into qemuCaps cache Since we're not saving the platform-specific data into a cache, we're not going to populate the structure, which in turn will cause a crash upon calling virNodeGetSEVInfo because of a NULL pointer dereference. Ultimately, we should start caching this data along with host-specific capabilities like NUMA and SELinux stuff into a separate cache, but for the time being, this is a semi-proper fix for a potential crash. Backtrace (requires libvirtd restart to load qemu caps from cache): #0 qemuGetSEVInfoToParams #1 qemuNodeGetSEVInfo #2 virNodeGetSEVInfo #3 remoteDispatchNodeGetSevInfo #4 remoteDispatchNodeGetSevInfoHelper #5 virNetServerProgramDispatchCall #6 virNetServerProgramDispatch #7 virNetServerProcessMsg #8 virNetServerHandleJob #9 virThreadPoolWorker #10 virThreadHelper https: //bugzilla.redhat.com/show_bug.cgi?id=1612009 Signed-off-by: Erik Skultety <eskultet> Acked-by: Peter Krempa <pkrempa> Tested-by: Brijesh Singh <brijesh.singh> # rpm -q libvirt perl-Sys-Virt libvirt-4.5.0-9.el7.x86_64 perl-Sys-Virt-4.5.0-2.el7.x86_64 Check libvirtd # systemctl status libvirtd Main PID: 9658 (libvirtd) ./test_1612009.pl qemu:///system cc libvirt error code: 84, message: Operation not supported: QEMU does not support SEV guest Note: ./test_1612009.pl is same with the scripts in description. Check libvirtd again # systemctl status libvirtd Main PID: 9658 (libvirtd) NO libvirtd crash any more. Verify. 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. https://access.redhat.com/errata/RHSA-2018:3113 |