Description
What happened
On a transcode node, a rebuilt transcode whose FFmpeg dies at startup can be registered as ready when its output directory still holds the manifest an earlier process wrote. The session then serves nothing, and the software retry that should have run is skipped.
This affects the rebuild path for a backend that has a software retry: VideoToolbox, or QSV/VAAPI on a node with no render device. That path waits with WaitForManifest, which accepts any manifest in the directory. A rebuild reuses the lost session's directory, so the old stream.m3u8 is still there. Once the new process has exited, the wait reads the old manifest and reports success.
Steps to reproduce
Not reproduced on a deployment. The trigger, traced in the source:
- Run a transcode node with Hardware acceleration set to VideoToolbox, or to QSV/VAAPI without a render device.
- Have a transcode session lose its FFmpeg process while its output directory keeps
stream.m3u8. - The next request rebuilds the session in that directory, and the new FFmpeg exits before writing a manifest (for example the hardware encoder can't open).
- The rebuild's wait returns the old manifest, the software retry is skipped, and the exited session is registered.
Expected behavior
The rebuild should judge readiness only on a manifest its own FFmpeg process wrote, as the Auto path does, so an early exit reaches the software retry.
Silo version / commit
main at 2e05489
Deployment
Other
Area
Playback and transcoding
Clients affected
- Web UI
- Android
- iOS/tvOS/macOS
- Jellyfin-compat client (Infuse, Findroid, ...)
- Other/not client-specific
Client app and device
No response
Media and playback details
An encoded (not copied) video target. A copy target also validates the manifest it reads.
Diagnostics report reference
No response
Relevant logs
No logs available.
Technical notes
Line numbers are for 2e05489.
internal/transcodenode/server.go:2324and:2341wait withsession.WaitForManifest(playback.ManifestStartupTimeout).internal/playback/transcode.go:2341-2342:WaitForManifestcallswaitForManifest(context.Background(), timeout, false). WithcurrentGenerationfalse, the inherited manifest is not excluded (:2244sets it only for the generation-aware wait).internal/playback/transcode.go:2275:if s.running && !startupFilesReady(...). After the process exits,s.runningis false, so the startup-files check is skipped and the old manifest data is returned with no error.- The generation-aware wait (
WaitForGenerationManifest) returns not-found for the inherited file, which leads toErrTranscodeFailedand the retry.
A fix here touches lines next to the ones #4097 changes in the same function, so it should follow that pull request.
AI harness
Claude Code (T3 Code)
AI tool(s)
Claude Code review subagents, git
AI model(s)
claude-fable-5-2
AI involvement
Fully AI-generated (not yet human verified)
Independent or adversarial review
Found during the code review of #4097 and confirmed by a separate review agent that traced both waits on the base. No test was run for it, and it has not yet been checked by a person.
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Source: found in review of #4097
Activity
fix(transcodenode): wait for a rebuild's own manifest before taking i…
fix(transcodenode): wait for a rebuild's own manifest before taking i…