Fix: agent thread poll set creation failure results in deadlock
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 May 2018 01:23:14 +0000 (21:23 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 May 2018 21:28:38 +0000 (17:28 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent-thread.c

index bc1fac69965582bb91233e64417d99f9e7feab93..189e3ba6b671d38db58b19b6c998530ebcc3fae0 100644 (file)
@@ -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;
        }
 
This page took 0.02593 seconds and 4 git commands to generate.