From 3b8a092fd73f011309058e0ca15c00ced3664803 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 14 Dec 2020 17:30:12 -0500 Subject: [PATCH] Fix: add rcu_barrier() after sessiond_cleanup() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is to ensure that tracer event source (event notifier socket) are removed from the notification thread list. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: I2ca8f72c023132c341193bf626c0dac20b89e1f2 --- src/bin/lttng-sessiond/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 4bdac5217..9cc15d720 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1779,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); -- 2.34.1