Component container fail unexpected
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
I encounter this problem/bug with the component CLI not sure what cause the issue so the title may not be correct.
Bug report
- Operating System:
- Ubuntu 20.04
- Installation type:
- binaries
- Version or commit hash:
- foxy
- DDS implementation:
- Fast-RTPS
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
The issue can be reproduce with the demo code of rclcpp_component. When execute following command:
1st terminal: ros2 run rclcpp_components component_container
2nd terminal:
ros2 component load /ComponentManager demo_nodes_cpp demo_nodes_cpp::Talker
ros2 component unload /ComponentManager 1
ros2 component load /ComponentManager demo_nodes_cpp demo_nodes_cpp::Talker
ros2 component unload /ComponentManager 2
Expected behavior
The component should load and unload as normal
Actual behavior
From the instance the 2nd component load in the ComponentManager seem to just fail and all service is unavailable (e.g component list,, load, unload)
Additional information
But if skip the first unload then the ComponentManager will kept running without issue and all service exist.
Terminal output of both error and working case:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the rclcpp_components component_container and the documented ros2 component load/unload commands on Ubuntu 20.04 with Foxy and Fast-RTPS. Trace the component manager and load/unload entry points to determine why the second load leaves its services unavailable. Done means the manager remains usable after the unload, load, and second unload sequence, with coverage for the failing sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100