Skip to content

Fix race condition in test clock (backport #2819)#2821

Merged
MichaelOrlov merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-2819
May 1, 2025
Merged

Fix race condition in test clock (backport #2819)#2821
MichaelOrlov merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-2819

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Apr 18, 2025

This Pull Request intends to fix the issue #2804

In order to do so, I first ran helgrind on the code, and found that there existed a race condition in a vector of booleans. Afterwards, I changed this vector to std::atomic_bool . With that, I ran the helgrind again, and found there was no more race condition.

This is the full log of helgrind for the original code.
This is the full log of helgrind for the modified code.

Note that, since they are the full log of the helgrind, in both of these snippets, there are some unrelated warnings. However, by searching for data race inside this logs, it is possible to see that they were corrected.

This is my first Pull Request, so if there are any changes I still have to do, please let me know.
(Edit: I just realized my signature in the commit was wrong. I believe I have corrected it, hopefully everything is OK now)


This is an automatic backport of pull request #2819 done by Mergify.

Signed-off-by: pedroazeredo04 <pedro_azeredo@usp.br>
Signed-off-by: Pedro Nogueira <pedro_azeredo@usp.br>
(cherry picked from commit 8e49bef)
@fujitatomoya
Copy link
Collaborator

Pulls: #2821
Gist: https://gist.githubusercontent.com/fujitatomoya/1a9b31862c6326880d96062f2d19d363/raw/55fd3d36d658bc6b8ad6768c9011eabef83c45fb/ros2.repos
BUILD args: --packages-up-to rclcpp
TEST args: --packages-select rclcpp
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15717

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

@MichaelOrlov MichaelOrlov merged commit b152039 into jazzy May 1, 2025
3 checks passed
@MichaelOrlov MichaelOrlov deleted the mergify/bp/jazzy/pr-2819 branch May 1, 2025 17:45
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