Skip to content

Fixes in rmw_wait - #895

Merged
jmachowinski merged 3 commits into
rollingfrom
miguelcompany/fix-guard-condition-race
Sep 8, 2026
Merged

jmachowinski merged 3 commits into
rollingfrom
miguelcompany/fix-guard-condition-race

Conversation

@MiguelCompany

Copy link
Copy Markdown
Collaborator

Description

This fixes two things in rmw_wait:

  • A race where a guard condition is triggered while traversing the collection of guard conditions, and is then untriggered during said traversal
  • RMW_RET_TIMEOUT being returned when an element becomes ready after the wait set timed out

Is this user-facing behavior change?

Did you use Generative AI?

Additional Information

Related regression test in ros2/rmw_implementation#280

@mergify

mergify Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

  • Queue this pull request

@jmachowinski

Copy link
Copy Markdown

Pulls: ros2/rmw_implementation#280, #895
Gist: https://gist.githubusercontent.com/jmachowinski/82143d362c43feb12295efa9e4e95af8/raw/8d562eae8818c75dd24bb468cd2f0aa888fdefb2/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19804

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

@jmachowinski

Copy link
Copy Markdown

Pulls: ros2/rmw_implementation#281, #895
Gist: https://gist.githubusercontent.com/jmachowinski/e73cca6a332608b286a2a14b31a13010/raw/13be0d5cec704199c3c2d78115ee1ad2d76165d8/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19816

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

@fujitatomoya fujitatomoya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@MiguelCompany
MiguelCompany force-pushed the miguelcompany/fix-guard-condition-race branch from 1ae6a32 to 2fa9876 Compare July 13, 2026 05:51

@wjwwood wjwwood 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

@jmachowinski

Copy link
Copy Markdown

Pulls: ros2/rmw_implementation#281, #895
Gist: https://gist.githubusercontent.com/jmachowinski/864e939dc53d56fcce13715ad11d45c4/raw/13be0d5cec704199c3c2d78115ee1ad2d76165d8/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19889

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

@jmachowinski

Copy link
Copy Markdown

Pulls: ros2/rmw_implementation#281, #895
Gist: https://gist.githubusercontent.com/jmachowinski/ed5e2b1be5e3aa69820e965bbad137c5/raw/13be0d5cec704199c3c2d78115ee1ad2d76165d8/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19898

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

@jmachowinski

Copy link
Copy Markdown

Pulls: #895
Gist: https://gist.githubusercontent.com/jmachowinski/44ce1ac081fb9c4ac4a95463cd9ac09f/raw/1565d2f3063b18356ca6e0bf9690ef20d732178a/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/20334

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

@jmachowinski

Copy link
Copy Markdown

@MiguelCompany Can you rebase this ?

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@MiguelCompany
MiguelCompany force-pushed the miguelcompany/fix-guard-condition-race branch from 2fa9876 to 6460ae6 Compare September 7, 2026 06:07
@MiguelCompany

Copy link
Copy Markdown
Collaborator Author

@MiguelCompany Can you rebase this ?

done

@jmachowinski

Copy link
Copy Markdown

thx

@jmachowinski

jmachowinski commented Sep 7, 2026

Copy link
Copy Markdown

Pulls: #895
Gist: https://gist.githubusercontent.com/jmachowinski/7c07770b123c9740cf92a1e259c619b0/raw/1565d2f3063b18356ca6e0bf9690ef20d732178a/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/20347

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

@jmachowinski
jmachowinski merged commit 83471d4 into rolling Sep 8, 2026
2 checks passed
@jmachowinski

Copy link
Copy Markdown

@Mergifyio backport lyrical kilted jazzy humble

@mergify

mergify Bot commented Sep 8, 2026

Copy link
Copy Markdown

backport lyrical kilted jazzy humble

✅ Backports have been created

Details

jmachowinski pushed a commit that referenced this pull request Sep 10, 2026
* fix: Fix race condition when untriggering guard conditions.



* fix: return `RMW_RET_OK` whenever an active element is returned



* style: uncrustify



---------


(cherry picked from commit 83471d4)

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
jmachowinski pushed a commit that referenced this pull request Sep 10, 2026
* fix: Fix race condition when untriggering guard conditions.



* fix: return `RMW_RET_OK` whenever an active element is returned



* style: uncrustify



---------


(cherry picked from commit 83471d4)

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
jmachowinski pushed a commit that referenced this pull request Sep 10, 2026
* fix: Fix race condition when untriggering guard conditions.



* fix: return `RMW_RET_OK` whenever an active element is returned



* style: uncrustify



---------


(cherry picked from commit 83471d4)

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
jmachowinski pushed a commit that referenced this pull request Sep 18, 2026
* Fixes in `rmw_wait` (#895)

* fix: Fix race condition when untriggering guard conditions.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* fix: return `RMW_RET_OK` whenever an active element is returned

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* style: uncrustify

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 83471d4)

* Handle wait_result

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Fix build

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.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