p2p-compactblocks.py fails randomly #8842

issue jl2012 openend this issue on September 29, 2016
  1. jl2012 commented at 6:46 pm on September 29, 2016: contributor

    It seems p2p-compactblocks.py fails randomly

    From: https://travis-ci.org/bitcoin/bitcoin/jobs/163788152 from #8841 The PR is trivial and totally unrelated to compact block

     0p2p-compactblocks.py:
     1Initializing test directory /tmp/test3yd_2q3h/2
     2start_node: bitcoind started, waiting for RPC to come up
     3start_node: RPC succesfully started
     4MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:11016
     5Testing SENDCMPCT p2p message... 
     6Testing compactblock headers and shortIDs are correct...
     7Assertion failed: 
     8Stopping nodes
     9Not cleaning up dir /tmp/test3yd_2q3h/2
    10Failed
    11stderr:
    12  File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 151, in main
    13    self.run_test()
    14  File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 614, in run_test
    15    self.test_compactblock_construction()
    16  File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 264, in test_compactblock_construction
    17    assert(self.test_node.last_cmpctblock is not None)
    18Pass: False, Duration: 7 s
    
  2. MarcoFalke commented at 6:51 pm on September 29, 2016: member
    Thanks for the issue! I saw this failure earlier at least twice (only on travis, though)
  3. MarcoFalke added the label Tests on Sep 29, 2016
  4. sdaftuar commented at 7:21 pm on September 29, 2016: member
    Oops, I’ll take a look…
  5. MarcoFalke closed this on Oct 1, 2016

  6. MarcoFalke commented at 8:40 pm on October 2, 2016: member
  7. MarcoFalke reopened this on Oct 2, 2016

  8. sdaftuar commented at 2:55 pm on October 3, 2016: member
    Ugh, I will take another look, thanks for noticing.
  9. sdaftuar commented at 8:00 pm on October 3, 2016: member

    Ok I think I see what I did wrong in #8854 – syncing with a ping doesn’t ensure that all block announcements have made it to us, just that any that have been announced have been processed.

    I’m working on a new fix (my idea is to replace that sync_with_ping() with logic to wait until the tip has been announced), but I’m having trouble reproducing the problem.

  10. MarcoFalke commented at 8:52 am on October 11, 2016: member
    Please let me know if this is still an issue.
  11. MarcoFalke closed this on Oct 11, 2016

  12. jnewbery commented at 2:38 pm on October 24, 2016: member
    @sdaftuar - p2p-compactblocks just failed in a travis build for me: https://travis-ci.org/bitcoin/bitcoin/builds/170131004 . The next build (which was just a squash of the same commits) succeeded: https://travis-ci.org/bitcoin/bitcoin/builds/170143716 , so it appears there’s still an intermittent problem with the compact blocks testcase. Sadly there doesn’t appear to be much logging in travis and I can’t reproduce this locally.
  13. jnewbery commented at 2:42 pm on October 24, 2016: member
  14. ryanofsky commented at 8:41 pm on October 24, 2016: member

    Looked into the failure, but so far couldn’t find a problem in the test setup that would cause it.

    The failure happened in line 138 of the sync_blocks util function when the two test nodes failed to sync after 60 seconds. The place where the failing sync_blocks was called was line 809 of run_test after segwit was activated on node 1. Node 1 should have added more blocks than node 0 at that point, so some kind of failure must have happened to cause node 0 not to receive (or accept) the new blocks from node 1, and the sync_block function to time out.

    Since I don’t have any good theories on what would cause node 0 not to sync with node 1, I’m currently running the test in a loop to try to reproduce the problem.

    I added some debug prints and made the following change to avoid a different (unrelated) intermittent test failure:

     0--- a/qa/rpc-tests/p2p-compactblocks.py
     1+++ b/qa/rpc-tests/p2p-compactblocks.py
     2@@ -300,8 +300,8 @@ class CompactBlocksTest(BitcoinTestFramework):
     3             assert(segwit_tx_generated) # check that our test is not broken
     4
     5         # Wait until we've seen the block announcement for the resulting tip
     6-        tip = int(self.nodes[0].getbestblockhash(), 16)
     7-        assert(self.test_node.wait_for_block_announcement(tip))
     8+        tip = int(node.getbestblockhash(), 16)
     9+        assert(test_node.wait_for_block_announcement(tip))
    10
    11         # Now mine a block, and look at the resulting compact block.
    12         test_node.clear_block_announcement()
    
  15. laanwj reopened this on Oct 25, 2016

  16. ryanofsky commented at 5:36 pm on October 25, 2016: member
    Update: running the test overnight on my workstation showed the sync_blocks call returning true after 3 loop iterations in 1060 out of 1089 runs, and returning true after 2 loop iterations in the other 29 runs. It never got anywhere close to the 60 iterations that would have been required to cause the timeout.
  17. ryanofsky referenced this in commit 6109d86848 on Oct 27, 2016
  18. ryanofsky referenced this in commit 6116439514 on Nov 1, 2016
  19. ryanofsky referenced this in commit f6c7943782 on Nov 3, 2016
  20. ryanofsky referenced this in commit dac53b58b5 on Nov 7, 2016
  21. laanwj referenced this in commit 7977a1157a on Nov 11, 2016
  22. ryanofsky commented at 3:27 pm on November 11, 2016: member
    This issue should be closed now that #9058 is merged.
  23. laanwj closed this on Nov 11, 2016

  24. laanwj commented at 4:35 pm on November 11, 2016: member
    Yes, let’s be optimistic and close it :)
  25. MarcoFalke referenced this in commit 573b575174 on Nov 20, 2016
  26. MarcoFalke referenced this in commit c65fb7c3ff on Nov 20, 2016
  27. MarcoFalke referenced this in commit e8461666ec on Nov 20, 2016
  28. dagurval referenced this in commit 81ba25c7cd on Jan 3, 2017
  29. dagurval referenced this in commit 4f1f2b713c on Jan 3, 2017
  30. dagurval referenced this in commit 10b20ffd6b on Jan 3, 2017
  31. dagurval referenced this in commit 3a4ca4106b on Jan 3, 2017
  32. dagurval referenced this in commit bf6e9543ce on Jan 6, 2017
  33. dagurval referenced this in commit 75de4074f0 on Jan 11, 2017
  34. dagurval referenced this in commit 1d6e228483 on Jun 7, 2017
  35. dagurval referenced this in commit 45a78b33d0 on Jun 7, 2017
  36. dagurval referenced this in commit d53079c7e0 on Jun 8, 2017
  37. dagurval referenced this in commit 3b0f998877 on Jun 8, 2017
  38. dgenr8 referenced this in commit 44931ccce6 on Jun 29, 2017
  39. gladcow referenced this in commit 751d88e974 on Mar 5, 2018
  40. gladcow referenced this in commit 7863436edf on Mar 13, 2018
  41. gladcow referenced this in commit 5a700a70d2 on Mar 14, 2018
  42. gladcow referenced this in commit 32ac7600d1 on Mar 15, 2018
  43. gladcow referenced this in commit 921f64f0e1 on Mar 15, 2018
  44. gladcow referenced this in commit 1b5bbf0181 on Mar 15, 2018
  45. gladcow referenced this in commit 90d822bb04 on Mar 15, 2018
  46. gladcow referenced this in commit 30aff7f3c1 on Mar 24, 2018
  47. gladcow referenced this in commit ac2cd34f51 on Apr 4, 2018
  48. UdjinM6 referenced this in commit bc45a2f87a on Apr 11, 2018
  49. andvgal referenced this in commit fd5c50bc2b on Jan 6, 2019
  50. CryptoCentric referenced this in commit dd3fd51204 on Feb 28, 2019
  51. MarcoFalke locked this on Sep 8, 2021

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-11-24 03:12 UTC

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