]> git.lttng.org Git - lttng-tools.git/commitdiff
Fix: sessiond: notification-thread: add to pollset fails silently
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 20 Nov 2024 16:44:12 +0000 (16:44 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 29 Nov 2024 19:01:45 +0000 (14:01 -0500)
Noticed when reviewing the code, so I don't have a reproducer
for the issue. However, the "ADD_TRACER_EVENT_SOURCE" command
returns LTTNG_OK even when the notification thread fails to add
the tracer event source to the poll set.

The error path properly performs the requisite clean-up, but
the command emitter will be under the impression that the command
succeeded. In doing so, it will most likely use the
"REMOVE_TRACER_EVENT_SOURCE" at a later point which will cause
a failed assertion to hit when the `source_element` isn't found.

Change-Id: I4a400d6affa21d2c2247ecfb845ca1e4aa730b5d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/notification-thread-events.cpp

index cb8fc609fadbc6e1cbe9c39b588ad73efe4eb010..90ce228797df73d4b6d1fc1b3af010b7dea11fc7 100644 (file)
@@ -2073,6 +2073,7 @@ handle_notification_thread_command_add_tracer_event_source(struct notification_t
                    lttng_domain_type_str(element->domain));
                cds_list_del(&element->node);
                free(element);
+               cmd_result = LTTNG_ERR_UNK;
                goto end;
        }
 
This page took 0.03145 seconds and 4 git commands to generate.