From 2df44f1e14d94e6506192635d7aff0e87a3462f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 8 May 2018 21:23:14 -0400 Subject: [PATCH] Fix: agent thread poll set creation failure results in deadlock MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/agent-thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lttng-sessiond/agent-thread.c b/src/bin/lttng-sessiond/agent-thread.c index bc1fac699..189e3ba6b 100644 --- a/src/bin/lttng-sessiond/agent-thread.c +++ b/src/bin/lttng-sessiond/agent-thread.c @@ -255,6 +255,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; } -- 2.34.1