Skip to content

fix(live): halt blocking-reload when the segment producer exits for host retune (#167) - #181

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/167-producer-stall-blocking-reload
Jul 21, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/167-producer-stall-blocking-reload

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Follow-up to the 5.16.0 observed-cadence fix, from G00380316's retest on #167: the original bursty-origin case holds, but a LOCAL segment-producer stall (SSAI cutter wedge) with blocking-reload latched ON reproduces -15410 through a different mechanism.

The cadence policy observes ingest arrivals, which keep flowing while the cutter is wedged, so it cannot see this failure mode. The held ?_HLS_msn= reload waited on a segment that will never be cut, timed out after 18s, and was answered with the unchanged playlist (no requested MSN): spec-invalid, AVPlayer errors -15410. The stall watchdog's item reload against the same zombie server then immediately re-armed a second one.

Three coordinated changes:

  • HLSLocalServer answers an unsatisfiable held blocking reload with a retriable 503 (RFC 8216bis) instead of a spec-invalid unchanged 200. Satisfied holds and the field-proven gate-off immediate serve are unchanged.
  • VideoSegmentProvider gains a terminal production-halted latch that beats the host override and the cadence policy, and releases parked waiters immediately (they 503 now instead of sleeping out the hold).
  • handlePumpFinished latches it on every live exit that delegates to host retune (segmentStall, sourceReplay, non-URL-reopenable pump deaths). Reopenable URL exits keep cutting into the same provider and do not latch.

Covered by LiveProductionHaltTests (resolver precedence, exit-reason classification, waiter release, and socket-level 503/200 response shapes). Full suite green, strict-concurrency build clean, tvOS Simulator build clean.

Closes nothing on its own; #167 stays open for the reporter retest.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw

…ost retune (#167)

A live session whose LOCAL segment producer stalls (SSAI cutter wedge)
while blocking-reload is latched ON kept advertising CAN-BLOCK-RELOAD
and kept holding ?_HLS_msn= reloads for a segment that will never be
cut: the cadence policy observes ingest arrivals, which keep flowing
while the cutter is wedged, so it cannot see this failure mode. The
held reload then timed out and served the unchanged playlist without
the requested MSN, which AVPlayer flags as -15410 (invalid blocking
reload behavior), and the stall watchdog's item reload against the
same zombie server immediately re-armed a second one.

Three coordinated changes:

- HLSLocalServer answers an unsatisfiable held blocking reload with a
  retriable 503 (RFC 8216bis) instead of a spec-invalid unchanged 200.
- VideoSegmentProvider gains a terminal production-halted latch that
  beats the host override and the cadence policy, and releases parked
  waiters immediately so they 503 now instead of sleeping out the hold.
- handlePumpFinished latches it on every live exit that delegates to
  host retune (segmentStall, sourceReplay, non-URL-reopenable pump
  deaths); reopenable URL exits keep cutting into the same provider
  and do not latch.

Reported by G00380316 (#167 retest). Covered by LiveProductionHaltTests.

Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01NAPCg4tCDdSqkK6tPkNptw
@superuser404notfound
superuser404notfound merged commit 6a94ffd into main Jul 21, 2026
3 checks passed
@superuser404notfound
superuser404notfound deleted the fix/167-producer-stall-blocking-reload branch July 21, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant