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

Attempt to fix thread_pool_scheduler test #5501

Merged

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Aug 9, 2021

Added predicates to the wait_fors. Without them the waits may fail even if the the tasks were executed (and since

seems to not fail, it must be the case here).

@msimberg msimberg added type: defect category: senders/receivers Implementations of the p0443r14 / p2300 + p1897 proposals labels Aug 9, 2021
@msimberg msimberg added this to the 1.8.0 milestone Aug 9, 2021
hkaiser
hkaiser previously approved these changes Aug 9, 2021
Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, even if I was not aware that we have spurious wakeups.... Thanks, I would have never thought of applying this change!

@msimberg
Copy link
Contributor Author

msimberg commented Aug 9, 2021

LGTM, even if I was not aware that we have spurious wakeups.... Thanks, I would have never thought of applying this change!

The failure doesn't require spurious wakeups (and I don't think they happen in the runtime). It just requires that the task notifies before the wait happens (either the task happens to be scheduled immediately, or more likely that the waiting thread happens to give up its timeslice just before it waits).

Note: I wasn't able to reproduce this locally, so I'm only guessing that it fixes the problem. The symptom and fix does fit CircleCI being heavily oversubscribed though (and the fix is needed in any case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: senders/receivers Implementations of the p0443r14 / p2300 + p1897 proposals type: defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants