Skip to content

[wjwwood] Updated "Data race fixes"#2500

Merged
wjwwood merged 13 commits into
rollingfrom
wjwwood/data_race_fixes
Apr 12, 2024
Merged

[wjwwood] Updated "Data race fixes"#2500
wjwwood merged 13 commits into
rollingfrom
wjwwood/data_race_fixes

Conversation

@wjwwood

@wjwwood wjwwood commented Apr 12, 2024

Copy link
Copy Markdown
Member

See: #2494

Which I could not update.

Janosch Machowinski and others added 9 commits April 10, 2024 17:39
Signed-off-by: Janosch Machowinski <j.machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Before this change, the rebuild of wait set would be triggered
after the wait set was waken up. With bad timing, this could
lead to the rebuild not happening with multi threaded executor.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <j.machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Janosch Machowinski <j.machowinski@nospam.org>
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: William Woodall <william@osrfoundation.org>
@wjwwood wjwwood mentioned this pull request Apr 12, 2024
@wjwwood

wjwwood commented Apr 12, 2024

Copy link
Copy Markdown
Member Author

Fixed the conflicts due to other merges, @jmachowinski can you have a look at executor.cpp to make sure I didn't muck up the merge conflicts?


also, copying from #2494 (comment):

On my machine, the test TestAddCallbackGroupsToExecutor/StaticSingleThreadedExecutor.add_callback_groups_after_add_node_to_executor (for all rmw implementations) is timing out.

The following tests FAILED:
	 28 - test_add_callback_groups_to_executor__rmw_cyclonedds_cpp (Timeout)
	 29 - test_add_callback_groups_to_executor__rmw_fastrtps_cpp (Timeout)
	 30 - test_add_callback_groups_to_executor__rmw_fastrtps_dynamic_cpp (Timeout)

I'll run CI just to confirm:

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

I wasn't able to see any obvious issue, the CI is with my changes in #2500, but locally even this pr's changes have that problem.

@jmachowinski

Copy link
Copy Markdown
Collaborator

I'll look into it

Janosch Machowinski added 3 commits April 12, 2024 10:09
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
…g for current_notify_waitable_

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
@mjcarroll

Copy link
Copy Markdown
Member
  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@wjwwood

wjwwood commented Apr 12, 2024

Copy link
Copy Markdown
Member Author

lgtm

@wjwwood
wjwwood merged commit 90e4511 into rolling Apr 12, 2024
@delete-merged-branch
delete-merged-branch Bot deleted the wjwwood/data_race_fixes branch April 12, 2024 21:57
bartalor pushed a commit to bartalor/rclcpp that referenced this pull request Jul 15, 2026
* Fix callback group logic in executor

Signed-off-by: Janosch Machowinski <j.machowinski@cellumation.com>

* fix: Fixed unnecessary copy of wait_set

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* fix(executor): Fixed race conditions with rebuild of wait_sets

Before this change, the rebuild of wait set would be triggered
after the wait set was waken up. With bad timing, this could
lead to the rebuild not happening with multi threaded executor.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* fix(Executor): Fixed lost of entities rebuild request


Signed-off-by: Janosch Machowinski <j.machowinski@cellumation.com>

* chore: Added assert for not set callback_group in execute_any_executable

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* Add test for cbg getting reset

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Janosch Machowinski <j.machowinski@nospam.org>

* chore: renamed test cases to snake_case

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* style

Signed-off-by: William Woodall <william@osrfoundation.org>

* fixup test to avoid polling and short timeouts

Signed-off-by: William Woodall <william@osrfoundation.org>

* fix: Use correct notify_waitable_ instance

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* fix(StaticSingleThreadedExecutor): Added missing special case handling for current_notify_waitable_

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* fix(TestCallbackGroup): Fixed test after change to timers

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

---------

Signed-off-by: Janosch Machowinski <j.machowinski@cellumation.com>
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: William Woodall <william@osrfoundation.org>
Co-authored-by: Janosch Machowinski <j.machowinski@cellumation.com>
Co-authored-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Janosch Machowinski <j.machowinski@nospam.org>
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