test: Check that RPCs do not time out, even under load #34927

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2603-test-rpc-sla changing 3 files +62 −7
  1. maflcko commented at 4:35 PM on March 26, 2026: member

    It turns out there is no test currently to check that the RPC server does not time out under load. With "load" I mean a flood of trivial payloads. That is, the only work needed is JSON encoding and decoding of (let's say) a block of data of 2 MB or so. This may take a few milliseconds, but should never take more than a few seconds.

    So add a test for this.

  2. DrahtBot renamed this:
    test: Check that RPCs do not time out, even under load
    test: Check that RPCs do not time out, even under load
    on Mar 26, 2026
  3. DrahtBot added the label Tests on Mar 26, 2026
  4. maflcko marked this as a draft on Mar 26, 2026
  5. DrahtBot commented at 4:35 PM on March 26, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK enirox001

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34566 (feature: Use different datadirs for different signets by ekzyis)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. maflcko commented at 4:36 PM on March 26, 2026: member

    Draft for now, because the test fails :(

    Edit: It fails in CI, but it passes locally for me:

    ./bld-cmake/test/functional/test_runner.py -j 16 $( printf 'rpc_echo_payload.py %.0s' {1..2000} )
    
  7. DrahtBot added the label CI failed on Mar 26, 2026
  8. maflcko commented at 5:30 PM on March 26, 2026: member

    Timed out after 40 minutes in https://github.com/bitcoin/bitcoin/actions/runs/23606118115/job/68749250793?pr=34927#step:11:3195:

    2026-03-26T16:46:08.3589405Z Remaining jobs: [interface_ipc_mining.py, rpc_echo_payload.py]
    2026-03-26T16:47:46.9801923Z ......................................................................................................................................................................................................
    2026-03-26T16:47:47.4805641Z                                                                                                                                                                                                       
    2026-03-26T16:47:47.4806053Z Remaining jobs: [rpc_echo_payload.py]
    2026-03-26T17:27:36.9551875Z ##[error]The operation was canceled.
    
  9. maflcko commented at 5:30 PM on March 26, 2026: member

    cc @dergoegge Can you copy-paste the Python test into Antithesis to see if it fails there?

  10. maflcko marked this as ready for review on Apr 1, 2026
  11. maflcko renamed this:
    test: Check that RPCs do not time out, even under load
    test: Check that RPCs do not time out, even under load. Disable Nagle's
    on Apr 1, 2026
  12. maflcko force-pushed on Apr 1, 2026
  13. rkrux commented at 5:55 PM on April 1, 2026: contributor

    Can this be tested with 120 commits or so?

  14. maflcko force-pushed on Apr 1, 2026
  15. maflcko renamed this:
    test: Check that RPCs do not time out, even under load. Disable Nagle's
    test: Check that RPCs do not time out, even under load
    on Apr 1, 2026
  16. maflcko commented at 7:05 PM on April 1, 2026: member

    Can this be tested with 120 commits or so?

    Sorry, turns out I was wrong, and I spun up a new connection while disabling Nagle's. Obviously spinning up a new connection is already known to work around the issue and Nagle's didn't seem to affect it.

  17. maflcko added the label DrahtBot Guix build requested on Apr 4, 2026
  18. DrahtBot commented at 10:57 AM on April 7, 2026: contributor

    <!--9cd9c72976c961c55c7acef8f6ba82cd-->

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit a7c30da1f6fc2eebd7514dd032fbb54940d467de<br>(master) commit ae63d766485540b3e851b46eea5aae5c9fdb73f2<br>(pull/34927/merge)
    *-aarch64-linux-gnu-debug.tar.gz 5129654fd42dfcc8... 96c3eea00e0cf535...
    *-aarch64-linux-gnu.tar.gz e0e9b6d39f3ea4ce... 5064aeba572e280b...
    *-arm-linux-gnueabihf-debug.tar.gz c11bf60c9ccf3c53... 3214e6b9250d7d3e...
    *-arm-linux-gnueabihf.tar.gz 1b9a940303194a20... aa9b3430355e5829...
    *-arm64-apple-darwin-codesigning.tar.gz 4159e3bfa00cea0b... c0157a52ea38e3d2...
    *-arm64-apple-darwin-unsigned.tar.gz d5d24298bcd3b88e... 7eac94e3177a0088...
    *-arm64-apple-darwin-unsigned.zip 3bff56e0b3c034b8... f290aa5359c3b1d5...
    *-powerpc64-linux-gnu-debug.tar.gz b3b7a130b6ef0e11... 657581e5ea1e1375...
    *-powerpc64-linux-gnu.tar.gz 46b7eccc4b1f9daa... c50504f4191f64c6...
    *-riscv64-linux-gnu-debug.tar.gz d45c1c48f26a22e4... 28b3d2810f4db830...
    *-riscv64-linux-gnu.tar.gz 463b0c63c43fc134... c73ab6d78882465f...
    *-win64-codesigning.tar.gz 9e4f0096eea9f2e4... 8dbaa347fa55ab79...
    *-win64-debug.zip 3ad9b746fdb80f9d... 69844041afe3ce64...
    *-win64-setup-unsigned.exe 5f60da153f966f6e... e972e10fa59ff735...
    *-win64-unsigned.zip 4a4c25d84476aa9f... bbfe2a9f09c5d9d2...
    *-x86_64-apple-darwin-codesigning.tar.gz dd3d28797694f14c... 5fa79104ae9a816d...
    *-x86_64-apple-darwin-unsigned.tar.gz ed0ab5e432488d86... b8de0cc03d8267d2...
    *-x86_64-apple-darwin-unsigned.zip 3cf6ca00b8c0cf88... 5860a84107524382...
    *-x86_64-linux-gnu-debug.tar.gz 3ca9cd40187259af... bbd5956ca60702bf...
    *-x86_64-linux-gnu.tar.gz ff514a472203e8cb... 58212f449aaf88ef...
    *.tar.gz 3e616d7febbce966... 1d89f5d3a55c020e...
    SHA256SUMS.part db9bf1d2856949a7... 106e86f2786833da...
    guix_build.log dcda2d8624c32cbb... f7426bafa50d9297...
    guix_build.log.diff bf28c8f2f9efe743...
  19. DrahtBot removed the label DrahtBot Guix build requested on Apr 7, 2026
  20. maflcko force-pushed on Apr 20, 2026
  21. test: [move-only] Extract create_new_rpc_connection
    Re-using the same rpc connection on multiple threads is obviously
    unsafe, so this helper can be used to create one connection per thread.
    
    This refactor does not change any behavior and can be reviewed with the
    git options:
    
    --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
    faab8e28db
  22. test: Check that RPCs do not time out, even under load fa86bd62bd
  23. maflcko force-pushed on Apr 21, 2026
  24. enirox001 commented at 2:33 PM on April 21, 2026: contributor

    Concept ACK

  25. maflcko marked this as a draft on Apr 21, 2026
  26. maflcko commented at 2:38 PM on April 21, 2026: member

    Turning into draft while CI is red, but the code should be correct, reviewable, and mergeable after libevent is nuked.


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-22 09:12 UTC

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