From 06d3d0c4008b273e41260c1e9ef12f16aa4bb8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Sat, 17 Oct 2026 00:47:03 +0200 Subject: [PATCH] fix(uavcan): keep running when the time sync slave fails to start (#29255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run() returned with _node_mutex locked when the time sync slave failed to start, so the next work item on wq:uavcan to lock it (the node itself, or the ESC and servo outputs) blocked the work queue. It also returned before the teardown that uavcan stop waits for, so the destructor gave up after 50 ms and freed the node while _instance still pointed to it. Log the error and continue, as Run() already does with the node status monitor: the slave only lets the node follow a higher-priority time master, and the node keeps publishing its own time without it. Assisted-by: Claude:opus-5.5 Signed-off-by: Benjamin Cabé --- src/drivers/uavcan/uavcan_main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/drivers/uavcan/uavcan_main.cpp b/src/drivers/uavcan/uavcan_main.cpp index 778902de0f8..cdd6298e197 100644 --- a/src/drivers/uavcan/uavcan_main.cpp +++ b/src/drivers/uavcan/uavcan_main.cpp @@ -729,9 +729,8 @@ UavcanNode::Run() const int slave_init_res = _time_sync_slave.start(); if (slave_init_res < 0) { + // not fatal: the slave only follows a higher-priority time master, the node keeps publishing its own time PX4_ERR("Failed to start time_sync_slave"); - ScheduleClear(); - return; } /* When we have a system wide notion of time update (i.e the transition from the initial