Skip to content

flaky(test): origin_range_pull::throwaway_open_then_real_open_shares_one_multi_draw_fill fetches the first draw twice #2307

Closed

Description

@thiras

Symptom

origin_range_pull::throwaway_open_then_real_open_shares_one_multi_draw_fill fails intermittently at its "no span fetched twice in full" assertion:

Error: a span was fetched twice in full: ["bytes=0-16383", "bytes=0-1097727", "bytes=0-1097727", "bytes=1097728-2195455", "bytes=2195456-3145727"]

The first draw 0-1097727 is GET from the origin twice. Later draws are fetched once. The draw boundaries vary between runs (1097728-2129919, 2129920-3145727 in another failure).

Observed rate (Linux x86_64, 16 cores, --retries 0)

Tree Setup Failures
main @ b37bbc4a full -p decdn-node, run concurrently with a second suite 2/8
branch (unrelated cache-crate change) same, concurrently 1/8
branch full -p decdn-node, sequential, default retries flaky in 2/2 runs, passed on retry
branch test alone 0/10

It fails on main, so it predates the branch. It needs contention. The test was added in #2064.

What seems to happen

The test's doc comment allows two orderings for the real open: it "attach[es] to the live fill or own[s] a fresh one, depending on whether the throwaway's serve leg has torn down yet". The origin answers each draw after 300 ms. If the throwaway's fill is torn down while its draw-0 GET is still in flight, the real open owns a fresh fill and requests draw 0 again. wiremock records both requests, and the distinct-Range assertion fails.

So either:

  • The test is too strict: the "fresh owner" ordering it documents necessarily re-fetches the abandoned in-flight draw. In that case the assertion should allow at most one repeat of the draw that was in flight at teardown. Or the test should make the ordering deterministic, for example by holding the throwaway until the real open has attached.
  • Or the product wastes origin bytes: an abandoned fill's in-flight draw could be adopted or admitted for the next owner instead of discarded, and the assertion is right. That costs a full draw (about 1 MiB) of origin egress whenever a throwaway prelude (cli: the throwaway (0,0) prelude open claims a fill on the node and abandons it #2063) races the real open.

This needs a decision on which one is intended before fixing.

Activity

  1. added
    kind:bug
    prio:medium
    rust
    kind:test
    area:node
    on Oct 5, 2026
  2. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind:bugkind:testprio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions