From here: #8090 (comment)
More specifically, we have one travis failure (https://travis-ci.org/bitcoin/bitcoin/jobs/132557240) in sendheaders.py that looks like this:
sendheaders.py:
Initializing test directory /tmp/test8bijuqpx
start_node: bitcoind started, waiting for RPC to come up
start_node: RPC succesfully started
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:11072
MiniNode: Connecting to Bitcoin Node IP # 127.0.0.1:11072
Part 1: headers don't start before sendheaders message...
Part 1: success!
Part 2: announce blocks with headers after sendheaders message...
Part 2: success!
Part 3: headers announcements can stop after large reorg, and resume after headers/inv from peer...
Unexpected exception caught during testing: ConnectionResetError(104, 'Connection reset by peer')
Stopping nodes
WARN: Unable to stop node: CannotSendRequest('Request-sent',)
Cleaning up
Failed
stderr:
bitcoind: main.cpp:2807: void PruneBlockIndexCandidates(): Assertion `!setBlockIndexCandidates.empty()' failed.
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/test_framework/test_framework.py", line 142, in main
self.run_test()
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/sendheaders.py", line 372, in run_test
new_block_hashes = self.mine_reorg(length=7)
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/sendheaders.py", line 241, in mine_reorg
all_hashes = self.nodes[1].generate(length+1) # Must be longer than the orig chain
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/test_framework/authproxy.py", line 137, in __call__
response = self._request('POST', self.__url.path, postdata)
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/test_framework/authproxy.py", line 119, in _request
return self._get_response()
File "/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-unknown-linux-gnu/qa/rpc-tests/test_framework/authproxy.py", line 152, in _get_response
http_response = self.__conn.getresponse()
File "/usr/lib/python3.4/http/client.py", line 1147, in getresponse
response.begin()
File "/usr/lib/python3.4/http/client.py", line 351, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.4/socket.py", line 371, in readinto
return self._sock.recv_into(b)
Pass: False, Duration: 16 s
At the moment I have no idea what could cause this; my first guess is something funny with invalidateblock that hopefully would never occur in the wild, but this needs to be tracked down. So far I've been unable to reproduce.