From: Bastian Blank Subject: xenstored startup - race condition Date: Fri, 7 Mar 2008 13:14:51 +0100 Message-ID: <20080307121451.GA9468@wavehammer.waldi.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline 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@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi folks The Debian packages carries a patch since some time which fixes a race condition in the xenstore startup. Sometimes xenconsoled is not able to connect the xenstore and just exits. A second try works, so xenstored was just not yet ready. Proposed fix: - xend asks xenstored to also fork, this also reparents it to init. - xenstored delays the exit of the parent until properly initialized and ready to accept connections. - xend waits for exit of this process. Implementation: Either fork, execv and waitpid or subprocess. Bastian -- Yes, it is written. Good shall always destroy evil. -- Sirah the Yang, "The Omega Glory", stardate unknown