Fix: add rcu_barrier() after sessiond_cleanup()
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index a62719a1281fa5f508ac1c8b7fdc019357c73935..9cc15d720210fc2a267fe178be19f55a31cf682a 100644 (file)
@@ -1302,6 +1302,7 @@ int main(int argc, char **argv)
        struct lttng_thread *notification_thread = NULL;
        struct lttng_thread *register_apps_thread = NULL;
 
+       logger_set_thread_name("Main", false);
        init_kernel_workarounds();
 
        rcu_register_thread();
@@ -1778,6 +1779,13 @@ stop_threads:
        rcu_thread_online();
        sessiond_cleanup();
 
+       /*
+        * Wait for all pending call_rcu work to complete tearing shutting down
+        * the notification thread. This call_rcu work includes shutting down
+        * UST apps and event notifier pipes.
+        */
+       rcu_barrier();
+
        if (notification_thread) {
                lttng_thread_shutdown(notification_thread);
                lttng_thread_put(notification_thread);
This page took 0.029446 seconds and 4 git commands to generate.