Skip to content

[Bug]: t3 start refuses to start after a container redeploy when the stale server record's PID belongs to another process #28229

Closed

Description

@TylerJNewman

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Run t3 start --base-dir <dir> in a container whose <dir> is on a persistent volume.
  2. Redeploy, so the old container is killed without removing userdata/server-runtime.json.
  3. The new container runs the same t3 start.

Expected behavior

A record left by a server in a previous container is ignored and the server starts.

Actual behavior

A T3 Code server is already running for /var/lib/tailscale/t3 (pid 1044, http://127.0.0.1:3773). Connect to that server, stop it before starting another, or use a different --base-dir.

PID 1044 belongs to an unrelated process in the new container's PID namespace, so isProcessAlive returns true and the server exits. The check in apps/server/src/cli/config.ts already skips a record carrying the new server's own PID ("A killed container can leave a record with the new server's own PID"), but not one whose PID another process has reused. Container PIDs are small and assigned in the same order on every boot, so this recurs.

Impact

Major degradation or frequent failure

Version or commit

0.1.5. The check is unchanged on main at 15fe283.

Environment

Railway, Debian bookworm, Node 24.22.2, T3 0.1.5 installed with install.sh, base dir on a Railway volume.

Workaround

Delete userdata/server-runtime.json before t3 start at container boot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions