test: fix intermittent timeout in p2p_1p1c_network.py #31751

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202501_orpantest_timeout changing 1 files +5 −0
  1. mzumsande commented at 10:24 pm on January 28, 2025: contributor

    The timeout is due to outstanding txrequests with python peers, which have the same timeout (60s) as the mempool sync timeout. I explained this in more detail in #31721 (comment) and also mentioned there how to reproduce it.

    Fix this by disconnecting the python peers after they send their txns, they aren’t needed after this point anyway because the main goal of the test is the sync between the 4 full nodes.

    Fixes #31721

  2. DrahtBot commented at 10:24 pm on January 28, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31751.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK instagibbs, marcofleon, glozow, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Jan 28, 2025
  4. mzumsande force-pushed on Jan 28, 2025
  5. fanquake requested review from glozow on Jan 29, 2025
  6. fanquake added this to the milestone 29.0 on Jan 29, 2025
  7. glozow commented at 12:11 pm on January 29, 2025: member
    utACK 215d8b0a2ccf3a7275ea483339c58da5e0085e83, the explanation makes sense to me and agree the p2ps don’t need to be connected after this point.
  8. glozow requested review from instagibbs on Jan 29, 2025
  9. in test/functional/p2p_1p1c_network.py:147 in 215d8b0a2c outdated
    143@@ -144,6 +144,10 @@ def run_test(self):
    144             for tx in transactions_to_presend[i]:
    145                 peer.send_and_ping(msg_tx(tx))
    146 
    147+        # Disconnect python peers to clear outstanding orphan requests with them, avoiding timeouts.
    


    instagibbs commented at 2:46 pm on January 29, 2025:
    0        # Disconnect python peers to clear outstanding orphan requests with them, avoiding timeouts.
    1        # We are only interested in the syncing behavior between real nodes.
    

    mzumsande commented at 3:47 pm on January 29, 2025:
    done
  10. instagibbs approved
  11. instagibbs commented at 2:46 pm on January 29, 2025: member

    ACK 215d8b0a2ccf3a7275ea483339c58da5e0085e83

    I suggested a comment change to leave more breadcrumbs for readers, but the fix seems correct

  12. test: fix intermittent timeout in p2p_1p1c_network.py
    The timeout is due to outstanding txrequests with
    python peers. Fix this by disconnecting these peers
    after they send their txns, they aren't needed after
    this point anyway.
    152a2dcdef
  13. mzumsande force-pushed on Jan 29, 2025
  14. instagibbs approved
  15. instagibbs commented at 3:48 pm on January 29, 2025: member
    reACK 152a2dcdefa6ec744db5b106d5c0a8c5b8aca416
  16. DrahtBot requested review from glozow on Jan 29, 2025
  17. marcofleon commented at 5:35 pm on January 29, 2025: contributor

    ACK 152a2dcdefa6ec744db5b106d5c0a8c5b8aca416

    iiuc, when we disconnect, this clears any 60s requests for parents that node1 has with the initial setup peers. So now there’s no chance the sync_mempools() timeout is hit before the parent request timeout.

  18. glozow commented at 5:41 pm on January 29, 2025: member
    reACK 152a2dcdefa6ec744db5b106d5c0a8c5b8aca416
  19. achow101 commented at 10:09 pm on January 29, 2025: member
    ACK 152a2dcdefa6ec744db5b106d5c0a8c5b8aca416
  20. achow101 merged this on Jan 29, 2025
  21. achow101 closed this on Jan 29, 2025

  22. mzumsande deleted the branch on Jan 29, 2025

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

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