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
[0.19] scheduler: Workaround negative nsecs bug in boost's wait_until #18284
Conversation
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
If we fix this, I'd prefer to just backport that refactor |
Backporting the refactor gets conflicts from the mockforward and uninterruptiblesleep patches at least -- I've had a go at https://github.com/ajtowns/bitcoin/commits/202003-scheduler-deboost-019 if anyone wants to look into it further. I think it's worth at least considering this much simpler approach if we want to improve 0.19 or earlier here. So Concept ACK I guess. |
I think this fix is pretty clear and minimal. Backporting complicated refactors sounds more risky. |
ACK ed0223e |
I think both backporting the fix we did on master or coming up with a new fix are risky. Taking into account that this is not a regression with 0.19, that this doesn't happen on server, but only laptops (or machines that supsend/hibernate), it seems low risk to keep the bug as is. Laptop users might also be faster to upgrade to 0.20, where this is already fixed. |
So weak NACK from me |
Though, it also has two ACKs, so it might be good. Has this been previously released in Knots and tested? |
Yes, it was released in Knots 0.19.1.knots20200304, which had ~3 months before being replaced by 0.20.0. Not sure what it peaked at, but there's approx 25 nodes still running it today. |
Ok, then I am merging this with two ACKs and because it was tested in production. I have not reviewed the code myself. |
Co-Authored-By: Luke Dashjr <luke-jr+git@utopios.org> Summary --- This fixes issue Bitcoin-ABC#180 and also re-enables the mockforward test disabled by !837. It is a backport from core with a workaround to boost bug: boostorg/thread#308, which was the source of the mockforward tests failing in Bitcoin-ABC#180. Original core PR: bitcoin/bitcoin#18284 Original Core Commit Message --- 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 NOTE: This was addressed in master with a refactor (#18234), so this isn't a strict backport and needs full review. Fixes #18227 Cleanly merges to 0.14+ Test Plan --- - `ninja check` Advanced: - If you can, try and get the mockforward test to fail without this fix, and then try and get it to fail again with this fix. If it succeeds always with this fix we are golden. The test is in "scheduled_tests".
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
NOTE: This was addressed in master with a refactor (#18234), so this isn't a strict backport and needs full review.
Fixes #18227
Cleanly merges to 0.14+