Skip to content

Destroy the executor before unloading component libraries (backport #3319) - #3363

Merged
ahcorde merged 1 commit into
lyricalfrom
mergify/bp/lyrical/pr-3319
Oct 19, 2026
Merged

ahcorde merged 1 commit into
lyricalfrom
mergify/bp/lyrical/pr-3319

Conversation

@mergify

@mergify mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Description

component_container and node_main.cpp.in declare the executor first, so it is destroyed after the component libraries are unloaded. EventsCBGExecutor still holds references to component entities at that point and crashes on Ctrl-C (#3312). The executor is now declared after the manager / loader, so it is destroyed first.

Suggested by @jmachowinski in #3313.

Is this user-facing behavior change?

No.

Did you use Generative AI?

Assisted-by: Claude Opus 5.5

Additional Information


This is an automatic backport of pull request #3319 done by [Mergify](https://mergify.com).

The component container and the node_main template declared the
executor first, so it was destroyed last, after the component
libraries were unloaded. An executor still holding references to
component entities then released them into unloaded code, e.g. the
EventsCBGExecutor crashed on Ctrl-C.

Declare the executor after the component manager and the class
loader, so it is destroyed first.

Assisted-by: Claude Code:claude-opus-5-5

Signed-off-by: Vojtech Spurny <spurny@fly4future.com>
(cherry picked from commit efd18d6)
@ahcorde

ahcorde commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Pulls: #3363
Gist: https://gist.githubusercontent.com/ahcorde/ae3163628cfae93e92e58dded2dc385e/raw/680ea2d932780158579df043420f1899337e4f33/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp_components
TEST args: --packages-above rclcpp_components
ROS Distro: lyrical
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/20799

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
ahcorde merged commit 3498b30 into lyrical Oct 19, 2026
3 checks passed
@ahcorde
ahcorde deleted the mergify/bp/lyrical/pr-3319 branch October 19, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants