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: I65197459cd183af5e7a1634a5ffb01719364a070 Bug-Url: https://bugzilla.redhat.com/1073478 Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/vm.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/25803/1 diff --git a/vdsm/vm.py b/vdsm/vm.py index c53f1d4..d2d5b6b 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -4718,7 +4718,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/25803 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65197459cd183af5e7a1634a5ffb01719364a070 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
