From e20934583e8471159b4cd763ee070cb43cabc6b9 Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 25 Jun 2021 10:21:31 +0200 Subject: [PATCH] Remove an unsafe assert in the log backend that could be triggered under very certain circumstances. RFCI has detected this assert failing in the log_backend_test. I have not been able to reproduce this locally but my theory is the following one: one of the unit tests does the following: backend.start(); backend.stop(); the internal running_flag member could be set to true and then to false by the main thread before the worker thread calls do_work(). If this happens the assert will be triggered, which is wrong and too conservative, so remove the assert. --- lib/src/srslog/backend_worker.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/src/srslog/backend_worker.cpp b/lib/src/srslog/backend_worker.cpp index 8c1040599..87c043842 100644 --- a/lib/src/srslog/backend_worker.cpp +++ b/lib/src/srslog/backend_worker.cpp @@ -85,8 +85,6 @@ void backend_worker::start(backend_priority priority) void backend_worker::do_work() { - assert(running_flag && "Thread entry function called without running thread"); - /// This period defines the time the worker will sleep while waiting for new entries. This is required to check the /// termination variable periodically. constexpr std::chrono::microseconds sleep_period{100};