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

init: wake genesis wait after ImportBlocks() returns

Public commit record

What the developer wrote

Authored by ismaelsadeeq

83/100 · Strong
init: wake genesis wait after ImportBlocks() returns

If shutdown interrupts ImportBlocks() before genesis activation,
no blockTip notification is sent. The wait predicate allows
shutdown to occur, but the condition variable is never
notified, so init can remain stuck waiting for genesis activation.

Notify the tip condition variable after ImportBlocks() returns so
interrupted imports wake the wait and let it observe the shutdown request.

Add test coverage for interrupting startup after reindex block files import
begins, which exercises the path where ImportBlocks() can return before genesis
activation.
✓ 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 commit fixes a bug where Bitcoin Core could hang during shutdown if the user started a 'reindex' and then asked the program to quit before it finished loading the very first block. The fix adds a notification so the shutdown request is noticed, plus a test that simulates this exact scenario. It is a reliability/availability fix, not a security vulnerability that an attacker can exploit.

Recommended action

No immediate security action required. Treat as a normal bug-fix/availability improvement. Users running reindex should upgrade to avoid rare shutdown hangs, but there is no remote exploit.

Security signals we found

01

Denial-of-service/availability issue: graceful shutdown can hang

02

Fix is in initialization/shutdown synchronization logic

03

No attacker-controlled input path identified

04

Test added to prevent regression of shutdown hang

Risk score

Why this scored 30/100

Our methodology →
Potential impact 8/30
Exploitability 0/25
Stealth signal 3/15
Affected reach 5/15
Confidence 9/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.