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-api

[Xen-API] [PATCH 0 of 6] Add a fork/exec daemon

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 0 of 6] Add a fork/exec daemon
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Fri, 18 Dec 2009 20:51:12 +0000
Delivery-date: Fri, 18 Dec 2009 12:50:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
CA-33440: add a single-threaded fork/exec daemon

Under stress testing occasionally xapi fork()s and fails to exec() because the 
subprojecess is spinning in a pthread_create, called from a pthread_atfork 
handler.

Since it's difficult to get fork()+threads right, we switch to a defensive 
model where a single-threaded process (started from init.d) fork()s on behalf 
of xapi.

An additional benefit is the addition of ocaml bindings for sending and 
receiving file descriptors over unix domain sockets.

28 files changed, 974 insertions(+), 136 deletions(-)
Makefile.in                        |   16 ++
forking_executioner/META.in        |    5 
forking_executioner/Makefile       |   78 +++++++++++++-
forking_executioner/child.ml       |  162 +++++++++++++++++++++++++++++
forking_executioner/fe_debug.ml    |   23 ++++
forking_executioner/fe_main.ml     |   89 ++++++++++++++++
forking_executioner/init.d-fe      |   99 ++++++++++++++++++
forking_executioner/test_forker.ml |   49 ++++++++
mk/Makefile                        |    2 
rebuild                            |    2 
scripts/Makefile                   |   13 ++
scripts/install.sh                 |    5 
stdext/META.in                     |    2 
stdext/Makefile                    |   25 +++-
stdext/fe.ml                       |   24 ++++
stdext/fecomms.ml                  |   43 +++++++
stdext/fecomms.mli                 |    8 +
stdext/forkhelpers.ml              |  197 ++++++++++++++++++++++++++----------
stdext/forkhelpers.mli             |   16 ++
stdext/gzip.ml                     |   16 +-
stdext/sha1sum.ml                  |   13 --
stdext/unixext.ml                  |   24 ----
stdext/unixext.mli                 |    4 
stdext/unixext_stubs.c             |  136 ++++++++++++++++++++++++
stunnel/META.in                    |    2 
stunnel/Makefile                   |    8 -
stunnel/stunnel.ml                 |   47 ++++----
stunnel/stunnel.mli                |    2 

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api