From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhigang Wang Subject: [PATCH]fix a ssl migration hang issue Date: Fri, 09 Jan 2009 16:21:31 +0800 Message-ID: <4967090B.9030203@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030904090509070409040703" 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: xen-devel Cc: "Kurt C. Hackel" , xiaowei.hu@oracle.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030904090509070409040703 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit hi, this patch fixes a ssl migration hang issue: when another VM started by xend, the spawned qemu process will keep the p2cwrite file descriptor open. Thus there will be two open descriptors associated with the write end of the pipe. Then when read end of the pipe only reach the EOF when the qemu process has terminated. Signed-off-by: Zhigang Wang thanks, zhigang --------------030904090509070409040703 Content-Type: text/x-patch; name="xen-unstalbe-ssl-migration-hang.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-unstalbe-ssl-migration-hang.patch" diff -Nurap xen-unstable.orig/tools/python/xen/xend/server/relocate.py xen-unstable/tools/python/xen/xend/server/relocate.py --- xen-unstable.orig/tools/python/xen/xend/server/relocate.py 2009-01-09 14:48:08.000000000 +0800 +++ xen-unstable/tools/python/xen/xend/server/relocate.py 2009-01-09 15:45:05.000000000 +0800 @@ -122,6 +122,8 @@ class RelocationProtocol(protocol.Protoc if self.transport: self.send_reply(["ready", name]) p2cread, p2cwrite = os.pipe() + from xen.util import oshelp + oshelp.fcntl_setfd_cloexec(p2cwrite, True) threading.Thread(target=connection.SSLSocketServerConnection.recv2fd, args=(self.transport.sock, p2cwrite)).start() try: --------------030904090509070409040703 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 --------------030904090509070409040703--