Skip to content

[bug] A late transcode node stop can end a newer job with the same transport id #4359

Closed

Description

@Quick104

What happened

A transcode node's stop ends whatever job runs under the transport id it names. It does not check which start of that job it was meant for. Two callers send that stop late, after the session may already have a newer job under the same id on the same node:

  • the rollback of a move's refused or unconfirmed start (rollBackMovedStartV3 in internal/api/handlers/playback_transcode_rehome.go), which runs in the background;
  • the release that retires the dead node after a Jellyfin-surface move (retireCompatTranscodeOnDeadNode in internal/jellycompat/transcode_failover.go), also in the background.

When the late stop lands after a newer start on that node, it stops the newer job. The viewer stalls until the next segment request rebuilds the job from the stored recipe. The session recovers by itself and nothing is lost.

This was found by reading the code during review. It has not been reproduced on a deployment, and I have no count of how often it happens. It needs two moves of one transport to overlap, so it should be rare.

Steps to reproduce

Not reproduced live. The trigger, from the code:

  1. A transcode runs on node A and node A stops answering.
  2. API server 1 moves the transport to node B. Node B accepts the start but the move does not confirm it, so API server 1 sends node B a release for the transport in the background.
  3. Before that release arrives, API server 2 moves the same transport to node B and its start completes.
  4. The release from step 2 arrives and node B stops the job that step 3 started.

The Jellyfin-surface variant is the same with the retire release: it is sent to the node the transport left, and a later move can pick that node again before the release arrives.

Expected behavior

A stop sent for one start of a transport does not end a later start of the same transport on that node.

Silo version / commit

main at 5007dd4132. #4337 changes the node's stop handler and the move code around these callers, and it widens the background rollback to sessions whose recipe is stored, so a fix should follow that pull request.

Deployment

Several API servers with remote transcode nodes.

Area

Playback

Clients affected

  • Other/not client-specific

Relevant logs

no logs available

Technical notes

Defect: silo-server internal/transcodenode/server.go handleStop

The node keys its jobs by transport id, and a moved session keeps its id on whichever node runs it, so the id alone cannot tell two starts apart. One way to fix it: the start returns a generation (or the core sends a start nonce), the release carries it, and the node ignores a release for another generation. A stop that ends the session for good must still end any generation.

The comment on retireCompatTranscodeOnDeadNode already describes a release that landed after a move ending the rebuilt job.

AI harness

Claude Code in T3 Code

AI tool(s)

Claude Code subagent for the code reading; Kody review comments on #4337 raised it

AI model(s)

claude-fable-5-2, claude-opus-5-5

AI involvement

Fully AI-generated at the maintainer's direction

Independent or adversarial review

The finding came from an automated review of #4337 and was checked against main by a separate agent that read both callers and the node's stop handler. Nobody has run it.

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 #4337

Activity

  1. added
    bug
    on Nov 15, 2026
  2. added
    impact: playback
    priority: P2
    on Nov 15, 2026
  3. Quick104 commented on Nov 15, 2026

    @Quick104
    ContributorAuthor

    🤖 AI agent claim. Claude Code (claude-opus-5-5) is working on a fix for this issue on behalf of @Quick104, who is assigned.

    A pull request will link here when the fix is ready. If the work stops without a fix, the assignment and this comment are removed.

    Planning to work on this, or have context to add? Reply here and mention @Quick104.

  4. self-assigned this
    on Nov 15, 2026
  5. added a commit that references this issue on Nov 19, 2026
    b54c910
  6. added a commit that references this issue on Nov 19, 2026
    3785357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugimpact: playbackpriority: P2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions