This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH] xend: fix leak of /local/domain/* in xenstore

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xend: fix leak of /local/domain/* in xenstore
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Tue, 7 Apr 2009 15:15:44 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 06 Apr 2009 23:16:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
My previous patch seems to be missing. so I resend.

xenwatch thread _storeChanged() may create /local/domain/<domid> entries
in xenstore even after the domain has shutdown.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

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
Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xend: fix leak of /local/domain/* in xenstore, Kouya Shimura <=