Skip to content

fix(timer): Delete node, after executor thread terminated#2737

Merged
mjcarroll merged 1 commit intoros2:rollingfrom
cellumation:flaky_timer_test
Feb 10, 2025
Merged

fix(timer): Delete node, after executor thread terminated#2737
mjcarroll merged 1 commit intoros2:rollingfrom
cellumation:flaky_timer_test

Conversation

@jmachowinski
Copy link
Copy Markdown
Collaborator

This fixes a potential race leading to a segfault. The segfault would happen, if the tear down of the test would occur before the timer thread stopped the spinning of the executor.

Also simplifies the test code, as the cancel of the executor is now in the TearDown().

This fixes a potential race leading to a segfault. The segfault would
happen, if the tear down of the test would occur before the timer thread
stopped the spinning of the executor.

Also simplifies the test code, as the cancel of the executor is now in
the TearDown().

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Feb 10, 2025

Pulls: #2737
Gist: https://gist.githubusercontent.com/ahcorde/0f190f722457e6b4e4bbedb7efe1bc14/raw/f2ee901154ed46fddbb66b9284406cf6673792da/ros2.repos
BUILD args: --packages-up-to rclcpp --packages-above-and-dependencies rclcpp
TEST args: --packages-select rclcpp --packages-above rclcpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15153

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

@mjcarroll mjcarroll merged commit f6b80ab into ros2:rolling Feb 10, 2025
2 checks passed
@fujitatomoya
Copy link
Copy Markdown
Collaborator

@Mergifyio backport jazzy

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 11, 2025

backport jazzy

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Feb 11, 2025
This fixes a potential race leading to a segfault. The segfault would
happen, if the tear down of the test would occur before the timer thread
stopped the spinning of the executor.

Also simplifies the test code, as the cancel of the executor is now in
the TearDown().

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>
(cherry picked from commit f6b80ab)
ahcorde pushed a commit that referenced this pull request Feb 11, 2025
)

This fixes a potential race leading to a segfault. The segfault would
happen, if the tear down of the test would occur before the timer thread
stopped the spinning of the executor.

Also simplifies the test code, as the cancel of the executor is now in
the TearDown().

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>
(cherry picked from commit f6b80ab)

Co-authored-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
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.

4 participants