[Humble] Fix isolated component manager shutdown hang #3282
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 279 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.337
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3282"
general
weight: 0.35
jmachowinski
Description
ComponentManagerIsolated::cancel_executor()currently waits indefinitely forthe dedicated executor to report that it is spinning.
During context shutdown, the executor thread may return from
spin()beforethe component manager is destroyed. In that state,
is_spinning()remainsfalse permanently, so the shutdown path cannot leave the waiting loop. This
causes
component_container_isolatedto remain alive after SIGINT until thelaunch system escalates to SIGTERM or SIGKILL.
This change also checks whether the component manager's ROS context is still
valid while waiting. If shutdown has already invalidated the context, the
method stops waiting and joins the executor thread.
This is an ABI-compatible Humble alternative to #2085. It does not add data
members, change public signatures, add virtual functions, or alter class
layout.
A regression test is included. It loads a real test component, shuts down the
ROS context, verifies that the dedicated executor thread has returned from
spin(), and then destroys the isolated component manager. Without the fix,the test times out while destroying the manager.
Related to #2083.
Humble-compatible alternative to #2085.
Is this user-facing behavior change?
Yes.
component_container_isolatedcan now terminate cleanly after SIGINT whenits dedicated executor threads have already stopped because the ROS context
was shut down. Previously, the process could hang until it was terminated by
SIGTERM or SIGKILL.
Did you use Generative AI?
Yes. OpenAI Codex (GPT-5) was used to assist with analyzing the shutdown race,
implementing the function-body-only fix, and drafting the regression test.
The resulting changes were reviewed and tested locally by the contributor.
Additional Information
Local verification:
test_component_managerandtest_component_manager_apitests pass.copyright,cppcheck,cpplint,lint_cmake,uncrustify, andxmllintchecks pass.
git diff --checkpasses.