wallet_keypool sleep(1.1) might be flakey #32793

issue pinheadmz openend this issue on June 21, 2025
  1. pinheadmz commented at 4:41 pm on June 21, 2025: member

    I got a test failure on PR #32061 that does affect walletpassphrase because of RPCRunLater() because of replacing libevent’s timing loop with CScheduler:

    https://github.com/bitcoin/bitcoin/actions/runs/15790841634/job/44516161778?pr=32061#step:7:3079

    However, I’m having a very hard time reproducing the test failure.

    We expect wallet to lock in 1 second, sleep for 1.1 seconds and then assert that wallet is locked.

    According to the log, the time between unlock and the check was 1.22 seconds:

    0 node0 2025-06-21T02:07:38.682985Z [httpworker.11] [rpc/request.cpp:243] [parse] [rpc] ThreadRPCServer method=walletpassphrase user=__cookie__ 
    1...
    2 node0 2025-06-21T02:07:39.902062Z [httpworker.13] [rpc/request.cpp:243] [parse] [rpc] ThreadRPCServer method=getwalletinfo user=__cookie__ 
    

    However in the failed assertion, unlocked_until == 1750471659 (instead of expected 0) which translates to 2025-06-21 2:07:39.

    I’m about to push to this branch again so we’ll get to see if it fails again. I just thought I’d document the behavior in an issue for now, maybe bumping the test’s sleep to 2 full seconds is prudent, or implementing some other kind of wait_until logic

  2. pinheadmz commented at 5:07 pm on June 21, 2025: member
  3. pinheadmz commented at 9:41 pm on June 22, 2025: member
    Closing, this is an issue with the PR, specifically, we lose a little timer resolution switching from libevent to CScheduler
  4. pinheadmz closed this on Jun 22, 2025


pinheadmz


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: 2025-07-01 03:13 UTC

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