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-changelog] [xen-3.0.4-testing] Improve XendCheckpoint's forkHelper

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0.4-testing] Improve XendCheckpoint's forkHelper error handling.
From: "Xen patchbot-3.0.4-testing" <patchbot-3.0.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Dec 2006 10:45:22 -0800
Delivery-date: Tue, 19 Dec 2006 03:15:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Brendan Cully <brendan@xxxxxxxxx>
# Date 1166060750 28800
# Node ID c38370be1e0e1197213a8f22a5ec8fbd9ba875b0
# Parent  63e72c3254da9023ad496276ff8547c2dd74db19
Improve XendCheckpoint's forkHelper error handling.

When inputHandler raises an exception, close stdin and stdout in the
child before attempting to close stderr, which is held open by a
separate thread. Without this patch, exceptions raised by device
migration caused xend to hang on child.childerr.close().

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
 tools/python/xen/xend/XendCheckpoint.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff -r 63e72c3254da -r c38370be1e0e tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Sat Dec 16 12:49:23 2006 +0000
+++ b/tools/python/xen/xend/XendCheckpoint.py   Wed Dec 13 17:45:50 2006 -0800
@@ -218,18 +218,17 @@ def forkHelper(cmd, fd, inputHandler, cl
                     log.debug('%s', line)
                     inputHandler(line, child.tochild)
-            thread.join()
         except IOError, exn:
             raise XendError('Error reading from child process for %s: %s' %
                             (cmd, exn))
-        child.childerr.close()
         if not closeToChild:
-    status = child.wait()
+        thread.join()
+        child.childerr.close()
+        status = child.wait()
     if status >> 8 == 127:
         raise XendError("%s failed: popen failed" % string.join(cmd))
     elif status != 0:

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.0.4-testing] Improve XendCheckpoint's forkHelper error handling., Xen patchbot-3.0.4-testing <=