From: Kouya Shimura Subject: [PATCH] xend: fix leak of /local/domain/* in xenstore Date: Tue, 7 Apr 2009 15:15:44 +0900 Message-ID: <7k3acl6lbj.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="d8hpCOIeap" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --d8hpCOIeap Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit My previous patch seems to be missing. so I resend. xenwatch thread _storeChanged() may create /local/domain/ entries in xenstore even after the domain has shutdown. Signed-off-by: Kouya Shimura --d8hpCOIeap Content-Type: text/x-patch Content-Disposition: inline; filename="fix_xenstore_leak.patch" Content-Transfer-Encoding: 7bit diff -r 5a60eb7fad79 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Apr 02 14:17:19 2009 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Tue Apr 07 15:08:57 2009 +0900 @@ -1634,7 +1634,13 @@ class XendDomainInfo: if changed: # Update the domain section of the store, as this contains some # parameters derived from the VM configuration. - self._storeDomDetails() + self.refresh_shutdown_lock.acquire() + try: + state = self._stateGet() + if state not in (DOM_STATE_SHUTDOWN, DOM_STATE_HALTED,): + self._storeDomDetails() + finally: + self.refresh_shutdown_lock.release() return 1 --d8hpCOIeap Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --d8hpCOIeap--