Skip to content

address context shutdown racy condition. - #3217

Closed
fujitatomoya wants to merge 1 commit into
rollingfrom
fujitatomoya/racy-context-shutdown
Closed

address context shutdown racy condition.#3217
fujitatomoya wants to merge 1 commit into
rollingfrom
fujitatomoya/racy-context-shutdown

Conversation

@fujitatomoya

Copy link
Copy Markdown
Collaborator

Description

replaces #3216

Fixes # (issue)

Is this user-facing behavior change?

Not really, it internally addresses the racy condition on context shutdown.

Did you use Generative AI?

Yes, Claude Fable 5.

Additional Information

Signed-off-by: Tomoya Fujita <fujita.tomoya@triorb.co.jp>
@mergify

mergify Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@fujitatomoya fujitatomoya left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@jmachowinski @skyegalaxy

this is ABI compatible, so we can backport this to downstream distros. what do you think?

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

Pulls: #3217
Gist: https://gist.githubusercontent.com/fujitatomoya/3495a050d6d222a06e02762c94cd4d50/raw/3bace1d5b4ffe0c0803c7b8daadf115bcb379653/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp
TEST args: --packages-above rclcpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/20050

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

@skyegalaxy skyegalaxy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm for fixing this in previous distros in an ABI-compatible way, although IMO, I feel like the diff in https://github.com/ros2/rclcpp/pull/3216/changes is cleaner than introducing a g_contexts_in_shutdown.

My slight preference would be for if @fishitiny 's PR had targeted rolling and included the regression test added in this PR, and this g_contexts_in_shutdown variant was only used for backports, but not a big deal if we wanna merge as-is

@jmachowinski

jmachowinski commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

I agree this is more the back port and the other version was cleaner and should go into rolling

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

@jmachowinski @skyegalaxy

you are right. let's use this PR only for downstream branches, and address rolling with appropriate simple one. i will create the new PR for rolling and retarget this PR to lyrical.

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