Skip to content

0.14.2: AutoscalingRunnerSet permanently deadlocks in Outdated phase when a config change coincides with an Actions service outage — cleanup completes, phase is never reset, no requeue #4595

Open

Description

@chris-pylon

Checks

  • I've already read the ARC troubleshooting guide and I'm sure my issue is not covered in it.
  • I am using charts that are officially provided

Controller Version

0.14.2 (ghcr.io/actions/gha-runner-scale-set-controller:0.14.2, chart gha-rs-0.14.2)

Deployment Method

Helm (EKS, Kubernetes v1.31.14-eks-8f14419, updateStrategy: immediate)

To Reproduce

The deterministic core of the bug can be shown without an outage (steps 1–3); the outage is what makes it occur in practice (see Timeline).

  1. Deploy gha-runner-scale-set 0.14.2. Let the scale set run normally.
  2. Drive the AutoscalingRunnerSet into status.phase: Outdated with all children cleaned up and the actions.github.com/runner-scale-set-id annotation removed — i.e. the state the controller itself produces when it executes cleanUpResources to completion (listener deleted, EphemeralRunnerSets deleted, runner scale set deleted from the Actions service).
  3. Observe: the controller never recreates anything and never logs again for this resource. Restarting the controller does not help — each restart runs one reconcile that ends at "deleting runner scale set" (info level, no error) and goes silent again.

How we hit it for real (timeline, all times UTC, 2026-08-06/07):

  • 15:22 GitHub Actions incident begins (githubstatus incident qcvjkzcs7j74, major outage of Actions; self-hosted runners not picking up jobs).
  • 20:16 A routine helm upgrade of our two scale-set releases lands (values change → listener/runner-set recreation flow).
  • 20:16–22:27 The controller churns through the outdated delete/recreate cycle against the failing Actions service. The destructive half succeeds: listener deleted, EphemeralRunnerSets deleted, DeleteRunnerScaleSet succeeds against the Actions service, runner-scale-set-id annotation removed. Log excerpt from this window shows the cycle repeating (see Controller Logs, excerpt A). Last log line ever from this controller generation: 22:27:32Z.
  • 00:04, 00:08 We restart the controller twice (after the Actions incident's self-hosted-runner fix was rolled out). Each fresh controller reconciles each AutoscalingRunnerSet exactly once, emits the identical 10-line sequence ending at "deleting runner scale set", and goes permanently silent (excerpt B). No error is ever logged.
  • 00:08+3min SIGQUIT goroutine dump of the running controller (excerpt C): 156 goroutines, all 10 reconcile workers idle in priorityqueue.GetWithPriority, zero goroutines in net/http round-trips or the actions client. The controller is not hung on the Actions API — it is parked with nothing queued.
  • 00:13 Manual workaround applied (see below). Recovery is immediate and complete: scale sets re-registered under new IDs, listeners recreated, 74 runners scaled up, the queued-job backlog (~70 jobs) drains. Jobs that had been queued for hours were picked up normally — 52 workflow runs completed within 30 minutes of the patch.

Describe the bug

Once status.phase reaches Outdated and cleanup completes, the reconciler is a terminal no-op. In controllers/actions.github.com/autoscalingrunnerset_controller.go at gha-runner-scale-set-0.14.2:

  • L184: outdated := autoscalingRunnerSet.Status.Phase == v1alpha1.AutoscalingRunnerSetPhaseOutdated — once the phase is set, every subsequent reconcile enters the outdated branch before createRunnerScaleSet/listener logic can ever run.
  • L246–262: the outdated branch calls cleanUpResources; when it reports done, the reconcile returns ctrl.Result{}, nil — no requeue, and status.phase is never reset out of Outdated.
  • L658–675 (deleteRunnerScaleSet): when the runner-scale-set-id annotation is already gone (the controller removed it after a successful DeleteRunnerScaleSet), the function early-returns nil, so cleanup is instantly "done" on every subsequent pass.
  • With the listener, EphemeralRunnerSets, and runner scale set all deleted, no child resource exists to generate a watch event, so no reconcile is ever triggered again. phase: Outdated + cleanup-complete is a stable terminal state, which it should never be.

The result is total, silent, permanent loss of CI for the scale set, surviving controller restarts (the poison is in the persisted CR status, not in process state). There is no error, no crash, no failing health check; the final log line is info-level.

This appears to still be reachable on current master (a035c5a): the reworked outdated branch parks with return ctrl.Result{}, nil and no phase reset when the EphemeralRunnerSet is gone — "Ephemeral runner set is not found. Ignoring the state until the autoscaling runner set is updated" (L196–197) — i.e. recovery still depends on an external actor updating the CR. We have only reproduced end-to-end on 0.14.2.

Not a duplicate of the known listener deadlocks, as far as we can tell:

Describe the expected behavior

After cleanUpResources completes in the outdated branch, the controller should proceed to recreate the runner scale set (reset status.phase and/or requeue) rather than returning ctrl.Result{}, nil. Defensively: phase == Outdated with no listener, no EphemeralRunnerSet, and no runner-scale-set-id annotation should never be treated as a stable state — it is precisely "nothing exists and nothing will ever be created".

We're aware the change-hash check (L167–182) resets the phase to Pending on the next spec change, so a future helm upgrade would eventually recover it. We don't think that counts as recovery: it makes the duration of a total CI outage equal to "whenever someone happens to ship the next config change", with no error logged in the meantime.

Workaround (verified)

kubectl patch autoscalingrunnerset <name> -n <ns> --subresource=status --type=merge -p '{"status":{"phase":""}}'

The status patch triggers a reconcile; with the phase cleared and no scale-set-id annotation, it takes the "Runner scale set id annotation does not exist. Creating a new runner scale set." path (L190) and full recovery follows within a minute.

Additional Context

Two scale sets were affected identically and independently (my-scale-set, min 5 / max 100, and my-scale-set-cacher, min 0 / max 1) — same helm upgrade window, same terminal state (phase: Outdated, finalizer present, no deletionTimestamp, no runner-scale-set-id annotation), same silence, same one-patch recovery. Whatever the precise interleaving that enters Outdated, the deadlock itself is fully characterized by the terminal state above and is trivially reproducible from it.

Controller Logs

Excerpt A — outage window, controller generation 1, the delete cycle repeating (22:27:32Z, then silence):

{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"AutoscalingListener does not exist.","autoscalingrunnerset":{"name":"my-scale-set-cacher","namespace":"arc-runners"}}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"Ephemeral runner set is outdated", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"Deleting the listener", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"Cleaning up the listener", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"Listener is deleted", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"deleting ephemeral runner sets", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"All ephemeral runner sets are deleted", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"deleting runner scale set", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"Deleting the runner scale set from Actions service", ...}
{"severity":"info","ts":"2026-08-06T22:27:32Z","logger":"AutoscalingRunnerSet","message":"Deleted the runner scale set from Actions service", ...}
[cycle repeats several times within the same second, then no further log lines from this controller, ever]

