Repository navigation
Description
Problem
max_blob_size_bytes is checked against a byte position, not against how many bytes of a blob the node stores. A node with max_blob_size_mb = 16384 cannot serve any byte past 16 GiB of a larger blob, even when it holds only a few GB of that blob.
On testnet (2026-10-14, about 16:10 UTC) this fired DecdnServeNodeFault on sin1 (26 faults/h), ash1 and lon1 (2/h each). The trigger was reads crossing 16 GiB of LibriSpeech train-other-500.tar.gz (30,593,501,606 bytes, blob c7d021ac059a7006c24bcc36f5b2df28ee936fffaed44fe832cbaf546c182815). Sample error:
client stream ended with a node-side fault: coherent range encode failed: upstream pull failed
before supplying outboard node TreeNode(16777135): reached byte 166912, crossing the 149184-byte
size ceiling (BlobTooLarge)
The faulting node held about 7 GB of the blob (bitfield ranges 4305216..5932448, 7469104..11157760, 14938224..16777168, in 1 KiB chunks). The flow:
- The node accepts the client range as a partial holder.
- It serves the bytes below 16 GiB.
- Its pull-through for the uncached bytes past 16 GiB aborts mid-stream with
BlobTooLarge. - The serve path counts that as a node-side encode fault, sometimes after the client has paid.
Where
crates/client/src/lib.rsopen_progressive_pull:max_received_wire = aligned_wire_len(byte_offset, 0, max_blob_size_bytes), plus the resume-offset guardbyte_offset >= max_blob_size_bytes.- The receive-loop checks on
max_received_wire(next_chunk,terminal_after_write_failure). crates/client/src/driver.rsfill_gap(content frontier vs cap).crates/client/src/scheduler.rsacquire (AcquireEnv::max_blob_bytes).- The node window path (
crates/node/src/handlers/client/window.rs,node_originmax_blob_size_bytes). - The partial-holder size handshake in
source_set.rs, which assumes the offset meaning.
Expected
The cap limits how many bytes of one blob a node stores. A node serves any range of a large blob, offsets past the cap included, while its stored bytes for that blob stay within the cap. Declining a large blob up front is the wrong fix: requests are ranges, and a node holding part of a blob is useful capacity.
Keep #1895: never refuse on the peer's unverified total_bytes claim. Meter only bytes that arrive and are stored. A pull that would push stored bytes over the cap ends as a clean refusal the client fails over on. It never counts toward decdn_serve_stream_node_fault_total.
Mitigation in place
The fleet's max_blob_size_mb and disk_headroom_mb are raised to 32 GiB (decdn/internal-devops#41). That covers every single file in the demo catalogue and leaves the offset bug in place.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity