Fix: relayd: missing metadata stream causes all traces to be skipped
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Dec 2019 09:59:10 +0000 (04:59 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 Dec 2019 00:22:17 +0000 (19:22 -0500)
Commit 123ed7c22 intends for a trace that doesn't have a metadata
stream to be skipped when creating viewer streams. However, the loop
over ctf_traces should be "continued" rather then "broken" from when
this situation arises. Otherwise, all ctf_traces of the session are
skipped, which is not the intention here.

Moreover, a reference to the current ctf_trace is leaked when the
break (now continue) occurs.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ic630521c6f050c77a78f2c1e20c5741a6b3a66a1

src/bin/lttng-relayd/live.c

index 6c1dbcd36763f5c7309ab4e5b08d12c1fd528860..f00f07db1b8e63fc280c5a868379da2a47a68ade 100644 (file)
@@ -338,7 +338,8 @@ static int make_viewer_streams(struct relay_session *session,
                 */
                if (!trace_has_metadata_stream &&
                                !ctf_trace->metadata_stream_sent_to_viewer) {
-                       break;
+                       ctf_trace_put(ctf_trace);
+                       continue;
                }
 
                cds_list_for_each_entry_rcu(stream, &ctf_trace->stream_list, stream_node) {
This page took 0.027593 seconds and 4 git commands to generate.