Excerpt B — after each controller restart (00:04:36Z and identically at 00:08:04Z), one pass per scale set, then permanent silence:

{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"AutoscalingListener does not exist.","autoscalingrunnerset":{"name":"my-scale-set","namespace":"arc-runners"}}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"Ephemeral runner set is outdated", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"Deleting the listener", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"Cleaning up the listener", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"Listener is deleted", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"deleting ephemeral runner sets", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"Cleaning up ephemeral runner sets", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"All ephemeral runner sets are deleted", ...}
{"severity":"info","ts":"2026-08-07T00:08:04Z","logger":"AutoscalingRunnerSet","message":"deleting runner scale set", ...}
[note: "Deleting the runner scale set from Actions service" never appears — deleteRunnerScaleSet early-returns because the annotation was already removed at 22:27. No error. No further lines.]

Excerpt C — goroutine dump (SIGQUIT) ~3½ minutes into the silence, controller generation 3:

156 goroutines total.
All 10 reconcile workers parked:

goroutine 297 [select, 3 minutes]:
  sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue.(*priorityqueue[...]).GetWithPriority(...)
  sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem(...)

Zero goroutines in net/http.(*Transport).roundTrip.
Zero goroutines in the actions service client.

CR state while wedged (both scale sets identical):

my-scale-set         phase: Outdated  deletionTimestamp: none  finalizer: present  runner-scale-set-id annotation: ABSENT
my-scale-set-cacher  phase: Outdated  deletionTimestamp: none  finalizer: present  runner-scale-set-id annotation: ABSENT

Recovery after the status patch (00:13Z), within seconds:

"Runner scale set id annotation does not exist. Creating a new runner scale set."
... scale set re-registered (new ID), listener recreated, EphemeralRunnerSet created,
runners scaled 0 → 74, backlog of ~70 queued jobs drains normally.

Runner Pod Logs

