Fix: close consumer sockets before waiting for them
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Aug 2019 19:36:08 +0000 (15:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 00:00:57 +0000 (20:00 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index ac7f7c910317d45158ac75991fa55cea17af7610..a29417af59e7aeb7a90513cc5346f21db82f6346 100644 (file)
@@ -327,17 +327,18 @@ static void sessiond_cleanup(void)
 
        pthread_mutex_destroy(&session_list->lock);
 
-       wait_consumer(&kconsumer_data);
-       wait_consumer(&ustconsumer64_data);
-       wait_consumer(&ustconsumer32_data);
-
        DBG("Cleaning up all agent apps");
        agent_app_ht_clean();
-
        DBG("Closing all UST sockets");
        ust_app_clean_list();
        buffer_reg_destroy_registries();
 
+       close_consumer_sockets();
+
+       wait_consumer(&kconsumer_data);
+       wait_consumer(&ustconsumer64_data);
+       wait_consumer(&ustconsumer32_data);
+
        if (is_root && !config.no_kernel) {
                DBG2("Closing kernel fd");
                if (kernel_tracer_fd >= 0) {
@@ -351,8 +352,6 @@ static void sessiond_cleanup(void)
                free(syscall_table);
        }
 
-       close_consumer_sockets();
-
        /*
         * We do NOT rmdir rundir because there are other processes
         * using it, for instance lttng-relayd, which can start in
This page took 0.038136 seconds and 4 git commands to generate.