diff mbox series

[lttng-tools] Fix: don't start tracing twice for UST applications

Message ID 20181219172643.28954-1-mathieu.desnoyers@efficios.com
State Not Applicable
Delegated to: Jérémie Galarneau
Headers show
Series [lttng-tools] Fix: don't start tracing twice for UST applications | expand

Commit Message

Mathieu Desnoyers Dec. 19, 2018, 5:26 p.m. UTC
The change introduced by commit 0498a00cbc "Fix: sessiond: don't
allocate buffers and files for inactive sessions" adds a
ust_app_global_update() for each application without removing the
pre-existing ust_app_start_trace(), which effectively attempts to start
tracing twice for each application already registered prior to the
"start" command.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
 src/bin/lttng-sessiond/ust-app.c | 9 ---------
 1 file changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c
index 0b0a6253..feb59d80 100644
--- a/src/bin/lttng-sessiond/ust-app.c
+++ b/src/bin/lttng-sessiond/ust-app.c
@@ -5018,7 +5018,6 @@  end:
  */
 int ust_app_start_trace_all(struct ltt_ust_session *usess)
 {
-	int ret = 0;
 	struct lttng_ht_iter iter;
 	struct ust_app *app;
 
@@ -5044,14 +5043,6 @@  int ust_app_start_trace_all(struct ltt_ust_session *usess)
 		ust_app_global_update(usess, app);
 	}
 
-	cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
-		ret = ust_app_start_trace(usess, app);
-		if (ret < 0) {
-			/* Continue to next apps even on error */
-			continue;
-		}
-	}
-
 	rcu_read_unlock();
 
 	return 0;