Skip to content

fix(node): fra1 paid for a 48 KiB serve-miss leg, its store frontier did not advance, and the whole paid client stream was abandoned #2328

Closed

Description

@yigitdot

What happened

On 2026-10-06 at 08:48:03Z, fra1 (07a53ebf7b) served the client (5429be5188, pool 0x2aaa…56ef) a range of blob 31d02d584d57ea0cc6e3eaca81fcb9bc6dd201257a448cf109edd9b6729c0d1f (size 1180725482): offset 1081753600, len 50003968 (end 1131757568). fra1 did not hold the blob, so it pulled the range through its node-origin leg from node 89d125b0c5 (host bcl, provider 0xAFb6…5832, pool 0x355d…eebd).

The final leg covered the last 48 KiB of the range, [1131708416, +49152). It finished cleanly, but neither the paid frontier nor the delivered frontier moved past 1131708416:

WARN  node-origin: a clean leg advanced neither the paid nor the delivered frontier; ending the gap instead of re-paying the range
      provider=89d125b0c5… offset=1131708416 len=49152 paid_frontier=1131708416 delivered_frontier=1131708416 paid_wire=50176
WARN  node-origin ranged pull ended before the range was filled  candidates=1 cause="every covering candidate faulted"
ERROR coherent range encode faulted; abandoning the delivery
      error="upstream pull failed before supplying outboard node TreeNode(1085455): node-origin ranged pull: every covering candidate faulted"
ERROR client stream ended with a node-side fault  error="after payment: coherent range encode failed: …"

The client saw:

08:48:03.293 INFO decdn_client::scheduler: an extra stream of a lane faulted; its remainder goes back to the queue
  provider=0xa43dbB7C… hash=31d02d58… offset=1081753600 len=50003968 landed=29638656 error=frame read failed: frame I/O error: early eof

The leg was paid for and most likely delivered

paid_wire is the channel ledger committed wire bytes since the leg opened (LegNoProgress::paid_wire, crates/client/src/driver.rs). The client pays only for wire bytes it has received (pay_one). The bao wire size of the leg range is 3 chunk groups (49152 bytes) plus 16 parent nodes (16 × 64 = 1024 bytes) = 50176, exactly the logged paid_wire. bcl logged no error for the range.

So bcl most likely delivered the 48 KiB, and fra1 paid for it. Then the fra1 store did not advance its delivered frontier: it did not keep what it paid for. The LegNoProgress docs name this pattern as a store-side fault. fra1 then classified the result as "every covering candidate faulted", which blames the upstream for a local fault. (The ledger is shared across concurrent pulls on the fra1→bcl channel, so another pull could in principle sum to the same value. The exact match makes this unlikely.)

Impact

  • fra1 paid bcl for 48 KiB it then failed to store.
  • The client requested 50.0 MB and received 29.6 MB (landed=29638656) before the stream died.
  • fra1 already held bytes up to 1131708416. The client frontier was 1111392256. About 20.3 MB (20316160 bytes) that fra1 had in hand was never sent. The failed 48 KiB tail killed that remainder too.
  • The client stream was paid: the after payment tag (PaidProgress) means at least one voucher credited bytes on it. The client pays only for received bytes, so it paid for at most the 29.6 MB it received. The node does not log the amount.
  • The client recovered by re-queuing the remainder. The file completed (20 fetched, 0 failed).

Expected

  • Find why the fra1 store did not advance its delivered frontier for a leg that was paid and, by wire count, delivered. Related area: fix(node,cache,bao-range): keep a local store fault off the upstream's score #2323 (local store fault kept off the upstream score).
  • A failed leg at the tail of a range does not discard the part of the range the node already holds. Stream the verified prefix and end the stream at the gap, so the client re-queues only the missing tail.
  • Log the paid amount when a client stream ends with a node-side fault after payment.

Evidence

Loki, {hostname="fra1", service_name="decdn-node"} |= "31d02d58", 2026-10-06 08:47:20Z–08:48:10Z. bcl ({hostname="decdn"}) shows no error for offset 1131708416 in the same window.

Activity

  1. added
    kind:bug
    area:node
    area:payments
    on Oct 6, 2026
  2. changed the title [-]fix(node): a 48 KiB upstream gap at the end of a serve-miss range abandons the whole paid client stream[/-] [+]fix(node): fra1 paid for a 48 KiB serve-miss leg, its store frontier did not advance, and the whole paid client stream was abandoned[/+] on Oct 6, 2026
  3. self-assigned this
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodearea:paymentskind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions