Repository navigation
Description
What happened
On a transcode node, a rebuilt transcode whose hardware start dies falls back to a software encode. If that software encode is still running but hasn't written its first manifest within 30 seconds, the node closes it and deletes the session's output directory. The rebuild then fails, even though the software process might have produced output a few seconds later.
This affects the rebuild path for a backend that has a software retry: VideoToolbox, or QSV/VAAPI on a node with no render device. spawnReconstruct keeps a slow hardware attempt (it logs "reconstructed transcode slow to produce a manifest" and returns the session), and the shared rebuild path in internal/playback/transcode_startup.go keeps any slow attempt the same way. The software retry is the one attempt that doesn't: on a readiness timeout it calls session.Close() whether or not FFmpeg is still running.
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.
- A transcode session loses its FFmpeg process, and the next request rebuilds it.
- The rebuild's hardware FFmpeg exits at startup, so the node starts the software retry.
- The software encode is slow to write its first manifest (for example a 4K source on a weak CPU) and is still running when the 30-second
ManifestStartupTimeoutpasses. - The node closes the running retry, removes the output directory, and returns the error. The next request starts the rebuild again from the hardware attempt.
Expected behavior
A software retry that is still running at the readiness deadline is kept and registered, as the first attempt and the shared rebuild path already do, so the segment path can serve it once output appears. A retry that has exited without output still fails.
Silo version / commit
main at 3210a47
Deployment
Other
Area
Playback and transcoding
Clients affected
- Web UI
- Android
- iOS/tvOS/macOS
- Jellyfin-compat client (Infuse, Findroid, ...)
- Other/not client-specific
Relevant logs
No logs available.
Technical notes
internal/transcodenode/server.go,spawnReconstruct: the software retry's readiness failure branch calls_ = session.Close()and returnsretryErrwithout checkingsession.IsRunning(). The first attempt's branch a few lines above keeps a running process.internal/playback/transcode_startup.go,runTranscodeStartup:if wasRunning && reconstruct { ...; return session, nil }keeps a slow rebuild attempt, including a retry.- The fix changes the same lines as fix(transcodenode): wait for a rebuild's own manifest before taking it as ready #4251, so it should follow that pull request.
AI harness
Claude Code (T3 Code)
AI tool(s)
Claude Code; Codex (cross-provider review); GitHub CLI
AI model(s)
claude-opus-5-5, gpt-6.1-sol
AI involvement
Fully AI-generated (not yet human verified)
Independent or adversarial review
Found by a Codex (gpt-6.1-sol) review during the review of #4251 and checked against the source by a second agent. No test was run for it, and a person hasn't checked it yet.
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 #4251
Activity
fix(transcodenode): keep a rebuild's software retry that is still sta…
refactor(transcodenode): rebuild with the shared startup retry policy
fix(transcodenode): keep a rebuild's software retry that is still sta…