Not applicable — no runner pods exist in the wedged state (all were deleted by the controller's own cleanup; that is the failure mode).

Activity

  1. github-actions commented on Aug 7, 2026

    @github-actions
    Contributor

    Hello! Thank you for filing an issue.

    The maintainers will triage your issue shortly.

    In the meantime, please take a look at the troubleshooting guide for bug reports.

    If this is a feature request, please review our contribution guidelines.

  2. mtzanidakis commented on Aug 7, 2026

    @mtzanidakis

    Independent reproduction on a different platform, same terminal state and same recovery.

    Environment: controller 0.14.2, chart gha-rs-0.14.2, GKE (not EKS), 9 scale sets in one arc-runners namespace.

    Terminal state observed, identical to your description:

    phase:                          Outdated
    runner-scale-set-id:            <absent>
    listener pods:                  0
    EphemeralRunnerSets:            0
    EphemeralRunners / pods:        0
    status.currentRunners:          10   <- ghost
    status.runningEphemeralRunners: 10   <- ghost
    

    The status counters claimed 10 runners while nothing existed at any level. The other 8 scale sets in the same namespace stayed healthy throughout, so this is per-resource, not controller-wide.

    On the trigger, which may help narrow the window: the config change (a values edit adding a toleration to one scale set) was merged at 13:44 UTC, ~1h40m before the incident began at 15:22 UTC. Our releases are applied manually with helmfile rather than through CI, so I cannot timestamp the actual helm upgrade — it may have landed before or during the incident. What is certain is that the resource was still dead the following morning, ~15h later, with a controller restart in between. If the apply did precede the outage, that would suggest the destructive half of the cycle need not run concurrently with the outage at all — it is enough that the recreate half never receives a triggering event afterwards. Worth checking against your 20:16 apply.

    Confirming "restarting the controller does not help". Two independent pokes, each producing exactly one reconcile and then silence:

    06:16:08Z  controller rollout restart           -> 10-line sequence ending at "deleting runner scale set"
    06:24:19Z  annotation added to force reconcile  -> byte-identical sequence
    

    No errors, no requeue, no further log lines for the resource. grep -c creat over the controller log for this scale set: 0.

    One diagnostic worth adding: helm diff on the release was empty. The Helm-managed spec was fully correct and matched the chart. That rules out "re-apply your chart" as a remedy and localises the poison entirely to the persisted status — worth stating explicitly, since re-applying is the natural first instinct and costs a fleet-wide rollout to discover it does nothing.

    Recovery via the status patch was immediate:

    kubectl -n arc-runners patch autoscalingrunnerset <name> \
      --subresource=status --type=merge \
      -p '{"status":{"phase":"Pending","currentRunners":0,"runningEphemeralRunners":0}}'

    Listener Running within ~7s, scale set re-registered under a new ID, EphemeralRunnerSet created, and a backlog of 28 queued workflow runs across 5 branches drained to 0 within minutes.

    On your master analysis — one addition. I agree the outdated branch still parks when the EphemeralRunnerSet is gone. But the integrity-hash block runs before the outdated check on master:

    if targetHash := autoscalingRunnerSet.Hash(); annotations[annotationKeyIntegrityHash] != targetHash {
        annotations[annotationKeyIntegrityHash] = targetHash
        Status.Phase = Pending
        return
    }

    annotationKeyIntegrityHash does not exist on resources managed by 0.14.2, so on upgrade that condition is true on the first reconcile and the phase is reset — i.e. the upgrade itself is the "external actor updating the CR" that unsticks it. That suggests resources already poisoned by 0.14.2 should self-heal on upgrade, which is worth confirming before anyone hand-patches a fleet.

    Impact note for triage. The dead scale set here only served a cheap changes gate job. Because that job gates every other job in every PR workflow, one dead scale set silently blocked 100% of PR CI repo-wide — no error, no crash, no failing health check, final log line at info level. The disproportion between "one scale set" and "all CI" seems worth weighing on severity.

  3. GruemL commented on Aug 7, 2026

    @GruemL

    We've encountered the same issues on our instances. @chris-pylon Thanks for your workaround! 👍

  4. jgutierrezglez commented on Aug 7, 2026

    @jgutierrezglez

    Same here. We've encountered the same issues on our EKS runners. @chris-pylon thanks for reporting this issue and the proposed workaround! 👍

  5. nasyahaya-se commented on Aug 7, 2026

    @nasyahaya-se

    Independent reproduction / same terminal state on 0.14.1 (AKS)

    We hit what looks like the same terminal state today on controller/chart 0.14.1 (not 0.14.2), so this may not be 0.14.2-specific—or at least the failure mode is reachable on 0.14.1 as well.

    Environment

    • Controller / listener image: ghcr.io/actions/gha-runner-scale-set-controller:0.14.1 (scaleset lib v0.3.0 in listener logs)
    • Charts: gha-runner-scale-set-controller + gha-runner-scale-set 0.14.1
    • Kubernetes: v1.34.9 (AKS)
    • Affected scale set: org-scoped pool with minRunners: 5, maxRunners: 40, runnerGroup: se-sb-default
    • Several other AutoscalingRunnerSets in the same github namespace stayed healthy throughout

    Terminal state (matches this issue)

    • status.phase: Outdated
    • Ghost counters: currentRunners: 39, runningEphemeralRunners: 39 while zero pods existed
    • No AutoscalingListener
    • No EphemeralRunnerSet / EphemeralRunner
    • HelmRelease still reported Ready / last upgrade succeeded (so Flux/Helm did not self-heal)
    • GitHub Actions jobs targeting that runner group stayed queued indefinitely

    Timeline (UTC, 2026-08-06/07)

    • 2026-08-06 ~14:01 — last known successful workflows on this runner group
    • Overnight / morning of 2026-08-07 — pool already broken (jobs queued with no runner assigned)
    • ~08:15 — confirmed Outdated + empty children + ghost counts
    • ~08:21 — recovered (see below)

    We did not capture controller logs from the entry into Outdated (previous container logs unavailable). We also did not confirm a concurrent Helm values change on that release; last intentional Helm upgrade of this scale set before the incident was older (memory limit bump on 2026-07-23), and the pool had been working after that.

    Recovery
    Deleting the stuck AutoscalingRunnerSet alone was not enough (Helm considered the release healthy and did not recreate children). Force-reconciling the HelmRelease recreated the ARS/listener/ERS and restored job pickup:

    kubectl delete autoscalingrunnerset <name> -n <ns>
    flux reconcile helmrelease <name> -n <ns> --force

    After recovery the listener scaled to max to drain the queued backlog.

    Happy to provide more CR dumps / versions if useful. Posting mainly to note the same terminal shape on 0.14.1, in case this was only being tracked against 0.14.2 so far.

  6. Tanguille commented on Aug 7, 2026

    @Tanguille

    Same terminal state, but reached without any config change — via a runner exit 7 during the incident

    Adding this because it looks like a distinct entry path rather than another reproduction of the one described. The body says "whatever the precise interleaving that enters Outdated" — in our case we have the exact interleaving, and it involves no helm upgrade and no CR edit at all.

    Environment

    • Controller / chart: 0.14.2 (ghcr.io/actions/gha-runner-scale-set-controller:0.14.2, gha-rs-0.14.2)
    • Kubernetes v1.36.3, bare-metal Talos v1.13.8, single control-plane node (not EKS/GKE/AKS)
    • Org-scoped, containerMode: dind, updateStrategy: immediate, minRunners: 1 / maxRunners: 8
    • Managed by Flux (HelmRelease), so the rendered spec is re-applied hourly and is byte-identical each time

    Terminal state — identical to the report

    phase:                          Outdated
    runner-scale-set-id:            <absent>
    AutoscalingListener:            0   (also: listener SA, Role, RoleBinding, config Secret all gone)
    EphemeralRunnerSets:            0
    EphemeralRunners / pods:        0
    status.currentRunners:          7    <- ghost
    status.runningEphemeralRunners: 5    <- ghost
    status.pendingEphemeralRunners: 2    <- ghost
    

    HelmRelease stayed Ready=True / UpgradeSucceeded, so Flux did not self-heal. A sibling scale set in the same namespace stayed healthy throughout — per-resource, not controller-wide. The controller emitted zero log lines mentioning the dead resource for the entire 14h (every one of the 1072 retained lines named the healthy sibling), consistent with "no child resource left to generate a watch event".

    What is different: the trigger

    No configuration change was involved:

    • No commit to the GitOps repo touching actions-runner-system since 2026-08-03 (an unrelated docker image bump); no commit to the repo at all since 08-05.
    • helm list: the affected release was at revision 42, deployed 2026-07-31, unchanged.
    • actions.github.com/change-hash still matched Hash() throughout, so the L167-182 reset never had anything to fire on.

    Entry was instead through the deprecation path added by #4404, i.e. L231 outdated = outdated || latestRunnerSet.Status.Phase == EphemeralRunnerSetPhaseOutdated, driven by a single runner whose container exited 7 (RunnerVersionDeprecated, Constants.cs ReturnCode). markAsOutdated is only reachable from cs.State.Terminated.ExitCode == 7.

    Timeline (UTC, 2026-08-06) — all inside GitHub incident qcvjkzcs7j74 (critical, Actions, 15:22:49Z → 2026-08-07 02:04:44Z)

    22:16:45  EphemeralRunnerSet  Created new ephemeral runner  runner=self-hosted-jxprh-runner-qqwpx
    22:17:56  EphemeralRunner     Updating ephemeral runner status  statusPhase=Running ready=true
    22:17:57  [RUNNER ... BrokerMessageListener]  "AgentName": "self-hosted-jxprh-runner-qqwpx"   <- job assigned
    22:18:01  EphemeralRunner     Updating ephemeral runner status to Outdated                    <- exit 7, 5s into the job
    22:18:01  EphemeralRunner ERROR  Failed to set ephemeral runner to phase Outdated
              error: failed to remove the runner from service: request DELETE
              https://broker.actions.githubusercontent.com/rest/_apis/distributedtask/pools/0/agents/86900
              failed(status="400 Bad Request"): job still running: Runner
              self-hosted-jxprh-runner-qqwpx is currently running a job and cannot be deleted.
    22:18:01  AutoscalingRunnerSet  Ephemeral runner set is outdated
    22:18:01  EphemeralRunnerSet    ephemeral runner set is outdated, waiting for autoscaling runner set to remove it
    22:18:01  AutoscalingRunnerSet  Deleting the listener  ->  Listener is deleted
    22:19:40  AutoscalingRunnerSet  deleting ephemeral runner sets
    22:19:40  AutoscalingRunnerSet  deleting runner scale set
    22:19:40  AutoscalingRunnerSet  Deleting the runner scale set from Actions service
              ... then nothing, for 14 hours, across no controller restarts.
    

    Note the status patch to Outdated lands before deleteRunnerFromService fails, so the 400 does not roll it back — the runner is left in Outdated while the service still considers it mid-job.

    The runner was not actually deprecated

    • Runner.Listener --version in the image: 2.336.0 — the newest release at the time (v2.336.0, 2026-07-20).
    • The sibling scale set runs the identical image digest and completed jobs normally at 05:14–07:04Z the next morning, after the incident resolved.

    So the RunnerVersionDeprecated signal appears to have been erroneous, emitted by a degraded Actions service. Our listener logged Runner connect error: Registration <uuid> was not found. Retrying until reconnected. at 22:02–22:03Z, ~15 minutes before.

    Why this seems worth distinguishing

    If a spurious exit 7 during an Actions incident is sufficient, then the deadlock needs no operator action whatsoever to trigger — no helm upgrade, no CR edit, no deploy. A degraded Actions service alone can permanently destroy a scale set registration on an otherwise idle, unchanged cluster. That is a wider blast radius than "config change coinciding with an outage", and it means clusters that changed nothing during the incident are still exposed.

    It may also be worth considering whether a single runner reporting RunnerVersionDeprecated should be able to condemn an entire scale set at all, given the signal can evidently arrive spuriously — the sibling set on the same image proves the version itself was fine.

    Recovery — confirmed, matches the documented workaround. We used phase: "Pending" rather than ""; both take the L190 createRunnerScaleSet path:

    kubectl patch autoscalingrunnerset <name> -n <ns> --subresource=status --type=merge \
      -p '{"status":{"phase":"Pending","currentRunners":0,"pendingEphemeralRunners":0,"runningEphemeralRunners":0}}'

    Scale set re-registered under a new ID (12 → 14), listener recreated, 8 runners up, and the queued backlog began draining — all within ~45 seconds of the patch.

  7. VladFCarsDevops commented on Aug 7, 2026

    @VladFCarsDevops

    We had the same issue — one of the few listener pods vanished completely, and restarting/deleting the controller pod didn't help. Only the following patch command:

    kubectl patch autoscalingrunnerset <name> -n <ns> --subresource=status --type=merge \
      -p '{"status":{"phase":"Pending","currentRunners":0,"pendingEphemeralRunners":0,"runningEphemeralRunners":0}}'
    

    was able to fix the issue. Not even ArgoCD was able to detect any issue.

  8. thboop commented on Aug 7, 2026

    @thboop
    Contributor

    During this Actions Incident, some Runners got stuck in a bad state trying to process jobs that had already been revoked or cancelled.

    That caused some Actions Runner Controller (ARC) clusters to get stuck in bad state that will require manual intervention to solve. There are two different degraded states your ARC clusters could be stuck in:

    • Individual ARC Runners are online and idle but not picking up jobs, the runner output shows "Listening for jobs".
      • This can be mitigated by deleting the ephemeral runners stuck in this state
        • kubectl get EphemeralRunner -n $NAMESPACE
        • kubectl delete EphemeralRunner $THERUNNER -n $NAMESPACE
    • ARC AutoscalingRunnerSets are stuck in status.phase: Outdated and no longer creating runners
      • This can be mitigated by patching the autoscalingrunnerset
        • kubectl patch autoscalingrunnerset <name> -n <namespace> --subresource=status --type=merge -p '{"status":{"phase":""}}'

    We understand that manually patching your ARC clusters is disruptive. The next Actions Runner Controller and its associated Runner release will contain fixes for these issues to prevent ARC from getting into this state again.

  9. lmbaschiera commented on Aug 10, 2026

    @lmbaschiera

    We hit this exact terminal state today across three clusters, but via a much more easily reachable entry route than an Actions outage plus a helm upgrade: an ordinary job, on a scale set whose runner image was pinned a couple of releases too old.

    Posting because it confirms your terminal-state analysis independently, and because the entry route means phase: Outdated plus cleanup-complete is reachable during normal operation rather than only during an incident.

    Environment

    • Controller ghcr.io/actions/gha-runner-scale-set-controller:0.14.2, chart gha-rs-0.14.2
    • EKS, Kubernetes v1.36.2
    • updateStrategy: immediate, runnerMaxConcurrentReconciles: 2, --log-level=debug, replicaCount: 2 (leader election healthy, one pod doing all reconciles)
    • minRunners: 0, maxRunners: 10, containerMode: dind
    • Runner image pinned to ghcr.io/actions/actions-runner:2.334.0

    Entry route: runner exit code 7

    Our runner image tag had been pinned at 2.334.0 for weeks, unchanged. At some point the Actions service began requiring a newer runner. Because ARC registers scale sets with DisableUpdate: true (autoscalingrunnerset_controller.go:538), the runner cannot self-update, so it terminates as outdated instead. markAsOutdated has only two call sites and both are gated on runner container exit code 7 (ephemeralrunner_controller.go:339-340 in the PodFailed branch, and :373-374), so that is the path taken.

    To be precise about what we observed versus inferred: we captured the Updating ephemeral runner status to Outdated transition directly, but not the container's terminated exit code. The pod and EphemeralRunner are deleted within a second or two, and our snapshots covered the CRs rather than pods. Exit code 7 is therefore deduced from those being the only two paths into markAsOutdated, combined with a runner image two releases behind what ARC currently ships (2.334.0 vs RUNNER_VERSION ?= 2.336.0 at master). See observation 1 below. Bumping the tag did resolve it, which is consistent with that reading.

    From there it walks straight into the deadlock you describe:

    runner Outdated
      -> EphemeralRunnerSet phase Outdated
         -> AutoscalingRunnerSet deletes the listener and the EphemeralRunnerSet
            -> cleanUpResources runs to completion, runner-scale-set-id annotation removed
               -> phase: Outdated, no children, reconciler permanently silent
    

    The consequence is that every scale set is destroyed by the first job it accepts, and never recovers. Three of our seven clusters went down as they picked up work. The remaining four looked healthy purely because they were idle and no runner had connected yet.

    Timeline, captured at 1-second resolution

    One cycle, from a scale set revived seconds earlier and idle-healthy, through a single job. Names genericised.

    T+00:00.0  status.phase patched to "" -> phase Running, scale set registered,
               EphemeralRunnerSet at patchID=0, listener pod Running
    T+00:54    listener heartbeat: assigned job=0 -> patch {"patchID":0,"replicas":null}   (harmless)
    T+01:45    listener heartbeat: assigned job=0 -> patch {"patchID":0,"replicas":null}   (harmless)
    T+01:49.2  listener DELETE .../scalesets/message/100000001      (job arrives)
    T+01:49.3  listener: assigned job=1, decision=1
               "Preparing EphemeralRunnerSet update" json={"spec":{"patchID":2,"replicas":1}}
    T+01:49    EphemeralRunner created
    T+01:50    EphemeralRunner Pending
    T+02:01    runner container Running       (ERS counts: running 1, outdated 0)
    T+02:04    EphemeralRunner "Updating ephemeral runner status to Outdated"
    T+02:04    ERS counts: outdated 1  -> "ephemeral runner set is outdated, waiting for
               autoscaling runner set to remove it"
    T+02:04    ARS "Ephemeral runner set is outdated" -> "Deleting the listener"
               listener dies mid-poll: context canceled / "Application returned an error"
    T+02:05    ARS -> phase Outdated, runner-scale-set-id removed, no ERS, no listener,
               reconciler silent
    

    The wedged CR state matches yours exactly: phase: Outdated, finalizer present, no deletionTimestamp, runner-scale-set-id absent, no EphemeralRunnerSet, no AutoscalingListener.

    Two observations that may be useful

    1. markAsOutdated logs no reason. Updating ephemeral runner status to Outdated is emitted with no reason field even at --log-level=debug:

    INFO  EphemeralRunner  Updating ephemeral runner status to Outdated  {"version": "0.14.2", "ephemeralrunner": {"name":"runners-env-xxxxx-runner-yyyyy","namespace":"actions-runners"}}
    

    markAsOutdated does set Status.Reason = "Outdated" (:593), but nothing records why, and in particular not the container exit code that triggered it. Because the EphemeralRunner and its pod are deleted within a second or two, that exit code is effectively unobservable after the fact. Logging the terminated exit code on :589 would have taken hours off our diagnosis; we had to reach it by elimination and by reading the two call sites. Cheap change, high diagnostic value.

    2. The status.phase patch workaround is a one-shot revive, not a fix. kubectl patch ... --subresource=status -p '{"status":{"phase":""}}' recovers the scale set within about two seconds, exactly as you describe. But if the underlying cause still fires, the revived scale set takes one job and wedges again. We measured this: revived, idle and healthy for four minutes, took one job, wedged. Each cycle also re-registers a new scale set on the Actions service. One of our clusters climbed from scale-set id 9 to 36 while an untouched idle cluster stayed at 9. So the patch is useful for draining a backlog, but it cannot be automated as a watchdog.

    The durable recovery is the change-hash path you already identified (autoscalingrunnerset_controller.go:167-178): any spec change rewrites change-hash and calls updateStatus(..., PhasePending), which resets the phase. We confirmed this in practice. Bumping the runner image tag both removed the cause and un-wedged every affected scale set on the next sync, with no status patching and no CR deletion. That does reinforce your point though, because recovery that depends on someone happening to ship a spec change is not really recovery.

    Ruled out, in case it saves anyone time

    While diagnosing we eliminated, with evidence:

    • GitOps interference: our Argo CD apps have no automated sync policy, and there were zero applies or deletes in any failure window.
    • Duplicate controllers / leader election: one pod produced 568 of 569 reconcile lines.
    • Reconcile concurrency: tested runnerMaxConcurrentReconciles: 1, still wedges. (Though at the default of 2 we did see two EphemeralRunnerSets created for a single AutoscalingRunnerSet within the same second. That looks like a stale-cache double-create, and ARC self-corrects by deleting the extra, so it seems cosmetic rather than related to this bug.)
    • patchID mismatch: ERS spec.patchID=2 versus runner annotation actions.github.com/patch-id="2". Identical.
    • Spec drift: actions.github.com/runner-spec-hash constant on both ERS and runner across all 140 snapshots of the cycle.
    • Controller restarts: kubectl rollout restart reproduces your Excerpt B exactly, one reconcile per scale set ending at deleting runner scale set, then permanent silence, no error.

    Supporting your proposed fix

    @chris-pylon - Agreed on both counts, and the entry route above makes the defensive check matter more than the specific trigger:

    • After cleanUpResources completes in the outdated branch, reset status.phase and/or requeue rather than returning ctrl.Result{}, nil.
    • phase == Outdated with no listener, no EphemeralRunnerSet, and no runner-scale-set-id annotation should never be a stable state. As you put it, that is precisely "nothing exists and nothing will ever be created". Whatever interleaving got us there, the state should self-heal.

    One thing worth adding: because the condemning signal here is a runner exit code that recurs deterministically, the recreate-after-cleanup path also needs to avoid spinning. A scale set whose runners always exit 7 will re-register, take a job, and tear down, repeatedly. Backoff plus a surfaced condition on the AutoscalingRunnerSet, something like RunnersOutdated, would make that visible instead of silent. As it stands, a completely dead scale set produces no error, no crash, no failing health check, and a healthy-looking sync status in Argo CD.

  10. mtzanidakis commented on Aug 10, 2026

    @mtzanidakis

    Independent confirmation of @nicomazzarello's exit-7 finding, from the GKE cluster I reported the original repro from — plus one mechanism I have not seen mentioned, which is why this took us an evening to see.

    Same root cause, reached without pinning an old version deliberately. Their scale sets were pinned to actions-runner:2.334.0. Ours were on a custom image whose Dockerfile did:

    ARG BASE_IMAGE=ghcr.io/<base>/actions-runner:latest
    FROM ${BASE_IMAGE}

    :latest is resolved at image build time, so each of our image tags silently froze whatever runner release happened to be current on its build day. Two of our nine scale sets were still on an image built months earlier; the other seven had been rebuilt since. When the service minimum moved, exactly those two died — and nothing in our repo had changed. Rebuilding them onto a current runner fixed it completely, matching their result.

    Worth stating plainly for anyone auditing their own setup: a pinned image tag is not a pinned runner version if the base is a floating tag.

    Why it looked like it only affected some scale sets. The nine differed only in that image. The failure needs a runner to actually start and exit 7, so a scale set with no traffic looks perfectly healthy indefinitely. One of ours sat Running for days purely because nothing targeted it, then went Outdated 67 seconds after receiving its first job — which we initially misread as load-related.

    The part I have not seen mentioned: an unrelated cron was masking this fleet-wide. We run a work-hours warm pool — a CronJob that does kubectl patch autoscalingrunnerset <name> --type=merge -p '{"spec":{"minRunners":N}}' twice a weekday — but only against two of the nine scale sets. Because any spec change flips the change hash and resets status.phase out of Outdated (the :167-182 path), those two were being silently healed twice a day and never stayed broken long enough for anyone to notice. Only the scale sets nobody ever patches accumulated the terminal state.

    So if you run any external minRunners autoscaler, GitOps reconciler, or anything else that periodically touches the CR spec, it is probably hiding this bug from you rather than causing it — and the scale sets it does not cover are the ones that will die.

    On the status.phase patch as mitigation. It recovers the resource — new runner-scale-set-id, listener back, backlog drains — and then dies again on the next job, exactly as they describe. We went through the documented patch, a controller restart, and a helm upgrade carrying a genuine spec change; each bought a recovery that held only while the pool was idle. Four collapses in ninety minutes before we stopped treating the symptom. The controller restart was actively unhelpful: it converted the reconcile churn into a silent stall.

    None of that is a criticism of the mitigation — it does what it says. But since it appears to work, it is easy to spend a long time recovering repeatedly instead of looking at the runner image, especially because cleanup deletes the pods and takes the exit code with them.

    Two things that would have shortened this considerably, in addition to the missing requeue already discussed:

    1. Surface the reason on the AutoscalingRunnerSet. The EphemeralRunner carries Message: "Runner is deprecated", but by the time anyone looks at the ARS, every child is gone and the only visible state is phase: Outdated with ghost counters. A condition or event preserving why it went outdated would point straight at the image.
    2. Log it above info level. A scale set being destroyed because its runner is too old is not routine reconciliation, and "Ephemeral runner set is outdated" at info reads like bookkeeping.

    For anyone triaging: a healthy scale set has a bare runner-scale-set-id annotation (no actions.github.com/ prefix — easy to miss when filtering by that prefix) and phase: Running. A dead one has no id, phase: Outdated, and status.currentRunners / runningEphemeralRunners counts that match no pods, no EphemeralRunners and no EphemeralRunnerSet.

  11. jrholt-arch commented on Aug 11, 2026

    @jrholt-arch

    Independently hit this exact latch on 0.14.2: a scale-set values change landed while runners were busy; phase latched Outdated, cleanup completed, but the phase never reset and createRunnerScaleSet stayed gated off. Every pod looked healthy and GitOps diffs showed clean (phase lives in the status subresource), so it ran ~5 days undetected across a multi-scale-set fleet.

    Recovery that worked for us: delete the latched AutoscalingRunnerSet, let it recreate, then restart the controller deployment.

    Mitigations we've since adopted, in case they help others: alert on status.phase != "Running" via kube-state-metrics custom-resource-state, and drain the scale set to zero before any values change. +1 for a phase reset / requeue after cleanup completes.

  12. rissmm24-design commented on Aug 11, 2026

    @rissmm24-design
  13. rissmm24-design commented on Aug 11, 2026

    @rissmm24-design
  14. rissmm24-design commented on Aug 11, 2026

    @rissmm24-design
  15. rissmm24-design commented on Aug 11, 2026

    @rissmm24-design
  16. 12 remaining items

  17. humh25 commented on Sep 17, 2026

    @humh25
  18. farioas commented on Sep 17, 2026

    @farioas

    Please don't close this. This is a major reliability issue, the latest version of the runner and the operator goes into a zombie state in case of a Github outage.

    Try to update runner image "actions/actions-runner" to the version newer than 2.336.0, this worked for me

  19. gabordk commented on Sep 17, 2026

    @gabordk

    Please don't close this. This is a major reliability issue, the latest version of the runner and the operator goes into a zombie state in case of a Github outage.

    Try to update runner image "actions/actions-runner" to the version newer than 2.336.0, this worked for me

    Appreciate your help, but in my scenario we were already using the latest runner version when the issue happened.
    Github Support also confirmed that this is a controller bug, and referenced this issue to track the progress of the fix.

  20. VidhyaSanjeevi commented on Sep 25, 2026

    @VidhyaSanjeevi

    Another reproduction, distinct entry path: a stale custom runner image, no incident, no config change

    Environment: controller/chart 0.14.2, self-hosted single-node k3s (not EKS/GKE/AKS), updateStrategy: immediate, several AutoscalingRunnerSets in one arc-runners namespace, one affected in isolation while siblings stayed healthy — same "per-resource, not controller-wide" pattern others here reported.

    How we got into it, and it's a third distinct trigger: our runner pods use a custom image built FROM ghcr.io/actions/actions-runner:latest with no scheduled rebuild — only rebuilt on a Dockerfile diff or manual dispatch. That looks self-updating but isn't: the base tag only re-resolves at build time, so the image just sits on whatever latest meant at the last build. Ours had drifted two minor versions behind GitHub's currently published release. No GitHub Actions incident was involved, and no Helm/CR change landed anywhere near the timing — just an old runner binary getting deprecated server-side during otherwise normal operation, months after the image was last rebuilt. Confirmed by execing into the deployed image and running --version.

    Terminal state — identical signature to every other report here:

    phase:                Outdated
    runner-scale-set-id:  <absent>
    listener:              0
    EphemeralRunnerSet:    0
    EphemeralRunner/pods:  0
    status.currentRunners / runningEphemeralRunners: nonzero ghost counts, nothing actually exists
    

    Zero error logged anywhere in the chain. Survived a controller restart, a full scale-set destroy/recreate, and a full node reboot — same as others found, the poison is entirely in persisted CR status.

    Root cause of the cascade itself, traced through gha-runner-scale-set-0.14.2 source, which may be useful for a real fix (not just the status-patch workaround):

    • controllers/actions.github.com/ephemeralrunner_controller.go: a runner container exiting with code 7 (RunnerVersionDeprecated, per actions/runner's Constants.cs — GitHub's own server-side deprecation signal) is the only caller of markAsOutdated(), which sets that one EphemeralRunner's phase to Outdated.
    • controllers/actions.github.com/ephemeralrunnerset_controller.go (~L243): the parent EphemeralRunnerSet's phase becomes Outdated the moment len(state.outdated) > 0 — i.e. any single child runner being outdated is sufficient, regardless of how many siblings are healthy.
    • controllers/actions.github.com/autoscalingrunnerset_controller.go (L231): that bubbles straight up — outdated = outdated || latestRunnerSet.Status.Phase == EphemeralRunnerSetPhaseOutdated — and the top-level reconciler tears down the entire AutoscalingRunnerSet: listener, every other (healthy, possibly mid-registration) runner, and the scale-set registration itself.

    That seems like the actual design gap underneath this whole class of report: a single runner legitimately needing to recycle because its binary is deprecated is a completely different situation from "the pod template spec changed," but both currently flow through the same outdated branch and get the same blast radius. A deprecated-runner exit(7) looks like it should just replace that one EphemeralRunner (normal ephemeral-runner lifecycle already handles exactly this kind of single-pod replacement elsewhere in the same controller) rather than condemning the whole scale set — and even when it does condemn the whole set, that's where everyone here hits the second bug: cleanup completes, phase never resets, nothing left to generate a watch event, permanent silent parking.

    Mitigation that's actually preventing recurrence for us (not a code fix, but worth mentioning for anyone using a custom/derived runner image): add a scheduled rebuild (we went with weekly) for any image built FROM .../actions-runner:latest, since nothing else keeps that base current. A rebuild-on-Dockerfile-diff-only trigger silently drifts, and each drift is another chance to hit this exact deadlock with zero warning.

    Workaround confirmed working here too, same as reported above:

    kubectl patch autoscalingrunnerset <name> -n <ns> --subresource=status --type=merge \
      -p '{"status":{"phase":"Pending","currentRunners":0,"pendingEphemeralRunners":0,"runningEphemeralRunners":0}}'

    — recovers the specific instance, but (as already well documented above) doesn't prevent the same deadlock from recurring on the next deprecated-runner exit or spec-hash race.

  21. github-actions commented on Oct 26, 2026

    @github-actions
    Contributor

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  22. hmrks commented on Oct 26, 2026

    @hmrks

    I don't think this should be closed.

  23. github-actions commented on Nov 27, 2026

    @github-actions
    Contributor

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  24. hmrks commented on Nov 27, 2026

    @hmrks

    Still relevant.

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