Repository navigation
Description
Summary
During a multi-source decdn bundle pull, the client can stop sending a proof on a leg for 10 s, so the node times the stream out. When that happens, the client:
- logs nothing about the failed leg, and
- re-queues the leg's remaining range but hands it to another lane only after that lane finishes its own range.
Together these turn one mid-run provider loss into a silent serial tail. The cause of the 10 s proof gap itself is still unknown (see Open question).
Observed
Mistral bundle smoke pull (--hash 9194000d…af69e5 --namespace 1) on 2026-09-29, 00:21–00:29 UTC. CLI at cff5fb13, fleet redeployed 00:13 UTC. The run took 8m28s with 0 failed, downloaded 17.1 GB → reconstructed 29.0 GB.
- fra1 / 998030. At 00:21:11 the client opened two legs to fra1 on one lane:
b32596[0, 1.24 GB) and998030[0, 1.67 GB).- The
b32596leg completed at ~22 MiB/s over 178 s. - The
998030leg delivered ~2 MiB, then fra1'sserve_streamspan ended at 00:21:25:after payment: proof 1 of at most 8 for a 1048576-byte chunk (1048576 bytes owed, 0 more queued): proof read timed out after 10s: peer-side fault. - The client log (
RUST_LOG=info,decdn_cli=debug,decdn_client=debug) has no line at all about this failure. - Range [2 MiB, 1.667 GB) was reopened to bcl at 00:27:34, only after bcl finished its own stripe range [1.667 GB, end). That is 6 min later, and it ran as a serial tail of ~80 s at ~20 MiB/s.
- The
- lon1 / 7cbb48. At 00:21:15 the client opened 3 legs to lon1 on
7cbb48.- All 3 failed node-side with the same
proof 1 … proof read timed out after 10s(no voucher credited, counted asserve_stream_client_declined). The client made 0 B of progress on 7cbb48 in that window. - The client logged
a concurrent gap of the same range set also failed: no terminal signal after the voucher write failed; … sending stopped by peerat 00:21:26. So it did write a proof, but after the node had already stopped the stream.
- All 3 failed node-side with the same
- Other legs were healthy. Legs to bcl, hel1, nbg1 and ash1 progressed normally in the same window, at ~40–50 MB/s aggregate.
Why it is silent and serial (confirmed in code)
- Scheduler path (
crates/client/src/scheduler.rs,Err(e)arm at ~L941):- A retryable fault is stored in
faultsand its remainder is re-queued topending, with no log. fill_gap(driver.rs~L1759–1875) also logs nothing on a leg error.faultsis read only when the fetch ends with bytes still missing (~L1471–1518). A fetch that recovers drops them unreported.- A worker holds one range until it finishes (module doc, ~L19–24).
pickconsultspendingonly when a worker returns for more work (~L455–500), and nothing interrupts a busy lane. The re-queued range therefore waits for the slowest surviving lane.
- A retryable fault is stored in
- Stripe path (
driver.rs~L1254–1289):- A lane fault is stored and the remainder is pushed to the front of the queue, again unlogged.
- The only WARN is
keep_decisive(~L712), which fires only on a lane's second concurrent fault. lon1 (3 legs) got one; fra1 (1 leg) did not. left the stripeis logged only after the whole drive returns (crates/cli/src/commands/fetch.rs~L3024–3031).
This is a sibling of #2225, not a duplicate: #2225 covers blocks no lane covers (never queued), while here the range was re-queued after a retryable fault. The tail shape is the same.
Open question: the 10 s proof gap
These were ruled out:
- Checkpoint backpressure. A checkpoint is queued only per 4 MiB batch (
ranged_store.rs~L513/528/869). The stalled legs had ≤2 MiB, and noingest waited on a checkpoint slotline appears at 00:21. - Lane issuance lock contention. The lock covers a local sign plus a buffered write (
ledger.rs~L483/638), and fra1's sibling leg paid on the same ledger throughout.
One weak candidate remains:
- The whole bundle runs on one task (
bundle_pull.rs~L1758, "notokio::spawn"), andsettle_lane→persist_watermarkdoes a synchronous redb commit (fetch.rs~L1394, ~L2434–2450). - A seconds-long fsync there could freeze every leg's proof write at once.
- But legs to other nodes survived, so this fits only if they had spare credit window.
The existing floor WARN (lib.rs ~L3176, which logs unpolled_ms) cannot fire, because the node cuts the stream at 10 s, before the client's floor expires. Possibly overlaps #2211 hypothesis 1 (the client's reader is not polled).
Proposed
- Log each leg fault where it happens (
scheduler.rsErr(e)arm,driver.rslane-fault arm) with provider, hash, offset, and bytes received. - Emit a per-leg debug line when a proof has been owed and unsent for more than ~5 s, so the next occurrence names the stall.
- Let an idle or finished lane take a re-queued range, instead of waiting for a busy lane to finish its own.
- Root-cause the proof gap once the debug line exists (move the redb commit off the shared task if it is the cause).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
fix(client): retire a faulted stripe lane under the queue lock and ma…
fix(client): skip reserved first units as growth takers and time the …
fix(client,cli): log each lane fault where it happens and grow a busy…
thiras commentedon Sep 29, 2026
Node-side view of a stall: both ends wait on each other (ash1, 2026-09-29 05:48 run)
This run used the
74e2cd42client (with the #2231 proof-stall debug line) and a fleet redeployed at 05:44 UTC. For the first time we have both sides of one stall.Node side. ash1
serve_stream, trace4791595894fb6c085345c5f51a69ef0a,998030d5…[3221225472, +1610612736), failed after 203 s:So ash1 had already written 9 chunks (~9 MiB) past the paid watermark into the stream, and it was waiting for a proof.
Client side, same leg, same seconds. For ~50 s the leg advanced about 1 MiB every 5–8 s, and every stall line was in the read phase with nothing owed:
The client had proved everything it had received and was waiting for the next frame. The node had handed ~9 MiB to its QUIC send side and was waiting for the proof of bytes that the client never read. The data was stuck in transport. It was not stuck in the client's pay path or in the node's proof reader.
It is per connection, not per host.
decdn_active_connections{instance="ash1"}equalsdecdn_streams_active, which is 3. So each stream has its own QUIC connection.b32596…leg on another connection stalled the same way. It showsunproved=0 phase="read"and faulted withno verified progress within 10s(trace442e5fb96898cef9604a1e02f9a84889).57180673385cabcd8cad7d08c93c1391moved 261 MB in 13.7 s, andcaf56a2fd80c07091b26389b8277bfd7moved 219 MB in 9.1 s.All 27 stall lines in this run have the same shape. Every one is
phase="read". 24 haveunproved=0, and the other 3 have at most one chunk unproved. The peers were fra1 ×12, nbg1 ×8, ash1 ×6 and hel1 ×1.Suggested next step. Record the QUIC path state of a stalled connection on both ends: the RTT, cwnd, bytes in flight, the lost-packet count and the selected path (direct or relay, IPv4 or IPv6). A good trigger is the moment the node enters the proof wait with queued chunks, or the moment the client's read phase passes 5 s. This client host has no IPv6, and both ends log
sendmsg … NetworkUnreachableto IPv6 addresses. A connection whose selected path is an IPv6 or blackholed path would give exactly this picture.altanoruc commentedon Sep 30, 2026
Still reproduces on
ef4bb891(2026-09-30, fleet redeployed ~15:27 UTC)Same bundle (
9194000d…), 5 runs, all completed with 0 failed. The stall hit run 1 only. Run 1 went through a VPN, as did run 2; runs 3–5 did not.Client side, run 1, 17:05:19–20 UTC. Three legs to ash1 (
0xDb0E…), opened at the start of the run, faulted within a second of each other. Each hadlanded=0:The fault is now logged (the first checkbox). The remainder still waits for a busy lane.
Node side, same seconds. ash1
serve_stream, all three legs:Traces:
ea642d12e7437e64f2db2d395facd06b(998030, 10.0 s),fd8e1ebb84f04e9069f7889ecdbc093e(10.4 s),80f8c102f8af9eac614143297d6248d6(10.6 s). ash1 served 3.1 MB in total over the whole run and counted 3serve_stream_client_declined.So both ends waited on each other again: the node waited for a proof, and the client had nothing verified to prove. That matches the shape in the comment above. It did not recur in runs 2–5, including run 2 on the same VPN path, which fits a per-connection transport stall rather than a host fault.
🤖 Generated with Claude Code
altanoruc commentedon Sep 30, 2026
Every stall in 10 more runs was proof 1, in a run's first minute (2026-09-30,
ef4bb891, VPN off)10
decdn bundle pullruns, 18:52–21:13 UTC, one client, CLI atef4bb891built fresh, VPN off throughout. Models drawn at random frommodels.json(Mistral, gpt-oss-20b, Qwen2.5-7B, Whisper large-v3, SDXL). The stall hit 3 of 10 runs: 1, 3 and 9. It did not recur in the second SDXL run (run 10).Node side. All 11 stalled streams failed the same way, at the first proof:
d57af66b009e395d08299a490c4d8cea,f44eaadab268aa601934908d35453112,22cdbe797145b4465249c09ceb0acef4f40ff1fe1c5ba7629f9808ae013588c8,af323fcb64a2b80deb424e8005c18832,26d3ddcd474a2785b5f7b459f829ebe2,47bf32eb33e54299878c75ce2c8f04a6,67169cbe3f194da1a04234e7264875d3,bcd9717399e3251476c80f6f5fdf6b42a4e1ec414efd07fa90ff42f217dced59,922f3d90d521e8b8c7fdc04c46726d6cClient side. The fault is logged now:
What this narrows:
no verified progress for 10safter hundreds of MB (hel1, bcl).landedwas 1–10 MB on 9 of the 10 client-side lane faults (up to 60 MB in run 9; 0 on one), so "the client had nothing verified to prove" does not hold for most of them.A next step that would settle it: run one pull with
-vvand capture the client's view of the first proof on the stalled lane.Cost. In run 1 the remainders waited for a busy lane (
waiting=3/10/20). The run still took 619 s, inside the 497–659 s baseline.🤖 Generated with Claude Code
2 remaining items
fix(cli): order a command's blocking writes and settle from the lowes…
fix(node): hold one proof-wait ceiling per owed chunk
fix(node): wait out a proof while the stream's bytes still drain (#2272)
fix(client,cli): keep the bundle task polled while records and fsyncs…
fix(cli): order a command's blocking writes and settle from the lowes…
fix(client,cli): make queued state writes panic-safe and durable befo…
fix(client,cli): retry lane growth until a faulted remainder finds a …
docs(adr): match ADR 039 to the broadened lane growth rule
fix(client,cli): bound extra-stream retries and bar pull-through refu…
fix(client,cli): retry lane growth until a faulted remainder finds a …
fix(client,cli): keep the bundle task polled while records and fsyncs…
fix(node): report the sample that decided a proof-wait fault
fix(node): bound the proof wait on time and classify its faults (#2287)
thiras commentedon Oct 2, 2026
All four items are fixed.
Logging lane faults: fix(client,cli): log each lane fault where it happens and grow a busy lane for its remainder #2231.
Proof-stall debug line: fix(client,cli): log each lane fault where it happens and grow a busy lane for its remainder #2231. fix(client,cli): keep the bundle task polled while records and fsyncs run #2274 adds
phase=\"first_frame\"for a fresh leg's wait for its first frame.Handing a faulted remainder to another lane: fix(client,cli): retry lane growth until a faulted remainder finds a stream #2273. Growth retries until the remainder finds a stream, and a lane gives its permit back when its own worker ends. A busy lane can grow, by pull-through, for a range no running lane covers. A lane that refuses pull-through is barred, and refused extra streams back off. ADR 039 is updated to match.
Root cause of the proof gap: the node started its 10 s proof clock once up to about 9.5 MiB sat in its QUIC send buffer (noq's default send window is 10 MB per connection), not once the client had the bytes. fix(node): wait out a proof while the stream's bytes still drain #2272 and fix(node): bound the proof wait on time and classify its faults #2287 change that.
fix(client,cli): keep the bundle task polled while records and fsyncs run #2274 removes the client-side freeze that made all lanes miss their proofs together.
If a live pull shows proof-1 faults again, the fault text now names the path and the measured gap. Reopen with that.