X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.cpp;h=473138cf8861d16871cc6b2f250bf1fb6b911229;hb=942003e52b8fe43bfb8f28a1884d3bda7e6d1e0b;hp=8754d48a1d2eeb519d2273cba67332c01bf50f31;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/rotation-thread.cpp b/src/bin/lttng-sessiond/rotation-thread.cpp index 8754d48a1..473138cf8 100644 --- a/src/bin/lttng-sessiond/rotation-thread.cpp +++ b/src/bin/lttng-sessiond/rotation-thread.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "rotation-thread.h" #include "lttng-sessiond.h" @@ -214,7 +215,10 @@ void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue, * the job will be processed when the rotation_thread catches * up. */ + DIAGNOSTIC_PUSH + DIAGNOSTIC_IGNORE_LOGICAL_OP if (errno == EAGAIN || errno == EWOULDBLOCK) { + DIAGNOSTIC_POP /* * Not an error, but would be surprising and indicate * that the rotation thread can't keep up with the @@ -584,7 +588,7 @@ int handle_job_queue(struct rotation_thread_handle *handle, session = job->session; if (!session) { DBG("Session \"%s\" not found", - session->name); + session->name != NULL ? session->name : ""); /* * This is a non-fatal error, and we cannot report it to * the user (timer), so just print the error and @@ -659,10 +663,15 @@ int handle_condition(const struct lttng_condition *condition, session_lock_list(); session = session_find_by_name(condition_session_name); if (!session) { - ret = -1; - session_unlock_list(); - ERR("Session \"%s\" not found", + DBG("Failed to find session while handling notification: notification type = %s, session name = `%s`", + lttng_condition_type_str(condition_type), condition_session_name); + /* + * Not a fatal error: a session can be destroyed before we get + * the chance to handle the notification. + */ + ret = 0; + session_unlock_list(); goto end; } session_lock(session);