Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Fix: Double spin required since 28.2.0 #2595

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

jmachowinski
Copy link
Contributor

@jmachowinski jmachowinski commented Aug 2, 2024

This is a first attempt to fix #2589.

Rebuild the collection explicitly before the wait, if the notify_waitable_
has been triggered.

@jmachowinski
Copy link
Contributor Author

@alsora can you run the CI on this ?

Rebuild the collection explicitly before the wait, if the notify_waitable_
has been triggered.

Signed-off-by: Janosch Machowinski <[email protected]>
@alsora
Copy link
Collaborator

alsora commented Aug 2, 2024

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

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

@jmachowinski thanks for working on the fix.

a few CI failures, can you take a look?

if (notify_cpy->is_ready(rcl_wait_set)) {
notify_cpy->execute(notify_cpy->take_data());

// make sure we don't loos a wakeup
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo?

Suggested change
// make sure we don't loos a wakeup
// make sure we don't lose a wakeup

@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/next-client-library-wg-meeting-friday-16th-august-2024/39130/1

@MichaelOrlov
Copy link
Contributor

@jmachowinski A friendly ping to fix CI failures to move forward with this PR.

@jmachowinski
Copy link
Contributor Author

jmachowinski commented Aug 23, 2024

@MichaelOrlov we spoke about this bug in the last client workgroup meeting. We don't think this is the correct fix, but a step into the right direction.Unfortunately I currently don't have much time I can divert to rclcpp.

@alsora
Copy link
Collaborator

alsora commented Sep 11, 2024

PR #2591 merged.
That PR introduces unit-tests and fixes this problem for the events executor.

I looked a bit more into the waitset executor issue, and IMO even if this PR is likely not the best way to address the problem, it definitely improves the situation in a relatively simple way, fixing the bug reported by the nav stack and passing the unit tests that I added in the other PR.

My recommendation is to:

  • move the new logic to a dedicated function
  • run this new function only for spin some, spin once and spin all, rather than in each wait for work (e.g. by adding a bool flag to wait for work). spin does not need it, and it would only cause unnecessary overhead.
  • enable the single threaded executor in the new unit tests.

If people agree, I can take care of pushing these changes (or @jmachowinski can do it if he has time).

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.

Double spin required since 28.2.0
6 participants