From: Mathieu Desnoyers Date: Fri, 20 Sep 2019 21:41:14 +0000 (-0400) Subject: Fix: destroy command: put consumer output after destroy notifier X-Git-Tag: v2.11.0-rc4~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5b9d726b0ae2082905e7c56ab662e0717689d1ce;p=lttng-tools.git Fix: destroy command: put consumer output after destroy notifier The destroy notifier needs to access the consumer output to format the absolute path to the last chunk. The observed problematic behavior can be observed by doing a rotate and a destroy command in quick succession. Sometimes, the resulting path printed by the destroy command is incomplete: e.g. /archives/20190920T163616-0400-20190920T163618-0400-1 when we would expect: /home/efficios/lttng-traces/auto-20190920-164425/archives/20190920T164437-0400-20190920T164439-0400-1 Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c index 9072a2ecb..7fd4332ec 100644 --- a/src/bin/lttng-sessiond/session.c +++ b/src/bin/lttng-sessiond/session.c @@ -811,7 +811,6 @@ void session_release(struct urcu_ref *ref) DBG("Destroying session %s (id %" PRIu64 ")", session->name, session->id); - consumer_output_put(session->consumer); snapshot_destroy(&session->snapshot); pthread_mutex_destroy(&session->lock); @@ -823,6 +822,7 @@ void session_release(struct urcu_ref *ref) } session_notify_destruction(session); + consumer_output_put(session->consumer); kernel_free_session(ksess); session->kernel_session = NULL; if (usess) {