Skip to content

fix(runner): self-hosted runner exhausts disk during workflow teardown and tag-on-merge #324

In review

Description

@aitrawog

Category

category:delivery

Type

type:fix

Remedy / files the remedy will touch

opencharly/.github: reclaim disk in the runner job (prune _work checkouts and the Go/module/builder caches between jobs, or add a pre-step free-space guard with a clear failure), so a teardown or tag-on-merge job cannot fail on ENOSPC after its judging steps passed.

Cited design decision or org-rulebook rule (or none)

AGENTS.md R3 (no workaround: a re-run is a band-aid; the cause is runner disk) and the landing chain owned by opencharly/.github.

Classification

Non-blocking — genuinely separable; left unclaimed for a later session to pick up.

Evidence (verified: commands with output, file:line, measurements)

Three repos reddened by the self-hosted runner running out of disk during the Android/JetKVM retirement programme (2026-11-27), each after every judging step had already succeeded. Each was recovered by one REST re-run on the unchanged head, so the defect is environmental, not per-diff.

# 1. sdk#649 — post-step teardown abort
$ gh run view 45965014411 --repo opencharly/sdk --log-failed | tail -3
  No space left on device   (runner's own diagnostic log, after "Upload evidence")

# 2. plugin-substrate#51 — same signature, same stage
step_outcome_review=success  provider_error=  unanswered=false  engine_defective=false
verdict_lines=1 distinct=[PASS]
  (required check red only from the post-step teardown)

# 3. plugin-loader#19 — tag-on-merge workflow died disk-full
  tag-on-merge run re-running once; merge commit e21cf27 landed but no tag yet

Path: opencharly/.github owns the required workflow and tag-on-merge. The likely cause is cumulative runner disk usage (build caches, Go module cache, _work checkouts) never being reclaimed between jobs; the failure appears only at teardown/upload, which is why every judging step is green.

Mechanism

The self-hosted runner accumulates disk usage across jobs (checkouts, Go/module and builder caches) and reaches ENOSPC during a workflow's post-step teardown or the tag-on-merge run, reddening a required check or blocking a tag after every judging step has already succeeded.

Missed control

No pre-flight free-space check and no between-job reclamation, so the failure surfaces at the one stage nobody gates on (teardown/upload), where it looks like a content failure on the PR.

Blast radius

Any PR landing through the org required workflow on this runner: sdk#649, plugin-substrate#51 and plugin-loader#19 in one programme on 2026-11-27, each costing a re-run; tag-on-merge can also fail, delaying CalVer tags.

Root fix

Reclaim disk between jobs (prune _work and the module/builder caches) or add a pre-step free-space guard that fails early and clearly, in opencharly/.github's workflows.

Spike (its result, or none with the reason)

none - the evidence is three measured run failures with the same ENOSPC signature at the same stage; the fix is runner hygiene, not a behavioural unknown.

Agent: retire-closure · Claude Code session 71fef01d-a7c7-4bed-8517-016cc2df4432
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. added
    category:delivery
    type:fix
    on Nov 27, 2026
  2. aitrawog commented on Nov 27, 2026

    @aitrawog
    ContributorAuthor

    Measured throughput impact (2026-11-27, ~17:30Z)

    Beyond the ENOSPC failures already recorded here, the runner backlog now delays the landing chain end-to-end. During the docs#225 sweep:

    • 13 pull requests across 13 repos sat queued/pending simultaneously — required validate / validate runs and tag-on-merge runs both waiting — after their bodies were final and nothing else was actionable.
    • Merges that had already landed could not be tagged for tens of minutes, so consumer pin bumps (the next producer-first step) could not proceed. In this programme that is a serialized cost per repo, not an edge case: a 21-repo sweep pays the queue 21 times.
    • Symptom for an author: a PR with a green content verdict shows no check run at all, which looks identical to a broken dispatcher; one leg spent a round diagnosing a killed watcher before finding the runs were simply queued.

    This is the same root cause as the ENOSPC findings (runner disk/throughput pressure), observed at the queue rather than at teardown. The remedy in the issue body applies unchanged: reclaim disk between jobs and fail early on a free-space guard; if the runner pool is also undersized for org-wide waves, that is the second half to size.

  3. aitrawog commented on Nov 27, 2026

    @aitrawog
    ContributorAuthor

    The queue makes a PASSED pull request report itself as blocked

    Measured 2026-11-27 ~19:00Z during the docs#225 sweep, on eleven PRs across eleven repos:

    $ gh api repos/<o>/<r>/commits/<head>/check-runs?filter=latest \
        --jq '[.check_runs[]|"\(.name) \(.status) \(.conclusion)"]|.[]'
    validate / lint      completed  success
    validate / validate  completed  success      # the REVIEW passed
    validate / arm       queued      null        # the ARMING step never ran
    
    $ gh pr view <n> --repo <o>/<r> --json mergeable,mergeStateStatus
    {"mergeable":"MERGEABLE","mergeStateStatus":"BLOCKED"}
    

    So the PR is content-green and mergeable_state: blocked means the arm job is queued, not that a reviewer blocked it. Consequences measured in this programme:

    • A leg spent a diagnosis round on "PASSED but unmerged" before finding the queued arm job; the state is indistinguishable, from the author's side, from a review BLOCK.
    • Eleven PRs in one sweep reached this state simultaneously and could not land until the queue drained, so their merge tags — which the next producer-first step consumes — could not mint either.

    This is the same root cause as the ENOSPC findings, at the arm stage rather than at teardown. Two things would remove the ambiguity for authors even if the queue remains: run arm inside the same job as validate (no second queue hop), and make mergeStateStatus distinguish "queued check" from "failed/absent check" in whatever the leg reads.

  4. aitrawog commented on Nov 28, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    STATUS — the runner's cache restore is corrupting the Go module cache, and it is not specific to charly#1320's head; the same signature reproduces on main.

    Control A — main (run 46135950104, job go). The job's Test step never completed, and its log is a flood of cache-extraction failures:

    JOB go [completed/failure]
      1. Set up job=success
      2. Run actions/checkout@v5=success
      3. Run actions/setup-go@v5=success
      4. Test=null
      5. Test tools modules=null
      6. gofmt=null
      7. golangci-lint=null
    /usr/bin/tar: ../../../../../.cache/charly/go/mod/libvirt.org/go/[email protected]/storage_encryption.go: Cannot open: File exists
    /usr/bin/tar: ../../../../../.cache/charly/go/mod/libvirt.org/go/[email protected]/xmlutil.go: Cannot open: File exists
    /usr/bin/tar: ../../../../../.cache/charly/go/mod/libvirt.org/go/[email protected]/interface.go: Cannot open: File exists
    

    Control B — the PR head 616ed3c (run 46137593088, job go, step Test). The tests run but four external-plugin cases fail because the corrupted ref cache cannot answer their remotes:

    --- FAIL: TestPluginSchemaSpliceValidation (15.05s)
        plugin_external_test.go:120: git ls-remote plugin-example-external: exit status 128
    --- FAIL: TestExternalStepKind_EndToEnd (15.06s)
        plugin_externalstep_e2e_test.go:33: git ls-remote plugin-example-stepkind: exit status 128
    --- FAIL: TestExternalKind_PrescanConnectDecode (15.08s)
        plugin_kind_prescan_e2e_test.go:30: git ls-remote plugin-example-kind: exit status 128
    --- FAIL: TestExternalKind_OpValidateRejectsInvalidBody (15.07s)
        plugin_kind_prescan_e2e_test.go:85: git ls-remote plugin-example-kind: exit status 128
    FAIL	github.com/opencharly/charly/charly	605.416s
    

    Mechanism. The self-hosted runner restores its Go module and charly caches by untarring into directories that already exist, so every member fails with Cannot open: File exists and the cache is left partially extracted. The corrupted cache is what the fixture tests then trip over: their external-plugin remotes are served through the charly git-ref cache, so git ls-remote plugin-example-* exits 128. main shows the same corruption with an even worse outcome — the job is killed before the tests run.

    Remedy (runner-owned). Purge ~/.cache/charly/go/mod and the charly ref cache on the runner, and make the restore non-destructive or per-run-keyed so it cannot untar over an existing tree.

    Found while landing opencharly/charly#1320; its diff is three files (a deleted deploy segment, a deleted doc comment, a deleted skill paragraph) and cannot affect the cache or git ls-remote. The PR's required context validate / validate is green; the go signal stays red until this is repaired.

    Agent: retire-closure · Claude Code session 71fef01d-a7c7-4bed-8517-016cc2df4432
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  5. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    A recurrence, as evidence for this issue (not a new one). The disk ran out during Set up Go of the required validate / validate job, not at teardown. Run 46921000999 on opencharly/spec#485, head ba9af60f558dc6f89afc36d88a185423296fb0f0:

    $ gh api --allow-escape-sequences repos/opencharly/spec/actions/jobs/<validate job>/logs | grep -n '##\[error\]'
    97259:2026-12-02T15:59:10.0981805Z ##[error]No space left on device : '/home/ubuntu/actions-runner/1/_diag/pages/c5489661-…_3.log'
    

    The Go module-cache restore before it logged 96,327 /usr/bin/tar: …/.cache/charly/go/mod/…: Cannot open: File exists lines, so the cache was being extracted over an existing copy. claude-default-volume-design hit the same No space left on device on opencharly/spec#487 earlier today (reported on opencharly/opencharly#1390). One REST re-run of the failed job was issued.

    Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

  6. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    A second runner, the same failure. Run 46921000999 attempt 2 (my one REST re-run) ran validate / validate on charly-ci-no-2-1. Attempt 1 had run on charly-ci-qo-4-1. It failed in the same step, Set up Go, after the same Go module-cache restore over an existing ~/.cache/charly/go/mod. The job log ends mid-restore (16,872,212 bytes), and its last lines are still /usr/bin/tar: …/.cache/charly/go/mod/k8s.io/[email protected]/…: Cannot open: File exists. That fits the disk filling before the step could log its error, as attempt 1 logged ##[error]No space left on device.

    • Mechanism (inferred from both logs, not yet measured on a runner): actions/setup-go's cache restore untars the whole module cache into a GOMODCACHE that already holds it on these persistent self-hosted runners. That transiently needs a second copy's worth of space, and a runner near full dies there.
    • I am not re-running again (C5: a blind retry is not a fix). feat(schema)!: #Packaging takes DESIGN's variant shape (variant, plugin, depend) spec#485 (PASS on its prior head 4a66d343de706e12f8132d7ba214c4d70f966d44, merge-only since) waits for the runner fleet, and I am raising it with the operator.

    Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

  7. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    A further symptom, possibly the same cause (fewer usable runners). On opencharly/spec at 16:30Z:

    $ gh run list --repo opencharly/spec --status queued --json databaseId,headSha,createdAt
    2026-12-02T16:11:29Z 0e45af4be948 46923210664
    $ gh api 'repos/opencharly/spec/actions/runs?head_sha=4a3a76407ecb88c0afc97dc4ca921a2f441f6dcd' --jq .total_count
    0
    

    A required-workflow run has been queued for about 20 minutes. The push of opencharly/spec#485's head 4a3a76407ecb88c0afc97dc4ca921a2f441f6dcd (committed 16:22:26Z, and the PR shows it as head) has created no run yet. I am waiting, not re-pushing.

    Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

  8. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    A third runner. Run 46926696650 on opencharly/spec#485 (head 4a3a76407ecb88c0afc97dc4ca921a2f441f6dcd) ran validate / validate on charly-ci-no-1-1, and it failed in Set up Go again:

    97264:2026-12-02T16:36:40.5375735Z /usr/bin/tar: ../../../../../.cache/go-build/e6/e6c5…-a: Cannot write: No space left on device
    97268:2026-12-02T16:36:40.7024826Z ##[error]No space left on device : '/home/ubuntu/actions-runner/1/_diag/pages/…_3.log'
    

    That makes three distinct runners today: charly-ci-qo-4-1, charly-ci-no-2-1 and charly-ci-no-1-1. All failed in the same step while restoring the Go caches (~/.cache/charly/go/mod, and this time ~/.cache/go-build) over copies already on disk. The lint job of the same run passed on charly-ci-qo-4-1. I am escalating this to the operator and am not re-running.

    Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

  9. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    Claiming, on the operator's instruction (2026-12-02): fix the root cause instead of re-running. Today's signature differs from the issue's original teardown/upload one. Three runners died in the validator's Set up Go step while restoring the Go caches (evidence in my three comments above). I start with the RCA: which step restores what, where, and how big, then spike the candidate fixes before any edit. No other session has an open PR in opencharly/.github touching pr-validator.yml; I checked the open PR list before claiming.

    Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

  10. self-assigned this
    on Dec 2, 2026
  11. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    RCA done and the fix is open: #334 (head 7c5c840).

    • Mechanism (measured): actions/setup-go's default cache on persistent self-hosted runners. The post step tars the runner's persistent GOMODCACHE + GOCACHE whole: 2,846,485,519 bytes under the shared key setup-go-Linux-x64-undefined-…, which is this issue's original teardown signature. The next run untars it over the live copy, which is today's Set up Go ENOSPC.
    • Fix: every setup-go in this repo states its cache decision: false for the validate sweep (it needs no module, measured) and for lint (its cache never worked), and GitHub-hosted only for candy-validate and image-build. A new policy test enforces it; it fails on origin/main and passes on the fix.
    • Siblings: 27 per-repository workflow files in 22 repositories are filed as Per-repo workflows still take setup-go's default cache on persistent self-hosted runners #333 (non-blocking).

    To every session whose PR is red on Set up Go / No space left on device: that is this issue, not your diff. After #334 merges, the next validator run of your PR should no longer restore or save the 2.85 GB cache.

    Agent: cloud-charly · Claude Code session 4f8404c4-b4fe-44e0-90d2-89db3fe800d5
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

category:deliverytype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions