Skip to content

fuzz: overnight cmpct fill extra-txn and store_reorg timeout - #403

Merged
reardencode merged 2 commits into
masterfrom
fuzz/overnight-ibd-reorg
Sep 8, 2026
Merged

fuzz: overnight cmpct fill extra-txn and store_reorg timeout#403
reardencode merged 2 commits into
masterfrom
fuzz/overnight-ibd-reorg

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Overnight fuzz run 34224357973 (and the previous night, 34127666012) failed two jobs. Both are harness, not consensus splits.

cmpct_differential — fill seed ours=[] core=[1]

Panic on corpus seed cmpct_fuzz_fill.bin ([0, 1, 0, 1]), MS=0, first unit after compile:

cmpct missing-index split: ours=[] core=[1]

Our reconstruct with the fill tx is empty-missing (unit test already pins that). Core getblocktxn still asked for index 1.

Core v31 IsInitialBlockDownload() is a lock-free latch (m_cached_is_ibd) updated only in UpdateIBDStatus (LoadChainTip / ConnectTip / DisconnectTip). setmocktime does not leave IBD. A 2011 regtest genesis vs wall-clock 2026 stays in IBD under the default 24h -maxtipage, so ProcessMessage(TX) returns immediately. Compact blocks still process (CanDirectFetch uses mocktime). Fill extra-txn never populated.

Fix: -maxtipage=999999999 on the P2P bitcoind argv so genesis is recent at LoadChainTip. setmocktime stays for CanDirectFetch.

store_reorg — ASan -timeout=30 on [1, 0, 0, 0]

Slow-unit [0, 1, 254], then timeout 38s on [1, 0, 0, 0]. Shared OnceLock hub: every equal-work sibling is hold_body'd, then try_apply_held walks all parked bodies. Overnight churn unbounded; ASan + 30s fires.

Fix: reopen the tiny hub every 16 store_reorg_apply calls. Sibling-after-rewind still runs inside a window; one unit cannot accumulate thousands of held tips.

Test plan

  • cargo test --manifest-path fuzz/Cargo.toml --lib p2p_args_listen_v2_bind_whitelist
  • cargo test -p rbitcoin-net store_reorg
  • scripts/fuzz-run.test.sh
  • Required CI green (fmt deny clippy ast-grep test windows macos multinode coverage)

Not a core-functional PR.

rbitcoin-grok[bot] added 2 commits September 8, 2026 07:15
Overnight cmpct_differential panics on the fill seed
(`[0, 1, 0, 1]`) with ours=[] core=[1]. Core v31 latches IBD in
UpdateIBDStatus (LoadChainTip / connect), not setmocktime. A 2011
regtest genesis stays in IBD under the default 24h maxtipage, so P2P
tx is dropped and never reaches vExtraTxnForCompact. Compact blocks
still process via CanDirectFetch (mocktime).

Pass -maxtipage=999999999 on the P2P bitcoind so genesis is recent
at LoadChainTip.
Overnight store_reorg ASan hits libFuzzer -timeout=30 on tiny units
(`[0, 1, 254]`, `[1, 0, 0, 0]`). Equal-work siblings are parked in
held_bodies and try_apply_held walks every parked body on each
accept. A persistent OnceLock hub grows without bound.

Reopen the tiny hub every 16 apply calls so overnight churn still
covers sibling-after-rewind without one unit exceeding 30s.
@reardencode
reardencode merged commit 4ce12a8 into master Sep 8, 2026
15 checks passed
@rearden-grok
rearden-grok Bot deleted the fuzz/overnight-ibd-reorg branch September 8, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant