Skip to content

Fix flaky 40-slice single-volume live test: drain par-rs fold queue before the late volume - #741

Merged
xbmc4lyfe merged 1 commit into
mainfrom
fix-flaky-40slice
Nov 27, 2026
Merged

xbmc4lyfe merged 1 commit into
mainfrom
fix-flaky-40slice

Conversation

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator

Fixes the flaky parchecker::tests::live_40_slice_single_volume_recovery_is_planned_whole_and_never_backfilled (it failed once on Linux x86_64 with assertion failed: backfill > 0, passed on rerun).

Cause

The control case (no volume in the plan) expects the late volume's new syndrome slots to be back-filled from disk. par-rs folds verified slices on its own fold threads: on_article_finished marks the slice VerifiedGood and only queues the fold, and fold_lane reads the slot list when the queued job runs. If a fold is still queued when the volume's slots are added (fold threads starved on a loaded machine), it lands in the new slots directly and folded_mask is set, so the back-fill finds nothing to read and backfill_bytes_read stays 0. It is not the memory pool (this test uses a private BudgetPool), the trust option (checked forced on and off, no change), or a background copy.

held_volume_case (live_planned_volumes_cover_the_damage_before_any_volume_past_the_plan) has the same control (backfill > 0) and the same race, so it gets the same fix.

Fix (test only)

entry.session.flush() (par-rs: wait until all queued folds have been applied) before the late volume arrives, in both cases. Nothing is weakened: the planned case still asserts backfill == 0 and 12 slots up front; the control still asserts backfill > 0.

Evidence and limits

  • The flake did not reproduce here: 250 runs of the single test under 28 CPU burners on rustyget-x86-a (alone, loaded, pinned to one core) and a full farm run all passed. The cause is therefore established from the par-rs code path (fold queue vs. slot add), not from a captured failure. The fix removes the race by construction.
  • Separate finding, not changed here: parchecker::live_lifecycle_tests still draw on the shared 500 MB LIVE_BUDGET (67 MB per session). Running the live_ tests at full parallelism gave StreamingMemoryLimit in 21 of them. That is a different flake class the full suite has not hit; a private pool (as par-rs b60bfd1: decode-ahead to live extraction, zero re-read live repair; forged FileDesc is an unusable set #737 did for live_trust) is the remedy.

Validation (Actions unavailable; farm runs on the exact head)

x86_64: cargo_exit=0 (cargo test --tests on rustyget-x86-d, 12 test threads, 110s); daemon_exit=0 (45s); 1 / 1 scenarios passed (complementary)
arm64:  cargo_exit=0 (cargo test --tests on rustyget-arm-c, 12 test threads, 146s); daemon_exit=0 (45s); 1 / 1 scenarios passed

rg-farm picked 12 test threads for these hosts. Functional scenarios: none cover this test-only change; one smoke scenario was run.

Deployment

Test-only change, no deployable artifact: no 6790 deploy applies.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM

…ueue before the late volume

A fold still queued when a late volume's slots are added lands in them directly, so the
control read nothing from disk and backfill > 0 failed once under load. Test-only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T01:16:08.845444Z 3471984 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

Clean-room review of head 3471984: G2G (diagnosis matches par-rs fold/fold_lane/flush; no assertion weakened; no other source of zero or nonzero reads in these tests). Farm x86_64 and arm64 results are in the description.

@xbmc4lyfe
xbmc4lyfe merged commit 3471984 into main Nov 27, 2026
0 of 5 checks passed
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