From: Jérémie Galarneau Date: Tue, 3 Dec 2019 09:59:10 +0000 (-0500) Subject: Fix: relayd: missing metadata stream causes all traces to be skipped X-Git-Tag: v2.12.0-rc1~195 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3d7708ff51bfae7a01b7062d1f2567b2854ec374;p=lttng-tools.git Fix: relayd: missing metadata stream causes all traces to be skipped 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 Change-Id: Ic630521c6f050c77a78f2c1e20c5741a6b3a66a1 --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 6c1dbcd36..f00f07db1 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -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) {