Skip to content

fix: Don't deadlock if removing shutdown callbacks in a shutdown callback#2886

Merged
ahcorde merged 3 commits intoros2:rollingfrom
cellumation:shutdown_deadlock_fix_rolling
Jul 2, 2025
Merged

fix: Don't deadlock if removing shutdown callbacks in a shutdown callback#2886
ahcorde merged 3 commits intoros2:rollingfrom
cellumation:shutdown_deadlock_fix_rolling

Conversation

@jmachowinski
Copy link
Copy Markdown
Collaborator

Description

Fixes a deadlock, if a shutdown callback was removed during a shutdown callback.

Is this user-facing behavior change?

Yes, the users nodes do not hang any more on shutdown under special conditions.

Did you use Generative AI?

No

Copy link
Copy Markdown
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…back

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
@jmachowinski jmachowinski force-pushed the shutdown_deadlock_fix_rolling branch from 21f9c92 to e03a2cf Compare July 1, 2025 08:35
@jmachowinski
Copy link
Copy Markdown
Collaborator Author

Pulls: #2886
Gist: https://gist.githubusercontent.com/jmachowinski/33abba24e889fbb03ff6a202c2b7a050/raw/72a33bfaf7a8fea9abb86a6074c664e6debfc087/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16371

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

Copy link
Copy Markdown
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with nitpicks. (i think restarting CI is not required, because they are just comment fixes.)

jmachowinski and others added 2 commits July 1, 2025 18:33
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
@jmachowinski
Copy link
Copy Markdown
Collaborator Author

All test failures seem unrelated, @ahcorde do you agree ?

@ahcorde ahcorde merged commit 7ebc9e4 into ros2:rolling Jul 2, 2025
2 of 3 checks passed
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Jul 2, 2025

All test failures seem unrelated, @ahcorde do you agree ?

Yes, all good

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.

3 participants