Allow skipping oom_score_adj write via ACTIONS_RUNNER_DISABLE_OOM_SCORE_ADJ env var#4478
Open
biagiopietro wants to merge 2 commits into
Open
Allow skipping oom_score_adj write via ACTIONS_RUNNER_DISABLE_OOM_SCORE_ADJ env var#4478biagiopietro wants to merge 2 commits into
biagiopietro wants to merge 2 commits into
Conversation
…RE_ADJ env var Unprivileged containerized runners (e.g. ARC on Kubernetes) cannot write to /proc/<pid>/oom_score_adj and raise System.UnauthorizedAccessException. Setting ACTIONS_RUNNER_DISABLE_OOM_SCORE_ADJ=true (or =1) suppresses the write entirely so operators are not flooded with access-denied exceptions when they know the container is already securely isolated.
marcelosinhorini-jet
approved these changes
Jun 4, 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.
Summary
ACTIONS_RUNNER_DISABLE_OOM_SCORE_ADJenvironment variable (acceptstrueor1) to suppress writes to/proc/<pid>/oom_score_adj;procfsand receivesSystem.UnauthorizedAccessExceptionon every spawned process;Verbosetrace is emitted so operators can confirm the skip is active.Test plan
OomScoreAdjIsWriten_Default,OomScoreAdjIsWriten_FromEnv, andOomScoreAdjIsInheritedtests continue to pass (no env var set → behaviour unchanged)OomScoreAdjIsSkipped_WhenDisableEnvVarSettest: setsACTIONS_RUNNER_DISABLE_OOM_SCORE_ADJ=true, runs a child process, and asserts itsoom_score_adjequals the parent's value (i.e. no write occurred)UnauthorizedAccessExceptionis raised when the variable is setLinked issues