Skip to content

[Bug]: In-app update keeps rolling back when the service launcher predates #19311 #41668

Duplicate

Description

@RhysSullivan

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. Install the background service with an older t3 (here 0.0.46-nightly.20261008, before fix(server): service updates no longer fail on full disks or large databases #19311 and fix(server): a remote update points the service unit at the runtime it committed #19652). Keep updating in-app since then (the unit stays on that launcher; this host reached 0.1.8 that way).
  2. Have a large state database (here statev2.sqlite is 32 GB).
  3. Update in-app to a version whose migrations take more than 2 minutes (0.1.8-nightly.20261109 → 0.1.12-nightly.20261123: 30 migrations, about 4 minutes).

Expected behavior

The update completes, or the preflight refuses it with a message that says the installed launcher is too old and how to replace it.

Actual behavior

The preflight accepts the launcher because it still speaks protocol 3. The trial server starts migrating, the old launcher's 2-minute prepared deadline expires partway through, and it rolls back. Every retry does the same. The unit is never repointed, because #19652's repoint runs only in newer launchers, so the host can't leave the old launcher through in-app updates. The only trace is in service-state.json:

"update": { "fromVersion": "0.1.8-nightly.20261109.4433", "targetVersion": "0.1.12-nightly.20261123.5151", "status": "rolled-back", "reason": "prepared-timeout" }

Impact

Major degradation or frequent failure

Version or commit

Launcher 0.0.46-nightly.20261008.2801, server 0.1.8-nightly.20261109.4433, target 0.1.12-nightly.20261123.5151

Environment

Linux (Ubuntu), systemd user unit t3code.service

Logs or stack traces

[12:23:21.905] INFO: Server update prepared; handing off to the service launcher.  targetVersion: '0.1.12-nightly.20261123.5151'
[12:23:27.670] INFO: Upgrading database  migration: 81_ProjectionMessageSearchText  progress: 1 of 30
...
[12:25:21.125] INFO: Upgrading database  migration: 95_TurnItemInlineWorkOutput  progress: 15 of 30
# trial killed, back on 0.1.8

Workaround

Run the update from the new CLI (t3 update -y), which does a full service restart and rewrites the unit. Here that only worked after first pointing the unit's ExecStart at the 0.1.8 runtime's launcher. Pointing it straight at the 0.1.12 launcher crash-loops: that launcher won't start the 0.1.8 server ("The service launcher supplied invalid startup context.").

Possible fix: have the preflight reject launchers older than the 30-minute deadline with a message naming t3 update / t3 service install, or repoint the unit before the trial restart.

Activity

  1. juliusmarminge commented on Nov 23, 2026

    @juliusmarminge
    Member

    This is the same problem as #38526, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions