Fix: channel errors on local stress-tests
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 14 Nov 2018 22:46:26 +0000 (17:46 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 22:45:01 +0000 (17:45 -0500)
On local stress-tests with per-pid buffers, error paths triggered
when trying to create a channel on an application already going away
end up tiggering the channel destruction with "-1" socket parameter.
This function attempts to send a notification of channel destruction
(erroneously) and attempts to sum counters into a channel object which
may not have been populated yet.

Therefore, don't perform those side-effects when invoked from error path
caused by channel creation error.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index e6b4250c11a255aaa600b353fb766e1b5ef54c35..48da16b1072a6264949a889c8298958e2c33d4d3 100644 (file)
@@ -486,9 +486,11 @@ void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan,
                registry = get_session_registry(ua_chan->session);
                if (registry) {
                        ust_registry_channel_del_free(registry, ua_chan->key,
-                               true);
+                               sock >= 0);
+               }
+               if (sock >= 0) {
+                       save_per_pid_lost_discarded_counters(ua_chan);
                }
-               save_per_pid_lost_discarded_counters(ua_chan);
        }
 
        if (ua_chan->obj != NULL) {
This page took 0.02805 seconds and 5 git commands to generate.