-
Notifications
You must be signed in to change notification settings - Fork 418
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
interrupt_guard_condition_ causes executor "spurious" awakes #1021
Comments
This is expected. Here is why: The spurious wake is actually caused in:
in This interrupt exist to avoid a thread, in the case the executor is multithreaded and the threads are not mutually exclusive, waiting indefinitely in
|
Thank you for the detailed explanation. However now I have another doubt. Would it be possible to do a PR and to move the related code from the base class |
We can definitely do that so it can avoid triggering the interrupt guard condition for the single threaded executor. Would you be willing to have a PR for this? |
Unfortunately I can't right now. |
Bug report
Required Info:
Steps to reproduce issue
Run a ROS 2 system made of a single node with only a timer. No publishers/subscriptions or anything else.
Expected behavior
The timer has a 5 seconds period, so the executor should wake up once every 5 seconds.
Actual behavior
After every real awakes, the executor wakes up a second time for no apparent reason.
This pattern keeps going on forever.
This applies also to more complex systems, with the same frequency.
Some logs that I added:
Additional information
I saw that the wait implementation in the DDS library is effectively called every time, so it's not the rcl layer or something that does not even go to sleep.
The culprit looks to be
If I remove this line, I see the correct number of awakes
See source code here
The text was updated successfully, but these errors were encountered: