Francesco Romani has uploaded a new change for review. Change subject: vm: fix _dom access when QEMU is dying ......................................................................
vm: fix _dom access when QEMU is dying commit 8fedf8bde3c28edb07add23c3e9b72681cb48e49 introduced a tiny window for races between libvirt notifications (vm._onQemuDeath) and polling for stats from engine. This is demonstrated by bz1073478, but it really boils down to how events are serialized. In this case, a stats request from engine is being answered while QEMU is being reported down and the _dom handle is being shut down, we end up with an uncaught exception. This patch address the reported race between polling and qemu death. The window of vulnerability is (supposed to be) tiny and the issue itself is hard to reproduce. Sampling thread is theorically vulnerable to the a race of the same type, but this problem will be addressed in a separate patch. Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c Bug-Url: https://bugzilla.redhat.com/1073478 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/26539/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 0e19235..3d86598 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4322,7 +4322,7 @@ max_mem = int(self.conf.get('memSize')) * 1024 min_mem = int(self.conf.get('memGuaranteedSize', '0')) * 1024 target_mem = dev.get('target', max_mem) - cur_mem = self._dom.info()[2] + cur_mem = self._dom.info()[2] if self._dom else 0 return {'balloon_max': str(max_mem), 'balloon_cur': str(cur_mem), 'balloon_min': str(min_mem), -- To view, visit http://gerrit.ovirt.org/26539 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibac9e75a484b228c67d5432b71e965bdf317b89c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches