Open
Conversation
added 9 commits
February 20, 2026 02:04
added 20 commits
February 20, 2026 23:32
…d separate reentrant callback groups
…races" This reverts commit e8a1389.
…n anymore and can executore multiple timers from multiple nodes, but the MT executor only uses the main thread ?!
…sary occurence of an icey-type that is the same as in rclcpp_action.
…eentrant suffices
…tched the async operation and detached the coroutine checks again if this coroutine is finished in it's destructor, while another thread continues the same coroutine. The fix is easy, since we do not have to do anything with this coroutine state in case we detached, we simply set the pointer to the coroutine state (aka. coroutine_handle) to zero
…e it is exception safe
…sociated with executor.
added 6 commits
February 22, 2026 13:56
…t_ready false if there is coroutine pointer: In this case, we are done (short-circuiting still prevents accessing .done() on a nullptr)
…om the timer callback
…ce) and removed the warning about MT executor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the async/await API thread-safe:
Adds Thread Sanitizer (TSAN) instrumentation compile flags and a list of rules for ignoring all the noise (dataraces in CycloneDDS).
TSAN evaluation
I've tested extensively with TSAN to find data races. For this, I've made the synchronization conditional and then wrote test cases that provoke data races. For this, I'm using the MultiThreadedExecutor with 8 threads, and spawning 100 timers that use the ICEY async/await API for TF, services and actions.
To ensure that the timer callbacks are called concurrently, they belong to an reentrant callback group.
Using this setup, TSAN correctly detected multiple data-races. on the task-timer hashtable,
Races fixed
launch_asyncthat dispatches an async operation to a new thread inpromise.await_suspend(), and the destructor of this promise that is called when another thread resumes the coroutine that holds this same promise. Fixed in cdb6094While testing with TSAN, I found among the races in ICEY also two races in rclcpp:
ClientBase:generate_goal_id) (fixed in 0df6334)std:weak_ptr<TimerBase>: This one is very likely a false-positive caused by TSAN using non-instrumented rclcpp code. It can't possibly be a race because it happens in the control block of a shared_ptr, which is thread-safe.Other changes
notify_if_any_relevant_transform_was_receivedif multi-theading support is disabledAsyncAwaitTwoNodeTest) related to capturing by reference in a coroutine lambdarclcpp_actionstype forWrappedResultso that users do not have to rewrite their code unnecessarily when using ICEYTODO: