Test policyestimator_tests/BlockPolicyEstimates failure #29000

issue martinus openend this issue on December 5, 2023
  1. martinus commented at 4:14 pm on December 5, 2023: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    I have a reproducible test case failure on my machine. I’ve bisected it to commit 714523918ba2b853fc69bee6b04a33ba0c828bf5. Since this commit, the test case policyestimator_tests/BlockPolicyEstimates fails, but only when I use my builds script:

    0chrt -i 0 make -j32 check
    

    chrt runs the make command in idle priority (I use that so I can smoothly browse while testing). I have an AMD 7950x with 16 cores/32 threads. When I remove chrt -i 0 the test works. I suspect that it fails because for whatever reason it can’t run in parallel with another test, but so far I couldn’t narrow it down.

     0❯ chrt -i 0 make -j32 check |grep error
     1test/policyestimator_tests.cpp(129): error: in "policyestimator_tests/BlockPolicyEstimates": check origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee has failed
     2test/policyestimator_tests.cpp(129): error: in "policyestimator_tests/BlockPolicyEstimates": check origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee has failed
     3test/policyestimator_tests.cpp(129): error: in "policyestimator_tests/BlockPolicyEstimates": check origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee has failed
     4test/policyestimator_tests.cpp(129): error: in "policyestimator_tests/BlockPolicyEstimates": check origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee has failed
     5test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
     6test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
     7test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
     8test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
     9test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
    10test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
    11test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
    12test/policyestimator_tests.cpp(151): error: in "policyestimator_tests/BlockPolicyEstimates": check feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee has failed
    13make[3]: *** [Makefile:22606: test/policyestimator_tests.cpp.test] Error 1
    14make[3]: *** Waiting for unfinished jobs....
    15make[2]: *** [Makefile:20548: check-am] Error 2
    16make[1]: *** [Makefile:20213: check-recursive] Error 1
    17make: *** [Makefile:813: check-recursive] Error 1
    

    Expected behaviour

    All unit tests should succeed

    Steps to reproduce

    0./autogen.sh
    1./configure CXX=clang++ CC=clang --disable-wallet --with-guid=no
    2chrt -i 0 make -j32 check
    

    Relevant log output

    I uploaded the full log of chrt -i 0 make -j32 check >out.txt here: https://gist.github.com/martinus/5d6795cd618f7d203e95d4f5426746f0

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    160d23677ad

    Operating system and version

    Linux 6.6.2-201.fc39.x86_64

    Machine specifications

    AMD 7950x

  2. maflcko commented at 4:29 pm on December 5, 2023: member
    You can fix it by adding SyncWithValidationInterfaceQueue in line 113, no?
  3. martinus commented at 4:53 pm on December 5, 2023: contributor
    Right above the end of the loop? Yes, this seems to do the trick, I’ve run it 10 times and it always worked
  4. maflcko added the label Tests on Dec 5, 2023
  5. maflcko added this to the milestone 27.0 on Dec 5, 2023
  6. ismaelsadeeq commented at 9:59 am on December 6, 2023: member

    Thats because the fee estimator now updates asynchronously, and there are about 200 removeForBlock calls in the loop https://github.com/bitcoin/bitcoin/blob/6d5790956f45e3de5c6c4ee6fda21878b0d1287b/src/test/policyestimator_tests.cpp#L98

    We suppose to wait for the fee estimator to catch up right after the loop below line 113 just as @maflcko said.

    I will open a pull that will fix this and some outstanding comments from @willcl-ark in #28368

  7. glozow closed this on Jan 3, 2024

  8. glozow referenced this in commit 65c05db660 on Jan 3, 2024


martinus maflcko ismaelsadeeq

Labels
Tests

Milestone
27.0


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: 2024-07-05 19:13 UTC

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