lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [PATCH lttng-tools master, 2.11] Fix: destroy command: put consumer output after destroy notifier
@ 2019-09-20 21:41 Mathieu Desnoyers
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2019-09-20 21:41 UTC (permalink / raw)
  To: jgalar; +Cc: lttng-dev

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 <mathieu.desnoyers@efficios.com>
---
 src/bin/lttng-sessiond/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c
index 9072a2ec..7fd4332e 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) {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH lttng-tools master, 2.11] Fix: destroy command: put consumer output after destroy notifier
       [not found] <20190920214114.1073-1-mathieu.desnoyers@efficios.com>
@ 2019-09-20 21:53 ` Jérémie Galarneau
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2019-09-20 21:53 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev, jgalar

Merged in master and stable-2.11. Thanks!

Jérémie

On Fri, Sep 20, 2019 at 05:41:14PM -0400, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> ---
>  src/bin/lttng-sessiond/session.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c
> index 9072a2ec..7fd4332e 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) {
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-20 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 21:41 [PATCH lttng-tools master, 2.11] Fix: destroy command: put consumer output after destroy notifier Mathieu Desnoyers
     [not found] <20190920214114.1073-1-mathieu.desnoyers@efficios.com>
2019-09-20 21:53 ` Jérémie Galarneau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).