From: Jérémie Galarneau Date: Wed, 9 May 2018 01:26:15 +0000 (-0400) Subject: Fix: sessiond fails to launch on --without-ust configuration X-Git-Tag: v2.10.5~17 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d741ba7f3241479e38278de12ce69f4bdd8b825d;p=lttng-tools.git Fix: sessiond fails to launch on --without-ust configuration The sessiond will never signal that it is ready (in daemonize or background modes) if it was built without lttng-ust. The fix in 7eac7803 made the main thread wait for the agent thread to be ready before signalling that the session daemon is ready. When agent tracing is not possible due to the absence of lttng-ust, a stub function is used to launch the agent thread. This stub must call sessiond_notify_ready() in order to unblock the main thread. Note that it would be _incorrect_ to not wait for the agent thread to be launched as users expect all tracing features to be available as soon as 'lttng-sessiond --daemonize/--background' returns. Not waiting for the thread to be ready caused very rare failures of the agent tracing tests on the CI, especially on ARM and PowerPC targets. Reported-by: Francis Deslauriers Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/agent-thread.h b/src/bin/lttng-sessiond/agent-thread.h index 6bdfdcd5e..4bed47b37 100644 --- a/src/bin/lttng-sessiond/agent-thread.h +++ b/src/bin/lttng-sessiond/agent-thread.h @@ -30,6 +30,7 @@ bool agent_tracing_is_enabled(void); static inline void *agent_thread_manage_registration(void *data) { + sessiond_notify_ready(); return NULL; } static inline