[0.19] scheduler: Workaround negative nsecs bug in boost's wait_until #18284

pull luke-jr wants to merge 1 commits into bitcoin:0.19 from luke-jr:wrkarnd_boost_wait_until changing 1 files +14 −2
  1. luke-jr commented at 8:10 PM on March 6, 2020: member

    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 https://github.com/boostorg/thread/issues/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+

  2. scheduler: Workaround negative nsecs bug in boost's wait_until
    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 https://github.com/boostorg/thread/issues/308
    ed0223ec59
  3. laanwj added this to the milestone 0.19.2 on Mar 6, 2020
  4. MarcoFalke commented at 8:39 PM on March 6, 2020: member

    NOTE: This was addressed in master with a refactor (#18234), so this isn't a strict backport and needs full review.

    If we fix this, I'd prefer to just backport that refactor

  5. ajtowns commented at 6:33 AM on March 7, 2020: member

    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.

  6. laanwj commented at 2:21 PM on March 12, 2020: member

    I think this fix is pretty clear and minimal. Backporting complicated refactors sounds more risky. ACK ed0223ec59e5e7941abf17afd17ede393abea31b

  7. DrahtBot added the label Backport on Aug 23, 2020
  8. MarcoFalke removed the label Backport on Aug 27, 2020
  9. MarcoFalke added the label Utils/log/libs on Aug 27, 2020
  10. MarcoFalke commented at 7:16 PM on August 27, 2020: member

    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.

  11. MarcoFalke commented at 7:17 PM on August 27, 2020: member

    So weak NACK from me

  12. MarcoFalke commented at 8:08 PM on August 27, 2020: member

    Though, it also has two ACKs, so it might be good.

    Has this been previously released in Knots and tested?

  13. luke-jr commented at 10:42 PM on August 27, 2020: member

    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.

  14. MarcoFalke commented at 6:22 AM on August 28, 2020: member

    Ok, then I am merging this with two ACKs and because it was tested in production. I have not reviewed the code myself.

  15. MarcoFalke merged this on Aug 28, 2020
  16. MarcoFalke closed this on Aug 28, 2020

  17. MarkLTZ referenced this in commit af1812d782 on Nov 8, 2020
  18. ftrader referenced this in commit b8d9db8b92 on Dec 1, 2020
  19. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me