Fix: race between kconsumerd and sessiond on tear down
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 3 Sep 2015 21:48:36 +0000 (17:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Sep 2015 13:37:48 +0000 (09:37 -0400)
commit5fa629ecb8f63a0ea75de7497b1be74a5cf7063e
tree3c80e3dd852b4322a24e45d2a2cc513af51c6a7f
parent66af39b772a68f8ed6bfa88f9998d0d0ec5d9fb4
Fix: race between kconsumerd and sessiond on tear down

v2: minimize indentation by using return on condition.

Kconsumerd and sessiond both have reference on lttng-module. This can lead to a race
on modprobe_remove_lttng_all which might fail to unload modules due to
certain modules not having a ref count equal to zero at the time.

waitpid is used to force a synchronization on the child (kconsumer) termination.

This also have been applied to ust consumers for the sake of consistency.

Fixes: #878
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.02794 seconds and 4 git commands to generate.