Skip to content

client: a lane cannot steal a victim's tail unless it covers the victim's whole range, so one partial-coverage leg runs alone #2303

Closed

Description

@thiras

Summary

A freed lane steals only from a victim range that its coverage includes in full. It does not check the tail that it would take. steal_split filters the candidates with covers(start, len) over the victim's whole in-flight range (crates/client/src/segment.rs ~L280; the predicate comes from Work::steal, scheduler.rs ~L1317). A partial holder that covers the back half of a big leg therefore cannot steal it. The leg then runs alone on one stream to its end, while the lanes that could share it stay idle.

Evidence (testnet, 2026-10-03 00:21 UTC, CLI and fleet on 418c5522)

decdn bundle pull --hash 9194000d…f69e5 --namespace 1 (mistral-7b). Result: 8m42s, 0 failed, downloaded 17.1 GB → reconstructed 29.0 GB. The baseline after #2293 is 374–417 s.

Entry b32596… (4.61 GiB, 64 MiB coverage groups) started with these lanes:

lane coverage first leg
fra1 0-43,46-57 [0, 2952790016) = groups 0–43, one leg
hel1 0,2-4,8-9,18-45,60-68 134 MB, done in seconds
lon1 10-17,25-42,44,46,58-73 ~1.1 GB
ash1 5-7,46-59 738 MB

hel1 covers groups 18–43, which is the whole back 60% of fra1's leg. But no lane covers group 1 (and hel1 also misses 5–7 and 10–17), so covers(0, 2952790016) is false for every lane. The client logged 13 steals on the other entries and none on b32596.

  • fra1's serve_stream span: byte_offset=0 byte_len=2952790016 outcome=completed bytes=2964324480, 497.7 s, busy_ns 9.4 s / idle_ns 488 s. The node waited on the client the whole time. One stream ran at ~6 MB/s while it shared the link, and at ~10 MB/s once it was alone. The link takes 55+ MB/s.
  • bundle pull: b32596…: 4.61 GiB in 501.4s (9.41 MiB/s). The other two shards took 239 s and 269 s.
  • Entry 7cbb48… (consolidated, range-dedup) opened its last complement leg at 00:25:25, but finished at 00:30:26. That is 18 s after b32596, its splice donor, finished. So this one leg set the run's wall time: about 4 extra minutes.

Proposed

  • Let a steal take the part of the victim's missing remainder that the stealer covers. For each candidate, find the longest group-aligned suffix [x, end) of the victim's range that covers accepts. Use the missing bytes in that suffix for the argmax. Set the split to the later of the rate-weighted split and x. The victim keeps [start, split), and a steal still requires the victim to keep a missing byte.
  • Unit test in segment.rs: a victim range [0, 44 groups), a stealer that covers groups 18–43 only, and a frontier in group 2. Expect a steal with a split at or after group 18.
  • Success signal: on the mistral pull, b32596 shows a stole the tail of a lane's missing remainder line with fra1 as the victim, and the entry finishes within ~1 min of the other shards.

Minor, seen in the same run

  • At 00:26:01 a lane's extra worker stole from its own sibling stream (stealer=Some(0xa43d…) victim=Some(0xa43d…)). 59 ms later nbg1 stole half of that new leg at victim_frontier=0, before the leg had received any bytes.
  • The stole the tail of a lane's missing remainder debug line has no hash field. In a bundle pull, you cannot tell which entry a steal belongs to.

Related

#2290 / #2299 (a victim stops at the split on its open stream; works as designed in this run: 13 steals, 9 victim stops, no re-queue), #2252 (complement legs to one holder), #1506 (coverage filter before the argmax).

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    prio:medium
    on Oct 3, 2026
  2. self-assigned this
    on Oct 3, 2026
  3. added
    rust
    on Oct 3, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 3, 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: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