p2p-compactblocks.py:
Initializing test directory /tmp/test3yd_2q3h/2
start_node: bitcoind started, waiting for RPC to come up
start_node: RPC succesfully started
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:11016
Testing SENDCMPCT p2p message...
Testing compactblock headers and shortIDs are correct...
Assertion failed:
Stopping nodes
Not cleaning up dir /tmp/test3yd_2q3h/2
Failed
stderr:
File "/home/travis/build/bitcoin/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 151, in main
self.run_test()
File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 614, in run_test
self.test_compactblock_construction()
File "/home/travis/build/bitcoin/bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 264, in test_compactblock_construction
assert(self.test_node.last_cmpctblock is not None)
Pass: False, Duration: 7 s
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)
MarcoFalke added the label Tests on Sep 29, 2016
sdaftuar
commented at 7:21 PM on September 29, 2016:
member
sdaftuar
commented at 2:55 PM on October 3, 2016:
member
Ugh, I will take another look, thanks for noticing.
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.
ryanofsky
commented at 8:41 PM on October 24, 2016:
contributor
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:
--- a/qa/rpc-tests/p2p-compactblocks.py
+++ b/qa/rpc-tests/p2p-compactblocks.py
@@ -300,8 +300,8 @@ class CompactBlocksTest(BitcoinTestFramework):
assert(segwit_tx_generated) # check that our test is not broken
# Wait until we've seen the block announcement for the resulting tip
- tip = int(self.nodes[0].getbestblockhash(), 16)
- assert(self.test_node.wait_for_block_announcement(tip))
+ tip = int(node.getbestblockhash(), 16)
+ assert(test_node.wait_for_block_announcement(tip))
# Now mine a block, and look at the resulting compact block.
test_node.clear_block_announcement()
laanwj reopened this on Oct 25, 2016
ryanofsky
commented at 5:36 PM on October 25, 2016:
contributor
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.
ryanofsky referenced this in commit 6109d86848 on Oct 27, 2016
ryanofsky referenced this in commit 6116439514 on Nov 1, 2016
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-05-20 06:55 UTC