AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

fuzz: use ImmediateBackgroundTaskRunner to silence DEBUG_LOCKORDER

Public commit record

What the developer wrote

Authored by Eugene Siegel

83/100 · Strong
fuzz: use ImmediateBackgroundTaskRunner to silence DEBUG_LOCKORDER

DEBUG_LOCKORDER was reporting a false positive deadlock with the
cmpctblock fuzz harness when using ImmediateTaskRunner. Since it is
single-threaded, ImmediateTaskRunner callbacks added LockOrders that
could never happen outside of a fuzz test.

First a block would get connected:
* LOCK(mempool.cs)
* BlockConnected (fuzz test runs in same thread)
* LOCK(m_tx_download_mutex)

Then a later iteration of the LIMITED_WHILE would send a TX:
* LOCK(m_tx_download_mutex)
* LOCK(mempool.cs)

causing a false positive deadlock. Normally, the BlockConnected
callback would run in a different thread and no deadlock is reported.

Fix this by launching a thread that runs the callback and is
immediately joined.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This change only affects an internal fuzzing test harness (a tool used to automatically find bugs in Bitcoin Core). It swaps the task runner used during fuzz testing so that lock-order debugging warnings no longer report a false alarm. There is no change to production code, no real deadlock is being fixed, and no user funds or network behavior are affected.

Recommended action

No action required. This is a test-infrastructure-only change. Reviewers may verify that ImmediateBackgroundTaskRunner is only used in the fuzz harness and that the thread join prevents any lifetime issues.

Security signals we found

01

Change is confined to a fuzz test harness (src/test/fuzz/cmpctblock.cpp)

02

No production consensus, networking, wallet, or validation logic is modified

03

The lock-order report being silenced is explicitly described by the author as a false positive

04

New code launches and immediately joins a thread; no concurrency bugs introduced

05

No cryptographic, memory-safety, or permission changes

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.