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 21:11:53 +0000 (17:11 -0400)
commit0e904f3e714079406c39a2ad6d5bb7960b6aa6cb
treede7491b421fa3ff3eb380edd5209da3fb3eb5603
parent1785fb2b5d7855026da7d65ed278006c5595c3f4
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.027105 seconds and 4 git commands to generate.