fuzz: Use ImmediateBackgroundTaskRunner in process_messages #36046

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2608-fuzz-deadl changing 3 files +15 −11
  1. maflcko commented at 6:26 PM on August 20, 2026: member

    The process_messages target may complain about false-positive debug lock-order issues:

    echo 'Gv8uXPBdXV0QEP//dHVhxyoVKP////8A/0BrLmNrAEEAIP+MXHR0OQAAAAD+///txgIUADBgAAEC
    fgAAAK0ArQEAAAD/AFwAQf9cdHf5XGhlYWRlcltbyzHIw8RcX2Jsb2NrAAAAAGNtcAAAADAftOvd
    D0sFqXEx6US5VIknlsOJqZ5goMwtmwZBPdCxQZbatBsWPOR3FcUvSLLsKwcgKT8XdmjvDgskH5pK
    iAUI/uVJTf//fyAAAAAAAQIAAAAAAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//
    //8DAskA/v///wIA+QKVAAAAAAFRAAAAAAAAAAAmaiSqIant4vYcP3HR3v0/qZnfo2lTdVxcaQaJ
    eZlitIvr2DaXToz5ASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgAAAD/XPB0eAD/
    AgAAAAD9ABZqCwAAAAAEAAAAXPBhYVtbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tb
    W1tb//9bW1tbW1tbW1sAAAAxNgAAADc5MzU5NDk2ODEwNzg3NAAAAAICAgL9a4jAhyQCAgICAQAA
    AAAABSpvdGhlcir/8wICAgICAAAAeAL0AAAAAAAAaW52O///BAAAAAAAtbW1tWFbW2FhtbVhYWFh
    YSkpW1tbW2QAJwAAAAAAAAAAMTYAAAA3OTM1OTQ5NjgxMDc4NzQAAAACAgIC/WuIwIckAgICAgEA
    AAAAAAUAAAAAAv7///MAeAL0AAAAAAAAaW52Ow==' | base64 --decode > /tmp/fuzz.input
    
    FUZZ=process_messages ./bld-cmake/bin/fuzz /tmp/fuzz.input --printtoconsole=1 | grep -A99 'POTENTIAL DEADLOCK DETECTED'
    
    [test] [sync.cpp:108] [potential_deadlock_detected] [error] POTENTIAL DEADLOCK DETECTED
    [test] [sync.cpp:109] [potential_deadlock_detected] [error] Previous lock order was:
    [test] [sync.cpp:118] [potential_deadlock_detected] [error]  'NetEventsInterface::g_msgproc_mutex' in test/fuzz/process_messages.cpp:89 (in thread 'test')
    [test] [sync.cpp:118] [potential_deadlock_detected] [error]  'm_chainstate_mutex' in validation.cpp:3351 (in thread 'test')
    [test] [sync.cpp:118] [potential_deadlock_detected] [error]  'cs_main' in validation.cpp:3373 (in thread 'test') 
    [test] [sync.cpp:118] [potential_deadlock_detected] [error]  (2) 'MempoolMutex()' in validation.cpp:3376 (in thread 'test')
    [test] [sync.cpp:118] [potential_deadlock_detected] [error]  (1) 'm_tx_download_mutex' in net_processing.cpp:2216 (in thread 'test')
    [test] [sync.cpp:122] [potential_deadlock_detected] [error] Current lock order is: 
    [test] [sync.cpp:133] [potential_deadlock_detected] [error]  'NetEventsInterface::g_msgproc_mutex' in test/fuzz/process_messages.cpp:89 (in thread 'test')
    [test] [sync.cpp:133] [potential_deadlock_detected] [error]  'cs_main' in net_processing.cpp:4725 (in thread 'test')
    [test] [sync.cpp:133] [potential_deadlock_detected] [error]  (1) 'm_tx_download_mutex' in net_processing.cpp:4725 (in thread 'test')
    [test] [sync.cpp:133] [potential_deadlock_detected] [error]  (2) 'cs' in txmempool.h:521 (in thread 'test')
    

    Fix this by using the ImmediateBackgroundTaskRunner from src/test/fuzz/cmpctblock.cpp.

  2. fuzz: Use ImmediateBackgroundTaskRunner in process_messages fae6665f01
  3. DrahtBot added the label Fuzzing on Aug 20, 2026
  4. DrahtBot commented at 6:26 PM on August 20, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36046.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK frankomosh

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko added this to the milestone 32.0 on Aug 20, 2026
  6. frankomosh commented at 6:39 PM on August 20, 2026: contributor

    Concept ACK

Labels

Milestone
32.0


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: 2026-08-21 04:51 UTC

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