Skip to content

[bug] A transcode node closes a rebuild's software retry that is still starting #4263

Done

Description

@Quick104

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:

  1. Run a transcode node with Hardware acceleration set to VideoToolbox, or to QSV/VAAPI without a render device.
  2. A transcode session loses its FFmpeg process, and the next request rebuilds it.
  3. The rebuild's hardware FFmpeg exits at startup, so the node starts the software retry.
  4. 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 ManifestStartupTimeout passes.
  5. 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 returns retryErr without checking session.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

  1. added
    bug
    on Nov 15, 2026
  2. added
    impact: playback
    priority: P2
    on Nov 15, 2026
  3. added a commit that references this issue on Nov 19, 2026
    f4a250c
  4. added a commit that references this issue on Nov 23, 2026
    97ace34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugimpact: playbackpriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions