Fix race condition when creating isolated component container - #3223
Merged
skyegalaxy merged 2 commits intoAug 13, 2026
Conversation
…ad_num parameter dynamically Signed-off-by: Tony Najjar <tony.najjar@dexory.com>
…ad resolution Signed-off-by: Tony Najjar <tony.najjar@dexory.com>
Contributor
Author
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
skyegalaxy
self-requested a review
August 12, 2026 15:49
skyegalaxy
approved these changes
Aug 12, 2026
Member
|
Pulls: #3223, ros2/launch_ros#563 |
Member
|
https://github.com/Mergifyio backport lyrical |
Contributor
✅ Backports have been createdDetails
|
skyegalaxy
pushed a commit
that referenced
this pull request
Aug 13, 2026
…#3228) * Refactor thread management in ComponentManagerIsolated to handle thread_num parameter dynamically * Add test for isolated multi-threaded component manager with auto thread resolution --------- (cherry picked from commit 81ec3e3) Signed-off-by: Tony Najjar <tony.najjar@dexory.com> Co-authored-by: Tony Najjar <tony.najjar@dexory.com>
fujitatomoya
approved these changes
Aug 13, 2026
fujitatomoya
left a comment
Collaborator
There was a problem hiding this comment.
lgtm with green CI.
Collaborator
|
ah, sorry one step behind. the comment was cached in the browser. |
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.
Description
Fix race condition when creating isolated component container
What
The isolated
component_containercreated a throwawayComponentManagersolely to read thethread_numparameter, then destroyed it and re-created the realComponentManagerIsolated. This briefly advertised the container's~/_container/load_nodeservice and tore it down, racingLoadComposableNodesclients and silently dropping load requests.Changes
component_container.cpp: construct the manager once, directly as its final type. Isolated managers are now built withnum_threads == 0("auto").component_manager_isolated.hpp: inadd_node_to_executor,num_threads_ == 0now resolves thethread_numparameter itself (defaults to hardware concurrency), so the container no longer needs to read it up front.isolated_multi_threaded_auto_thread_num) covering the isolated multi-threaded "auto" path.Notes
ComponentManager's layout is untouched.-p thread_num:=Nfor isolated multi-threaded/events executors.lyrical(identical baseline).Fixes #3222
Is this user-facing behavior change?
Did you use Generative AI?
Additional Information