Skip to content

node0 stderr bitcoind: validation.cpp:5392: void ChainstateManager::CheckBlockIndex() const: Assertion `!c->setBlockIndexCandidates.contains(const_cast<CBlockIndex*>(pindex))' failed. #33948

@maflcko

Description

@maflcko

Just ran into this crash in the nightly CI, which was using llvm 22~++20251125085442+ed95c4d6ecf0-1~exp1~20251125085501.1311. It may be a compiler error, but it is odd that only one test was failing:

https://github.com/maflcko/bitcoin-core-nightly/actions/runs/19692916493/job/56412271437#step:10:6430

 node0 stderr bitcoind: validation.cpp:5392: void ChainstateManager::CheckBlockIndex() const: Assertion `!c->setBlockIndexCandidates.contains(const_cast<CBlockIndex*>(pindex))' failed. 
...
 node0 2025-11-26T05:23:50.207878Z [initload] [util/thread.cpp:22] [void util::TraceThread(std::string_view, std::function<void ()>)] initload thread exit 
 node0 2025-11-26T05:23:50.207921Z [net] [util/thread.cpp:20] [void util::TraceThread(std::string_view, std::function<void ()>)] net thread start 
 node0 2025-11-26T05:23:50.208026Z [addcon] [util/thread.cpp:20] [void util::TraceThread(std::string_view, std::function<void ()>)] addcon thread start 
 node0 2025-11-26T05:23:50.208076Z [init] [noui.cpp:57] [void noui_InitMessage(const std::string &)] init message: Done loading 
 node0 2025-11-26T05:23:50.208131Z [msghand] [util/thread.cpp:20] [void util::TraceThread(std::string_view, std::function<void ()>)] msghand thread start 
 node0 2025-11-26T05:23:50.300411Z [http] [httpserver.cpp:308] [void http_request_cb(struct evhttp_request *, void *)] [http] Received a POST request for / from 127.0.0.1:53008 
 node0 2025-11-26T05:23:50.301476Z [httpworker.0] [rpc/request.cpp:243] [void JSONRPCRequest::parse(const UniValue &)] [rpc] ThreadRPCServer method=getblockcount user=__cookie__ 
 node0 2025-11-26T05:23:50.302068Z [http] [httpserver.cpp:308] [void http_request_cb(struct evhttp_request *, void *)] [http] Received a POST request for / from 127.0.0.1:53008 
 node0 2025-11-26T05:23:50.302154Z [httpworker.1] [rpc/request.cpp:243] [void JSONRPCRequest::parse(const UniValue &)] [rpc] ThreadRPCServer method=getmempoolinfo user=__cookie__ 
 test  2025-11-26T05:23:50.302472Z TestFramework.node0 (DEBUG): RPC successfully started 
 test  2025-11-26T05:23:50.303502Z TestFramework.node0 (DEBUG): TestNode.generate() dispatches `generate` call to `generatetoaddress` 
 node0 2025-11-26T05:23:50.303964Z [http] [httpserver.cpp:308] [void http_request_cb(struct evhttp_request *, void *)] [http] Received a POST request for / from 127.0.0.1:53008 
 node0 2025-11-26T05:23:50.304029Z [httpworker.0] [rpc/request.cpp:243] [void JSONRPCRequest::parse(const UniValue &)] [rpc] ThreadRPCServer method=generatetoaddress user=__cookie__ 
 node0 2025-11-26T05:23:50.304103Z [httpworker.0] [node/miner.cpp:173] [std::unique_ptr<CBlockTemplate> node::BlockAssembler::CreateNewBlock()] CreateNewBlock(): block weight: 904 txs: 0 fees: 0 sigops 400 
 node0 2025-11-26T05:23:50.304141Z [httpworker.0] [validation.cpp:2405] [bool Chainstate::ConnectBlock(const CBlock &, BlockValidationState &, CBlockIndex *, CCoinsViewCache &, bool)] [bench]     - Sanity checks: 0.00ms [0.00s (0.00ms/blk)] 
 node0 2025-11-26T05:23:50.304159Z [httpworker.0] [validation.cpp:2507] [bool Chainstate::ConnectBlock(const CBlock &, BlockValidationState &, CBlockIndex *, CCoinsViewCache &, bool)] [bench]     - Fork checks: 0.02ms [0.00s (0.02ms/blk)] 
 node0 2025-11-26T05:23:50.304171Z [httpworker.0] [validation.cpp:2513] [bool Chainstate::ConnectBlock(const CBlock &, BlockValidationState &, CBlockIndex *, CCoinsViewCache &, bool)] Enabling script verification at block #228 (2a5aefafbdc44a7bc7f446f5e10b5cfb3d2bb92c4213f8c17356455f105d00fc): assumevalid=0 (always verify). 
 node0 2025-11-26T05:23:50.304179Z [httpworker.0] [validation.cpp:2622] [bool Chainstate::ConnectBlock(const CBlock &, BlockValidationState &, CBlockIndex *, CCoinsViewCache &, bool)] [bench]       - Connect 1 transactions: 0.02ms (0.019ms/tx, 0.000ms/txin) [0.00s (0.02ms/blk)] 
 node0 2025-11-26T05:23:50.304189Z [httpworker.0] [validation.cpp:2645] [bool Chainstate::ConnectBlock(const CBlock &, BlockValidationState &, CBlockIndex *, CCoinsViewCache &, bool)] [bench]     - Verify 0 txins: 0.03ms (0.000ms/txin) [0.00s (0.03ms/blk)] 
 node0 2025-11-26T05:23:50.304194Z [httpworker.0] [node/miner.cpp:191] [std::unique_ptr<CBlockTemplate> node::BlockAssembler::CreateNewBlock()] [bench] CreateNewBlock() chunks: 0.02ms, validity: 0.10ms (total 0.12ms) 
 test  2025-11-26T05:23:50.742247Z TestFramework (DEBUG): Destroying ZMQ context 
 test  2025-11-26T05:23:50.743550Z TestFramework (ERROR): Unexpected exception 
                                   Traceback (most recent call last):
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 142, in main
                                       self.run_test()
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/bld/test/functional/interface_zmq.py", line 131, in run_test
                                       self.test_multiple_interfaces()
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/bld/test/functional/interface_zmq.py", line 563, in test_multiple_interfaces
                                       subscribers = self.setup_zmq_test([
                                                     ^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/bld/test/functional/interface_zmq.py", line 162, in setup_zmq_test
                                       test_block = ZMQTestSetupBlock(self, self.nodes[0])
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/bld/test/functional/interface_zmq.py", line 93, in __init__
                                       self.block_hash = test_framework.generate(node, 1, sync_fun=test_framework.no_op)[0]
                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 660, in generate
                                       blocks = generator.generate(*args, called_by_framework=True, **kwargs)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_node.py", line 405, in generate
                                       return self.generatetoaddress(nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries, **kwargs)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_node.py", line 413, in generatetoaddress
                                       return self.__getattr__('generatetoaddress')(*args, **kwargs)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/coverage.py", line 50, in __call__
                                       return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/authproxy.py", line 137, in __call__
                                       response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/authproxy.py", line 111, in _request
                                       return self._get_response()
                                              ^^^^^^^^^^^^^^^^^^^^
                                     File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/authproxy.py", line 174, in _get_response
                                       http_response = self.__conn.getresponse()
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
                                     File "/usr/lib/python3.12/http/client.py", line 1428, in getresponse
                                       response.begin()
                                     File "/usr/lib/python3.12/http/client.py", line 331, in begin
                                       version, status, reason = self._read_status()
                                                                 ^^^^^^^^^^^^^^^^^^^
                                     File "/usr/lib/python3.12/http/client.py", line 300, in _read_status
                                       raise RemoteDisconnected("Remote end closed connection without"
                                   http.client.RemoteDisconnected: Remote end closed connection without response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions