test: Fix intermittent issue in p2p_leak.py #25914

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2208-test-p2p-leak-int-🥇 changing 1 files +4 −1
  1. MarcoFalke commented at 10:53 AM on August 24, 2022: member

    Diff to reproduce:

    diff --git a/src/net.cpp b/src/net.cpp
    index 865ce2ea97..ccf289d77b 100644
    --- a/src/net.cpp
    +++ b/src/net.cpp
    @@ -1150,6 +1150,7 @@ bool CConnman::InactivityCheck(const CNode& node) const
     
         if (last_recv.count() == 0 || last_send.count() == 0) {
             LogPrint(BCLog::NET, "socket no message in first %i seconds, %d %d peer=%d\n", count_seconds(m_peer_connect_timeout), last_recv.count() != 0, last_send.count() != 0, node.GetId());
    +        UninterruptibleSleep(6s);
             return true;
         }
    
    

    Example in CI:

     node0 2022-08-12T09:51:56.015288Z [net] [net.cpp:1152] [InactivityCheck] [net] socket no message in first 3 seconds, 0 0 peer=0 
     test  2022-08-12T09:51:57.658000Z TestFramework (ERROR): Assertion failed 
                                       Traceback (most recent call last):
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 133, in main
                                           self.run_test()
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/p2p_leak.py", line 155, in run_test
                                           assert not no_version_idle_peer.is_connected
                                       AssertionError
    

    https://cirrus-ci.com/task/5346634421764096?logs=ci#L3683

  2. test: Fix intermittent issue in p2p_leak.py fa2aae597c
  3. MarcoFalke added this to the milestone 24.0 on Aug 24, 2022
  4. fanquake added the label Tests on Aug 24, 2022
  5. satsie commented at 2:25 AM on September 3, 2022: contributor

    ACK fa2aae597c42b4f74460c58f35e7e1ace8a82796

    Applied the 6s UninterruptibleSleep from the PR description, commented out the fix, and verified I could reproduce the failure. After putting back the changes from this PR, the test passes.

  6. luke-jr approved
  7. luke-jr commented at 3:41 AM on September 4, 2022: member

    tACK fa2aae597c42b4f74460c58f35e7e1ace8a82796

  8. fanquake merged this on Sep 4, 2022
  9. fanquake closed this on Sep 4, 2022

  10. sidhujag referenced this in commit 3a45193e74 on Sep 4, 2022
  11. MarcoFalke deleted the branch on Sep 5, 2022
  12. bitcoin locked this on Sep 5, 2023
Labels

Milestone
24.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: 2026-04-14 15:13 UTC

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