Repository navigation
Description
Summary
The serve-miss coalescing code (B3 / #1656) has timing-fragile tests that fail under heavy CI contention (coverage-instrumented full-workspace runs) but pass on fast local cores. This surfaced on PR #1667 (shared payment pool) but is not caused by that PR's payment logic — the pool merge onto main's coalescing serve-miss tips the timing over; a sibling coalescing test is already flaky on main itself.
Flaky tests
-
crates/node/tests/origin_range_pull.rs::two_concurrent_disjoint_own_origin_misses_two_fetches_no_wedge- Fails consistently on PR feat(payments): shared payment pool — capped delegated signers + node-addressed cumulative vouchers #1667's branch under CI's
cargo llvm-cov nextest --workspace --no-tests=pass(coverage instrumentation + 2774-test actor starvation on the runner). - Error:
Error: read frame: frame I/O error: early eofin the test client helpersupport::read_client_msg— i.e. the server closes one of the two disjoint serves mid-stream (afterStreamResponse{ok:true}). - Unreproducible on fast local cores — including faithful attempts: exact
cargo llvm-cov nextest --workspace, node-suite coverage, and the disjoint coverage binary run 30× under 24 CPU hogs. Passes 25/25 under the heaviest local reproduction achieved. - Example CI runs: 31686703399, 31689193542, 31697675329.
- Fails consistently on PR feat(payments): shared payment pool — capped delegated signers + node-addressed cumulative vouchers #1667's branch under CI's
-
Peer-coalescing hang (the pull-through peer coalescing path) — reproduced 3/20 on a clean
decdn/mainworktree during investigation, i.e. pre-existing flakiness onmainindependent of the payment pool. (Exact test to be pinned down; it was hit while stress-running the coalescing pull-through suite under CPU starvation.)
What was tried (and why it missed)
Three serve-side fixes on PR #1667, all on the AwaitingDataReader present-bitfield axis, all still red on CI:
255e4768— re-poll presence over a bounded 100 ms settle on a clean outcome.222a9bcd— replace it with anawait-present watch bounded by a 15 s ceiling.c794f4d1— on a clean pull, read the authoritative durable data file (store.read/export_range) instead of the laggingobservebitfield (timing-independent by construction).
Instrumentation (local) showed the serve legs, pull, vouchers, and StreamEnd all complete on the happy path, and the 15 s ceiling never fired even at 200 ms — so the earlier fixes were on the wrong axis. But c794f4d1 still fails on CI, so the real mid-stream close is not the serve-encoder present-check — it's elsewhere in the merged coalescing + pool serve-miss (a FillSession/lease teardown, a disjoint miss sharing/attaching to the wrong session, or a session-cancel ordering under starvation), and it only manifests under CI's coverage-starvation.
Recommended next step
Local reproduction is effectively impossible (needs the CI runner's coverage slowdown + full-workspace actor starvation), so instrument → CI → fix from evidence: add capture-on-failure logging (eprintln!, which nextest surfaces) at every serve-miss close/error/cancel/teardown site (serve_leg.rs, serve_encoder.rs, window.rs, crates/cache/src/fill_session.rs mark_ended/detach, the AwaitingDataReader path), push a diagnostic commit, and read the exact server-side close site + reason from the failing CI test job. Then fix the real teardown/session bug (ensure two disjoint misses hold fully independent sessions/leases so neither's completion closes the other). Do not tune another timeout — three attempts prove that axis is wrong.
Interim
Consider whether this class of coalescing test needs a nextest retry/quarantine for CI stability while the underlying race is fixed — but note the disjoint test currently fails consistently on the PR branch (a retry may not rescue it), whereas the peer-coalescing hang is intermittent.
Filed from the shared-payment-pool work (PR #1667); the pool PR is otherwise green (15/16 checks).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix(node): close the window-pause lost-wakeup that wedged the pull leg (
ci: re-trigger CI run (#1673, #1674)
ci: TEMPORARY — run on github-hosted ubuntu-24.04 (Blacksmith capacit…
Revert "ci: TEMPORARY — run on github-hosted ubuntu-24.04 (Blacksmith…
ci: TEMPORARY — run on github-hosted ubuntu-24.04 (Blacksmith outage)
fix(cache): disable origin idle-connection pooling to fix cross-runti…
diag(node): remove DIAG#1673 instrumentation now both flakes are root…
Revert "ci: TEMPORARY — run on github-hosted ubuntu-24.04 (Blacksmith…
fix(node): window-pause lost-wakeup hang + instrument the serve-miss …
refactor(cache,node): own the downstream wait and sibling guard in Fi…
refactor(cache,node,client-pull): harden serve-demand and top-up types (
fix(cache): run origin request sends on the node's main runtime and r…