From: Keir Fraser Date: Tue, 18 Mar 2008 11:34:44 +0000 (+0000) Subject: Fix domain suspend by xend stop X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14247^2~47 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bfe18b4f3a3ce91b3920a0a8a4a04f93161b4a93;p=xen.git Fix domain suspend by xend stop When I stopped xend by xend stop command, a domain suspend processing is frequently failed. This patch solves the problem. Step to reproduce: 1. xm new XXX on_xend_stop="suspend" 2. xm start XXX 3. xend stop In the xend stop, if the domain suspend processing is slept by state_updated.wait() of waitForShutdown(), then the domain suspend processing is not waked up again because state_updated.notifyAll() of _stateSet() is not executed. For the reason, processing of _on_domains_changed() is waited by domains_lock.acquire() because the domain suspend processing is keeping domains_lock and sleeping. The domain suspend processing got domains_lock at cleanup_domains(). Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 471721eb23..5aef5f7891 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -2104,7 +2104,7 @@ class XendDomainInfo: self.state_updated.acquire() try: while self._stateGet() in (DOM_STATE_RUNNING,DOM_STATE_PAUSED): - self.state_updated.wait() + self.state_updated.wait(timeout=1.0) finally: self.state_updated.release()