Skip to content

qa: Intermittent failure in feature_block.py under MSAN #36217

Closed

Description

@willcl-ark

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

CI run in #36209 failed supriously:

https://github.com/bitcoin/bitcoin/actions/runs/34467708105/job/102840068846

It appears node0 recieved a block with a merkleroot mismatch causing a disconnect:

 node0 2026-09-10T10:53:05.402885Z [msghand] [net_processing.cpp:3830] [ProcessMessage] [net] received: block (1000000 bytes) peer=73 
 node0 2026-09-10T10:53:05.404748Z [msghand] [net_processing.cpp:5116] [ProcessMessage] [net] received block 3c326d36a415b441327bc01928c3f9b98e6c37a93500f220ccdce40c3b910ac3 peer=73 
 test  2026-09-10T10:53:05.404830Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:14552: msg_block(block=CBlock(nVersion=4 hashPrevBlock=686494e3013af3cb445e9200d56b2405c0e04ec3c1a0f346fac1b7fd10f1eb2b hashMerkleRoot=64beaeb8229780dbe40d94b742a9f411e80040824612c1aeb2dfd343b13cfd5c nTime=Thu Sep 10 11:00:14 2026 nBits=207fffff nNonce=00000000 vtx=[CTransaction(version=2 vin=[CTxIn(prevout=COutPoint(hash=0000000000000000000000000000000000000000000000000000000000000000 n=4294967295) scriptSig=02ec01 nSequence=4294967294)] vout=[CTxOut(nValue=118.74999996 scriptPubKey=2103baec77cd856657... (msg truncated) 
 node0 2026-09-10T10:53:05.404832Z [msghand] [validation.cpp:4039] [IsBlockMutated] [validation] Block mutated: bad-txnmrklroot, hashMerkleRoot mismatch 
 node0 2026-09-10T10:53:05.404900Z [msghand] [net_processing.cpp:5123] [ProcessMessage] [net] Received mutated block from peer=73 
 node0 2026-09-10T10:53:05.404965Z [msghand] [net_processing.cpp:2021] [Misbehaving] [net] Misbehaving: peer=73: mutated block 
 node0 2026-09-10T10:53:05.405460Z [msghand] [net_processing.cpp:5392] [MaybeDiscourageAndDisconnect] [net] Warning: disconnecting but not discouraging local peer 73! 
 node0 2026-09-10T10:53:05.408222Z [net] [net.cpp:567] [CloseSocketDisconnect] [net] Resetting socket for peer=73 
 node0 2026-09-10T10:53:05.408312Z [msghand] [logging/timer.h:58] [Log] [lock] ContendedLock: lock contention connman.m_nodes_mutex, net.h:1872 started 
 node0 2026-09-10T10:53:05.408422Z [msghand] [logging/timer.h:58] [Log] [lock] ContendedLock: lock contention connman.m_nodes_mutex, net.h:1872 completed (26μs) 
 test  2026-09-10T10:53:05.408693Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:14552 due to [Errno 104] Connection reset by peer

There is no MemorySanitizer diagnostic.

Expected behaviour

Test should pass.

Steps to reproduce

I am trying to reproduce using the same seed with:

env -i HOME="$HOME" PATH="$PATH" USER="$USER" \
  FILE_ENV=./ci/test/00_setup_env_native_msan.sh \
  MAKEJOBS="-j$(nproc)" \
  DOCKER_BUILD_CACHE_ARG="${DOCKER_BUILD_CACHE_ARG:-}" \
  TEST_RUNNER_EXTRA="feature_block.py --randomseed=162348186461537714" \
  ./ci/test_run_all.sh

Will update if I manage to do so.

Relevant log output

No response

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

merge of PR 36209 and master @ 279f172

Operating system and version

ubuntu:26.04

Machine specifications

No response

Activity

  1. willcl-ark commented on Sep 10, 2026

    @willcl-ark
    MemberAuthor

    Seems I can't reproduce this locally:

    + eval 'TEST_RUNNER_EXTRA=(feature_block.py --randomseed=162348186461537714)'
    ++ TEST_RUNNER_EXTRA=(feature_block.py --randomseed=162348186461537714)
    + LD_LIBRARY_PATH=/ci_container_base/depends/x86_64-pc-linux-gnu/lib
    + '/ci_container_base/ci/scratch_ ₿🧪_/build-x86_64-pc-linux-gnu/test/functional/test_runner.py' -j16 --tmpdirprefix '/ci_container_base/ci/scratch_ ₿🧪_/test_runner/' --ansi --combinedlogslen=99999999 --timeout-factor=40 feature_block.py --randomseed=162348186461537714 --quiet --failfast
    Remaining jobs: [feature_block.py]
    
    TEST             | STATUS    | DURATION
    
    feature_block.py | ✓ Passed  | 68 s
    
    ALL              | ✓ Passed  | 68 s (accumulated)
    Runtime: 68 s
    
  2. willcl-ark commented on Sep 14, 2026

    @willcl-ark
    MemberAuthor

    Going to close for now as this hasn't re-occurred to my knowledge.

  3. maflcko commented on Sep 30, 2026

    @maflcko
    Member

    Same in https://github.com/bitcoin/bitcoin/actions/runs/36628137002/job/109610831555?pr=36384#step:11:14479

                                           test_witness_block(self.nodes[0], self.test_node, block, accepted=False, reason='bad-blk-weight')
                                         File "/home/runner/work/_temp/build_ ₿🧪_/test/functional/p2p_segwit.py", line 145, in test_witness_block
                                           with node.assert_debug_log(expected_msgs=reason):
                                         File "/usr/lib/python3.12/contextlib.py", line 144, in __exit__
                                           next(self.gen)
                                         File "/home/runner/work/_temp/test/functional/test_framework/test_node.py", line 660, in assert_debug_log
                                           self._raise_assertion_error(f'Expected message(s) {remaining_expected!s} '
                                         File "/home/runner/work/_temp/test/functional/test_framework/test_node.py", line 229, in _raise_assertion_error
                                           raise AssertionError(self._node_msg(msg))
                                       AssertionError: [node 0] Expected message(s) ['bad-blk-weight'] not found in log:
                                        - 2026-09-29T20:59:42.571588Z [msghand] [net_processing.cpp:3833] [ProcessMessage] [net] received: block (3986612 bytes) peer=1
                                        - 2026-09-29T20:59:42.576984Z [msghand] [net_processing.cpp:5118] [ProcessMessage] [net] received block 6e11d44ce1b91e648052ff17223d4b06f495a0297b57036668c76e489e0e7156 peer=1
                                        - 2026-09-29T20:59:42.576996Z [msghand] [validation.cpp:4059] [IsBlockMutated] [validation] Block mutated: bad-witness-merkle-match, CheckWitnessMalleation : witness merkle commitment mismatch
                                        - 2026-09-29T20:59:42.577001Z [msghand] [net_processing.cpp:5125] [ProcessMessage] [net] Received mutated block from peer=1
    
  4. maflcko commented on Sep 30, 2026

    @maflcko
    Member

    Maybe fixed by now with the new hardware pool #36125 (comment)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions