Repository navigation
fix(live): halt blocking-reload when the segment producer exits for host retune (#167) - #181
Merged
superuser404notfound merged 1 commit intoJul 21, 2026
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
HLSLocalServeranswers 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.VideoSegmentProvidergains 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).handlePumpFinishedlatches 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