Skip to content

Finish per-job runtime isolation instead of sharing /tmp/gh-aw across self-hosted jobs #78555

Done

Description

@lpcox

Summary

#75441 was closed by #75444, but that pull request explicitly left the full runtime-path migration unfinished. gh-aw v1.2.2 and current main still use a global /tmp/gh-aw runtime tree across jobs on the same host.

The merged change isolated installer staging and AWF chroot scratch directories, and stopped teardown from deleting unowned shared state. It did not allocate and propagate a private runtime root for the rest of the workflow.

Remaining behavior

actions/setup/setup.sh still removes and recreates /tmp/gh-aw at job startup:

rm -rf /tmp/gh-aw
mkdir -p /tmp/gh-aw

It may escalate to sudo -n rm -rf for root-owned contents. Meanwhile, the post step intentionally leaves /tmp/gh-aw untouched because it cannot establish per-invocation ownership.

Consequences on a self-hosted VM with multiple runners include:

  • One job's setup can remove another active job's runtime files.
  • A no-sudo runner cannot reclaim root-owned leftovers from a previous job.
  • Completed jobs leave shared state behind because teardown cannot safely identify ownership.
  • Many generated paths, mounts, logs, audit files, and sandbox directories still use the same global root.

Expected behavior

Each job or workflow invocation should receive an owner-private, collision-resistant runtime root. Every runtime path and cleanup operation should be derived from that allocation. Setup and teardown must never recursively operate on another invocation's state.

Acceptance criteria

  • Allocate a private runtime root using job/invocation identity suitable for concurrent runners, retries, and matrix jobs.
  • Propagate it through generated paths, sandbox mounts, logs, gateway configuration, audit files, detection artifacts, and teardown.
  • Remove startup-time recursive deletion of global /tmp/gh-aw.
  • Cleanup only resources whose ownership can be attributed to the current invocation, without sudo on the supported rootless path.
  • Review fixed Docker/container names and other shared-daemon resources for the same concurrency boundary.
  • Add a regression with two simultaneous jobs sharing /tmp and one Docker daemon; setup and cleanup of either job must not affect the other.
  • Cover failed/interrupted jobs and stale root-owned state.

Relationship to prior work

Activity

  1. added
    bug
    on Nov 17, 2026
  2. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    Assigning to @pelikhan: the most recent active human contributor, with recent per-job runtime observability work in #78433 that overlaps the shared /tmp/gh-aw runtime root.

    Generated by 🔧 Daily Assign Issue To User · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~1 AIC · ⊞ 2.6K · ◷

  3. assigned and unassigned on Nov 17, 2026
  4. assigned and unassigned on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugworkflows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions