Fix: Lock FD tracker across fork
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 4 Oct 2019 14:07:03 +0000 (10:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 Oct 2019 16:00:47 +0000 (12:00 -0400)
commitc1be081a2f016fb6dcaef1d471389ede3aa00103
treeba430a0f7e13042a8a4dae6a007b9ffa42b4cf00
parentf596de62e69d1942ec545b8ba6b8f8b7244f8fb4
Fix: Lock FD tracker across fork

If fork() is performed while other threads are holding the fd tracker
lock, it will stay in locked state in the child process and eventually
cause a deadlock.

One way to solve this is to hold the fd tracker lock across fork(), in
the same way we do for the ust_lock. This ensures no other threads are
holding that lock in the parent, and therefore provides a consistent
lock state in the child.

Fixes: #1199
Fixes: #1200
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-comm/lttng-ust-fd-tracker.c
liblttng-ust/lttng-ust-comm.c
This page took 0.030074 seconds and 4 git commands to generate.