Skip to content

nos-runner: restart a slot whose VM waits too long without a job #297

Open

Description

@smartwatermelon-agent

What happened

On 2026-11-20 at 14:51 PST the watchdog set NOS_RUNNER to ubuntu-latest. The cause was slot 1 on MIMOLETTE.

  • VM mimolette-1-1795032447 (runner 547) started on 2026-11-18 at 12:07 PST.
  • Its log says Listening for Jobs and nothing after that. It got no job in about 51 hours.
  • Slot 2 ran dozens of jobs over the same time. Most of them were Dependabot runs in kebab-tax.
  • The supervisor logged nothing for slot 1, so it treated the slot as healthy.
  • Andrew stopped the VM by hand at 15:22 PST. The supervisor deleted runner 547 and started a new VM in that slot.

We still don't know why runner 547 stopped getting jobs. The VM log shows no error. One guess is that GitHub dropped the runner's session and the runner never noticed, but nothing confirms that.

The gap

The supervisor has no limit on how long a VM can wait without a job. The watchdog is the only safety net, and it reacts only after jobs have been queued for more than 20 minutes. By then CI has already moved to ubuntu-latest.

Proposed fix

Have the supervisor restart a slot when its VM has waited longer than a set time without taking a job, for example NOS_IDLE_MAX_S. A restart deletes the runner and starts a fresh VM with a new JIT config.

Things to decide:

  • How the supervisor tells "idle" from "running a job". It could ask the GitHub API whether the runner is busy, or read the VM log.
  • The limit. It should be long enough that a quiet night does not restart slots for nothing, and short enough to catch a hang well within a day.
  • Log each restart, and send an ntfy alert after repeated restarts.

Tests go in scripts/nos-runner/tests/, with container and gh stubbed.

Activity

  1. smartwatermelon-agent commented on Nov 23, 2026

    @smartwatermelon-agent
    ContributorAuthor

    Live on MIMOLETTE since the updater deployed #303 at 15:40 PST on 2026-11-23. Both slots had waited about 7 hours, and each was restarted, one per pass:

    15:40:03 supervisor: slot 1: runner 731 idle for 25236 s (limit 3600 s); restarting
    15:40:08 supervisor: slot 1: stopped mimolette-1-1795451966
    15:40:41 supervisor: slot 2: runner 732 idle for 25273 s (limit 3600 s); restarting
    15:40:46 supervisor: slot 2: stopped mimolette-2-1795451967
    15:40:48 supervisor: slot 1: started mimolette-1-1795477246 (runner 733)
    15:41:21 supervisor: slot 2: started mimolette-2-1795477279 (runner 734)
    

    container ls (through the agentro gate) shows both new VMs running.

    Not checked yet: whether GitHub lists runners 733 and 734 online. The agent App gets 403 on the org runners endpoint, and no NOS job has run since 2026-11-21. This issue stays open until a job runs on a restarted runner.

  2. smartwatermelon-agent commented on Nov 24, 2026

    @smartwatermelon-agent
    ContributorAuthor

    The first live restart (15:40) briefly had both slots down: slot 2 was restarted while slot 1's replacement was not up yet. #306 fixed that, so a slot now restarts only while every other slot has a VM and a registered runner. The updater deployed it at 16:40, and the next idle hour shows it working:

    16:41:09 slot 1: runner 733 idle for 3622 s (limit 3600 s); restarting
    16:41:14 slot 1: stopped mimolette-1-1795477246
    16:41:46 slot 2: runner 734 idle for 3627 s; restart deferred, another slot is down
    16:41:48 slot 1: started mimolette-1-1795480906 (runner 735)
    16:42:19 slot 2: runner 734 idle for 3659 s (limit 3600 s); restarting
    16:42:25 slot 2: stopped mimolette-2-1795477279
    16:42:58 slot 2: started mimolette-2-1795480976 (runner 736)
    

    One slot had a VM at all times. Still open: whether GitHub reports the new runners online (the App gets 403 on the runners endpoint). The first NOS job on a restarted runner will show it.

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