Skip to content

flaky(ci): node_origin_pull::a_wedged_channel_open_does_not_starve_the_candidate_loop burns the 300s nextest backstop, reddening test on main (#1718 stopgap does not bound it) #1779

Closed

Description

@thiras

Summary

The Rust test CI job is intermittently red on main because
decdn-node::node_origin_pull::a_wedged_channel_open_does_not_starve_the_candidate_loop
consumes the full 300 s .config/nextest.toml backstop and is TERMINATED.
Every other test in the run passes (2933/2934, 2835/2836).

This is the same disease as #1718 (closed) — an iroh Endpoint::close() wedge on a
stranded upstream QUIC connection — but on a different test, and with an
important new fact: the test-side stopgap that #1718 asked for is already in
place and does not bound the test.

Evidence (three independent runs, two of them on main)

Where Commit Job
main b68d4c05 (2026-08-23) job 97260091428
main b4a08d16 (2026-08-22) job 97039669205
PR #1773 71fecd61 job 97275920605

Identical shape every time:

 SLOW [>180.000s] decdn-node::node_origin_pull a_wedged_channel_open_does_not_starve_the_candidate_loop
 SLOW [>240.000s] ...
 TERMINATING [>300.000s] ...
 TIMEOUT [ 300.009s] (2934/2934)
   stderr ───
   shutdown: endpoint close timed out after 10s (0/4 drained)
 Summary [450.565s] 2934 tests run: 2933 passed, 1 timed out

Re-running the same job on the same commit passes, which is what makes it a flake
rather than a regression. It reproduces on main with no PR involved.

Why this is not just "#1718 again"

#1718's suggested test-side stopgap shipped: crates/node/tests/support/mod.rs:158
bounds teardown with SHUTDOWN_TIMEOUT = 10s and warns instead of hanging. That
stopgap fires here — 0/4 drained says the FIRST Endpoint::close() never
returned inside 10 s — and the test still burns 300 s. So bounding close()
moved the wedge rather than removing it: roughly 290 s of the run is spent
somewhere teardown's deadline does not cover (endpoint/runtime drop after
shutdown() returns is the obvious candidate, not yet confirmed under a
debugger).

Worth noting because #1718 was closed on the strength of that stopgap, and it is
not sufficient.

Relationship to #1675

#1675 tracks the architectural root cause — pull legs run on ephemeral per-serve
current-thread runtimes, so a connection's QUIC driver is stranded when its
runtime is dropped, and the fixed ABANDON_DRAIN = 3 s sleep
(crates/node/src/node_origin/pull_leg.rs:82) is the workaround that loses the
race under CI scheduling pressure.

#1675 currently says "Not urgent … not a live defect." The three runs above
are the counter-evidence: it is a live defect today, and it is the single reason
the test job goes red on main. This issue exists to carry that evidence and
the current symptom; the fix probably belongs to #1675's stable-runtime work.

Impact

  • main shows red CI for reasons unrelated to whatever landed.
  • Every PR inherits a ~1-in-N chance of a red test job, and each occurrence
    costs a 450 s job plus a human deciding whether it is their fault. Telling a
    genuine regression from this flake currently requires reading the log and
    recognising the test name.
  • It trains reviewers to re-run red jobs on reflex, which is how a real failure
    gets waved through.

Suggested direction

  1. Diagnose where the remaining ~290 s goes. Attach under the stress
    reproduction from Flaky deadlock: node-origin pull-leg abandon-drain races Endpoint::close(), hangs test job under CI load (node_origin_pull::a_probe_cache_hit_drops_a_provider_no_longer_admitted) #1718 (busy loops saturating the cores) and confirm whether
    the block is Endpoint drop, runtime drop, or something in the test body.
  2. Fix the product-side race per Pull legs run on ephemeral per-serve runtimes, stranding shared connection drivers (HTTP + QUIC) #1675: a stable, long-lived pull-leg runtime,
    so ABANDON_DRAIN and pool_max_idle_per_host(0) can both go.
  3. Meanwhile, make the flake self-identifying rather than a silent 300 s
    burn — e.g. a per-test timeout well under the nextest backstop on the
    node-origin suite, so it fails fast and names itself.

Reproduction

Per #1718: saturate the cores (6 busy loops on 4 cores) and run the node-origin
suite in a loop; that issue measured ~1 in 3–9 under stress and ~1 in 30 at
normal load on main.

Activity

  1. added
    kind:bug
    prio:high
    rust
    on Aug 24, 2026
  2. self-assigned this
    on Aug 24, 2026
  3. moved this from Backlog to In progress in deCDNon Aug 24, 2026
  4. moved this from In progress to Done in deCDNon Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:bugprio:highrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions