From: Jérémie Galarneau Date: Wed, 9 May 2018 01:23:14 +0000 (-0400) Subject: Fix: agent thread poll set creation failure results in deadlock X-Git-Tag: v2.11.0-rc1~241 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=04fd2d2e705f7d9956f4cb8b18f6c43452913a16;p=lttng-tools.git Fix: agent thread poll set creation failure results in deadlock Failing to initialize the agent thread's pollset will cause the thread to exit before calling sessiond_notify_ready(). This will cause the main thread to wait forever for all threads to be launched when such an error occurs. The agent thread is not needed for the sessiond to work (except to enable the tracing of Java and Python applications). Such a failure should leave the sessiond in a useable state. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/agent-thread.c b/src/bin/lttng-sessiond/agent-thread.c index f8456b428..b23865681 100644 --- a/src/bin/lttng-sessiond/agent-thread.c +++ b/src/bin/lttng-sessiond/agent-thread.c @@ -308,6 +308,7 @@ void *agent_thread_manage_registration(void *data) /* Create pollset with size 2, quit pipe and socket. */ ret = sessiond_set_thread_pollset(&events, 2); if (ret < 0) { + sessiond_notify_ready(); goto error_poll_create; }