Bug 1777230
| Summary: | libvirtd crashed when undefine vm after blockpull job finished | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | yisun |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED ERRATA | QA Contact: | yisun |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.2 | CC: | dzheng, hhan, jdenemar, jsuchane, lmen, pkrempa, xuzhang, yisun |
| Target Milestone: | rc | Keywords: | Automation, TestBlocker |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-5.10.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-05-05 09:51:23 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
yisun
2019-11-27 08:44:30 UTC
*** Bug 1775488 has been marked as a duplicate of this bug. *** The issue is a double-unref in qemuDomainBlockPull caused by commit
commit 421c9550f5446729b513ee50f5c44e6f6969b5a2
Author: Peter Krempa <pkrempa>
Date: Thu Sep 26 13:50:16 2019 +0200
qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull
Add a 'cleanup' label and use jumps as we do in other places.
Any other operation following the removal of the last reference then accesses freed data.
Fixed upstream:
commit a10eb613404fedb4ce44ec47848710fdb3d7a91d (HEAD -> master, origin/master, origin/HEAD)
Author: Peter Krempa <pkrempa>
Date: Wed Nov 27 13:40:14 2019 +0100
Revert "qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull"
This reverts commit 421c9550f5446729b513ee50f5c44e6f6969b5a2
qemuDomainBlockPullCommon calls virDomainObjEndAPI internally so the
original commit made us shed two references of @vm instead of one
getting us into a premature free of @vm.
This is not a straight revert as qemuDomainBlockPull was modified
meanwhile. I've also added a warning comment that @vm is consumed.
v5.10.0-rc1-1-ga10eb61340
Verified on: libvirt-5.10.0-1.module+el8.2.0+5040+bd433686.x86_64 [root@libvirt-rhel-8 ~]# virsh start avocado-vt-vm1 Domain avocado-vt-vm1 started [root@libvirt-rhel-8 ~]# virsh snapshot-create-as avocado-vt-vm1 snap1 --disk-only Domain snapshot snap1 created [root@libvirt-rhel-8 ~]# virsh blockpull avocado-vt-vm1 vda --wait Pull complete [root@libvirt-rhel-8 ~]# virsh snapshot-delete avocado-vt-vm1 snap1 --metadata Domain snapshot snap1 deleted [root@libvirt-rhel-8 ~]# virsh destroy avocado-vt-vm1 Domain avocado-vt-vm1 destroyed [root@libvirt-rhel-8 ~]# virsh undefine avocado-vt-vm1 Domain avocado-vt-vm1 has been undefined [root@libvirt-rhel-8 ~]# virsh list --all Id Name State ---------------------- 1 gls running 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/RHBA-2020:2017 |