Skip to content

test(node): two node_origin_pull tests flake under load on main #2174

Closed

Description

@thiras

Summary

Two tests in crates/node/tests/node_origin_pull.rs fail under CPU load. They pass alone, and they pass in most plain cargo nextest runs. They fail on main (1fed204) at the same rate as on fix/stale-proof-headroom-2171-2173, so this is not a regression from that branch.

Test Failure
silent_upstreams_do_not_starve_the_candidate_loop (L5215) expected metric line decdn_node_pull_stalled_total 2. The value is 1 (21 times) or 0 (7 times).
concurrent_pulls_resume_at_their_own_frontier_not_the_channels (L13222) pull A/B returned NotFound (expected AlreadyAdmitted). Most runs hang for about 61 s first.

Measurements

Stress run: 6 copies of the test binary at once, --test-threads 3, 3 tests per copy, 5 rounds (30 runs per sample). A sample counts as failed if any of its tests fails.

Build Failed samples
main 5/30, 8/30, 10/30 (23/90)
branch 10/30, 7/30, 7/30 (24/90)

A third test, node_origin_pull_falls_through_a_stalled_candidate, ran in the same stress and never failed. It did fail once on the first try in two full-workspace nextest runs (it passed on retry).

Notes

  • silent_upstreams_…: the test counts stalls by metric. Under load, one or both silent upstreams do not reach the stall path before the candidate loop moves on. The assertion likely depends on timing, not on the behavior under test.
  • concurrent_pulls_…: 13 of the 16 failures on main got topups=[] stalled=1. The test's own message says that shape is "a stalled/timeout budget expiry", not a frontier overshoot. The ~61 s runtime matches a pull that waits out its budget.
  • One main failure is different: pull A returned NotFound … got topups=[(<pool>, 4000)] stalled=1 pending=0. A top-up ran and the pull still ended NotFound. That is closer to the overshoot signature the test guards against (feat(node): reactive mid-pull deposit top-up on the node-to-node buyer leg (#1530) #1600 review). This one should be checked before it is dismissed as timing.
  • Other suites (the client-pull driver, anvil settlement) show the same pattern: they fail under load on main and pass in isolation.

Repro

cargo build --bin decdn-node
cargo nextest run -p decdn-node --test node_origin_pull --no-run
BIN=$(cargo nextest list -p decdn-node --test node_origin_pull --message-format json \
  | python3 -c "import json,sys; d=json.load(sys.stdin); print(next(iter(d['rust-suites'].values()))['binary-path'])")
cd crates/node
for c in 1 2 3 4 5 6; do
  timeout 90 "$BIN" --exact \
    concurrent_pulls_resume_at_their_own_frontier_not_the_channels \
    silent_upstreams_do_not_starve_the_candidate_loop \
    node_origin_pull_falls_through_a_stalled_candidate \
    --test-threads 3 > /tmp/nop-$c.txt 2>&1 &
done; wait
grep -h "^test .* FAILED\|^Error:" /tmp/nop-*.txt

Next steps

  1. Decide if each assertion depends on timing (fix the test) or catches a real stall under load (fix the code).
  2. Look first at the topups=[(…, 4000)] + NotFound case.

Activity

  1. added
    kind:bug
    rust
    kind:test
    area:node
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:nodekind:bugkind:testrust

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions