Fix: libc internal mutex races with run_as
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Sep 2015 15:30:29 +0000 (11:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Sep 2015 16:38:04 +0000 (12:38 -0400)
commit7567352fb68f5c3f49f549c579f5bd27c883bed2
treef95800770f07cab3f1c0799c419da0010431f8de
parent73ec1cf980a0685ef6443de2fb8ca9fae4a20da3
Fix: libc internal mutex races with run_as

Implement a proper run_as worker process scheme to fix internal libc
mutex races. Those races lead to having the internal mutex held by
another process when clone() is called, thus hanging the clone child.

Now that we create the worker process when the parent process is
still single-threaded, we don't run into those issues. Implement a
standard fork + file descriptor passing over unnamed unix sockets rather
than the prior clone + shared file descriptor table, which was causing
issues with valgrind.

This adds a new process called "lttng-runas" for each sessiond
and consumerd process.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.c
src/bin/lttng-sessiond/main.c
src/common/Makefile.am
src/common/consumer.c
src/common/defaults.h
src/common/hashtable/rculfhash.c
src/common/runas.c
src/common/runas.h
src/common/sessiond-comm/Makefile.am
src/common/sessiond-comm/unix.c
src/common/sessiond-comm/unix.h
This page took 0.025061 seconds and 4 git commands to generate.