WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: serialise domain restart threads

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: serialise domain restart threads
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Apr 2009 10:50:12 -0700
Delivery-date: Wed, 15 Apr 2009 10:50:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239791107 -3600
# Node ID b2c43b0fba713912d8ced348b5d628743e52d8be
# Parent  9e29ba71e16994c578ad1ee43f3499bb9804bab1
xend: serialise domain restart threads

I observed from xend.log that several domain restart threads run
simultaneously. This patch make it singleton.
Without this, several coredump of a domain might be created.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 9e29ba71e169 -r b2c43b0fba71 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Apr 15 11:23:02 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Apr 15 11:25:07 2009 +0100
@@ -350,6 +350,8 @@ class XendDomainInfo:
     @type shutdownWatch: xen.xend.xenstore.xswatch
     @ivar shutdownStartTime: UNIX Time when domain started shutting down.
     @type shutdownStartTime: float or None
+    @ivar restart_in_progress: Is a domain restart thread running?
+    @type restart_in_progress: bool
 #    @ivar state: Domain state
 #    @type state: enum(DOM_STATE_HALTED, DOM_STATE_RUNNING, ...)
     @ivar state_updated: lock for self.state
@@ -418,6 +420,7 @@ class XendDomainInfo:
         self.shutdownWatch = None
         self.shutdownStartTime = None
         self._resume = resume
+        self.restart_in_progress = False
 
         self.state_updated = threading.Condition()
         self.refresh_shutdown_lock = threading.Condition()
@@ -1929,7 +1932,8 @@ class XendDomainInfo:
         finally:
             self.refresh_shutdown_lock.release()
 
-        if restart_reason:
+        if restart_reason and not self.restart_in_progress:
+            self.restart_in_progress = True
             threading.Thread(target = self._maybeRestart,
                              args = (restart_reason,)).start()
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: serialise domain restart threads, Xen patchbot-unstable <=