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

scheduler: Workaround negative nsecs bug in boost's wait_until #18271

Closed
wants to merge 1 commit into from

Conversation

@luke-jr
Copy link
Member

luke-jr commented Mar 5, 2020

Some boost versions have a bug that can cause a time prior to system boot (or wake from sleep) to throw an exception instead of return timeout
See boostorg/thread#308

Fixes #18227

Cleanly merges to 0.14+

@DrahtBot

This comment has been minimized.

Copy link
Contributor

DrahtBot commented Mar 6, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@ajtowns

This comment has been minimized.

Copy link
Contributor

ajtowns commented Mar 6, 2020

I think travis is failing because this catches boost::thread_interrupted and sometimes doesn't rethrow it. Checking timeToWaitFor <= ::now() prior to calling wait_until might work better?

Some boost versions have a bug that can cause a time prior to system boot (or wake from sleep) to throw an exception instead of return timeout
See boostorg/thread#308
@luke-jr luke-jr force-pushed the luke-jr:wrkarnd_boost_wait_until branch from 1255050 to ed0223e Mar 6, 2020
@luke-jr

This comment has been minimized.

Copy link
Member Author

luke-jr commented Mar 6, 2020

That could break in a race (suspend after check, but before wait_until).

Fixed it by always rethrowing boost::thread_interrupted reliably.

@MarcoFalke

This comment has been minimized.

Copy link
Member

MarcoFalke commented Mar 6, 2020

Please enable the mockscheduler unit test again

@luke-jr luke-jr closed this Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.