You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flaky: binary-index reload race in values_bound_type_after_delete_incremental_index_timeline under parallel grp_misc (dict branch: too small for header) #1489
P2Scheduled: real but not urgentarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesbugSomething isn't working as expectedtriage:needs-infoBlocked on information from author/owner
it_values_type_deleted_repro::values_bound_type_after_delete_incremental_index_timeline (bundled into fluree-db-api/tests/grp_misc.rs via #[path], source at fluree-db-api/tests/it_values_type_deleted_repro.rs:202) fails roughly 1 in 6 thread-parallel cargo test --test grp_misc runs with:
Internal("failed to load binary index: dict branch: too small for header")
It passes reliably single-threaded (--test-threads=1) and was not observed failing under nextest's process-per-test execution during the same gate batteries.
Shape of the failing timeline
The test drives the production-like background-indexer sequence: insert across two commits → build_and_publish_index → reload ledger → wipe → incremental build_and_publish_index folding the retractions → reload → re-insert → index → reload, asserting VALUES/type shapes agree at each step. The failure is on a reload step: the freshly published binary index's dict branch fails the header-size check when read back, which points at a reload race (reader observing a partially-written or stale dict-branch artifact) rather than anything in the test's own assertions — i.e. a fluree-db-core binary-index load/publish race surfaced by CPU contention, not a query bug.
Discovery context
Surfaced during the perf-series gate batteries (PR #1486 body records it as an explicitly out-of-scope, pre-existing flake — that PR only moves an unrelated test between binaries and touches no engine code). The failure rate was measured while grp_misc's ~240 bundled tests ran thread-parallel in one process, so timing pressure from sibling tests appears to be the trigger.
Suggested next steps for the binary-index owner
Reproduce with cargo test -p fluree-db-api --test grp_misc values_bound_type_after_delete_incremental_index_timeline looped under parallel sibling load (or the full grp_misc repeated ~10×).
Audit the publish→reload boundary in the binary-index dict-branch writer/loader for a missing ordering guarantee (rename-before-flush, non-atomic publish of the branch file, or a cached header length read against a superseded artifact).
Sweep note (claude-assisted): I could not reproduce this at 47e96b7b6 — 25× thread-parallel grp_misc runs (262 tests each) on a deliberately loaded box, zero failures, against the filed ~1-in-6 rate (p≈0.01 that we'd see zero if the rate still held).
The last occurrence I can find is the #1552 CI comment in early August, and the dict subsystem has been substantially reworked since (the #1622-era pack compaction, the #1624 rebuild chain, f266e6100) — a plausible incidental fix, though nothing in that lineage targets the publish→reload ordering this issue hypothesizes, so I don't want to declare victory on vibes.
@bplatz, when you get a chance: if CI has been silent on dict branch: too small for header since ~8/11 (the dict-rework landings), I think we close this as fixed-incidentally with that citation; if it's recurred anywhere, the audit target from the body (the dict-branch writer/loader ordering at dict/branch.rs decode + its publish path) still stands and this stays open.
Closing because it hasn't come back. Two rounds of 25 parallel runs passed: the August round noted above, and one of the grp_misc binary on 2026-11-14 against main at f42ea37. No recurrence has been reported here since early August.
Nothing has changed the suspected cause, though. If it reappears, start with the publish→reload ordering in dict/branch.rs, and with write_numbig_arena (numbig.rs:352), which uses a plain std::fs::write, so a reader racing the write can see a short file. Please reopen with the failing run.
P2Scheduled: real but not urgentarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesbugSomething isn't working as expectedtriage:needs-infoBlocked on information from author/owner
Activity
docs(test): why the runner model decides — process-scoped interferenc…
aaj3f commentedon Aug 25, 2026
Sweep note (claude-assisted): I could not reproduce this at
47e96b7b6— 25× thread-parallelgrp_miscruns (262 tests each) on a deliberately loaded box, zero failures, against the filed ~1-in-6 rate (p≈0.01 that we'd see zero if the rate still held).The last occurrence I can find is the #1552 CI comment in early August, and the dict subsystem has been substantially reworked since (the #1622-era pack compaction, the #1624 rebuild chain,
f266e6100) — a plausible incidental fix, though nothing in that lineage targets the publish→reload ordering this issue hypothesizes, so I don't want to declare victory on vibes.@bplatz, when you get a chance: if CI has been silent on
dict branch: too small for headersince ~8/11 (the dict-rework landings), I think we close this as fixed-incidentally with that citation; if it's recurred anywhere, the audit target from the body (the dict-branch writer/loader ordering atdict/branch.rsdecode + its publish path) still stands and this stays open.bplatz commentedon Nov 14, 2026
Closing because it hasn't come back. Two rounds of 25 parallel runs passed: the August round noted above, and one of the
grp_miscbinary on 2026-11-14 againstmainat f42ea37. No recurrence has been reported here since early August.Nothing has changed the suspected cause, though. If it reappears, start with the publish→reload ordering in
dict/branch.rs, and withwrite_numbig_arena(numbig.rs:352), which uses a plainstd::fs::write, so a reader racing the write can see a short file. Please reopen with the failing run.