[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.