Commit 43d1297
committed
fix(gateway): switch to MultiThreadedExecutor for thread-safe subscription creation
SingleThreadedExecutor does not synchronize Node::create_generic_subscription()
called from external threads (cpp-httplib handlers) with its internal wait set
iteration. This causes non-deterministic SIGSEGV on rolling where rclcpp
internals are less forgiving of concurrent node manipulation.
MultiThreadedExecutor properly synchronizes subscription lifecycle across
threads. All gateway callbacks are already protected by mutexes (EntityCache,
LogManager, TriggerManager, TriggerTopicSubscriber), so concurrent callback
execution is safe.
This is the definitive fix for the rolling SIGSEGV in test_data_read.
The previous sampling_mutex_ + MutuallyExclusiveCallbackGroup fix reduced
the race window but did not eliminate it.1 parent 3af87b2 commit 43d1297
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
0 commit comments