Stop chowning all of ${RUNNER_TEMP} in linux_job/linux_job_v2 - #8598
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
huydhn
force-pushed
the
fix-chown-runner-temp
branch
from
August 20, 2026 20:11
16ea3a0 to
163d976
Compare
${RUNNER_TEMP} also holds the runner's own control files --
_github_workflow/event.json, _runner_file_commands/ -- and the recursive
chown we issue from inside an alpine container is not guaranteed to land
on the runner's UID.
On a runner whose docker daemon remaps container UIDs it does not. The
gfx1100 ROCm runners (ctr-navi3x-b13-ws*) run rootless docker (`docker
info` reports DockerRootDir=/home/pytorchci/.local/share/docker), where
container UID 0 maps to the host runner user and container UID N>0 maps
into that user's subuid range. `chown -R $(id -u)` -- the runner's *host*
UID, expanded outside the container -- therefore lands on a subordinate
UID that nothing on the host owns. The runner then cannot read
event.json, and every remaining step of the job fails with
##[error]Access to the path
'/home/pytorchci/actions-runner/_work/_temp/_github_workflow/event.json'
is denied.
Chown only the three directories we actually hand to the container:
$RUNNER_ARTIFACT_DIR, $RUNNER_DOCS_DIR and $RUNNER_TEST_RESULTS_DIR.
Those are the bind mounts the exec container writes to as root, so they
are the only ones that need restoring, and none of them belong to the
runner. setup-linux, setup-rocm and setup-xpu all set the three env vars
to ${RUNNER_TEMP}/{artifacts,docs,test-results}.
Anything a script writes directly to ${RUNNER_TEMP} as root is no longer
chowned back. linux_job.yml has the same step but is legacy, so it is
left alone.
Hoist the repeated ALPINE_IMAGE expression to a job-level env var rather
than repeat it three times.
huydhn
force-pushed
the
fix-chown-runner-temp
branch
from
August 20, 2026 21:00
163d976 to
bd3f737
Compare
huydhn
marked this pull request as ready for review
August 20, 2026 21:07
|
Thanks @huydhn, let me know once this lands, I can rerun or land gfx1100 CI. |
Contributor
Author
|
@digantdesai Appreciate if you could try to test this out on your PR. Two small tweaks are needed for that:
|
jeanschmidt
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the gfx1100 ROCm runners docker is rootless, so a
chown -R $(id -u)issued from inside a container lands on a subordinate UID. Chowning all of${RUNNER_TEMP}therefore takes_github_workflow/event.jsonaway from the runner, and every step after it fails withAccess to the path ... is denied— see executorch#21977, where the test passed and 6 post-steps failed.Chown only the three dirs we mount into the container instead.