From c16ac6c8902d791133668687a93537324ad533fe Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Sun, 30 Aug 2020 22:51:07 +0200 Subject: [PATCH] ue_stack: only push sync event to event queue is stack is still running stopping the UE in ZMQ mode caused a dead-lock because the Stack was stopped before the PHY causing the sync queue to overflow. Since we use a queue-length of 1 in ZMQ, mode, the PHY sync thread was blocking to push a new sync event while the stack thread was already stopped. this patch makes sure no new sync events are queued after the stack has been terminated. --- srsue/src/stack/ue_stack_lte.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsue/src/stack/ue_stack_lte.cc b/srsue/src/stack/ue_stack_lte.cc index 892a3a9a8..b1ecaf826 100644 --- a/srsue/src/stack/ue_stack_lte.cc +++ b/srsue/src/stack/ue_stack_lte.cc @@ -269,7 +269,9 @@ void ue_stack_lte::out_of_sync() void ue_stack_lte::run_tti(uint32_t tti, uint32_t tti_jump) { - sync_task_queue.push([this, tti, tti_jump]() { run_tti_impl(tti, tti_jump); }); + if (running) { + sync_task_queue.push([this, tti, tti_jump]() { run_tti_impl(tti, tti_jump); }); + } } void ue_stack_lte::run_tti_impl(uint32_t tti, uint32_t tti_jump)