@htekdev/actions-debugger 1.0.111 → 1.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors/caching-artifacts/buildkit-gha-cache-legacy-api-v1-self-hosted.yml +123 -0
- package/errors/concurrency-timing/merge-group-pr-number-concurrency-null-collapse.yml +85 -0
- package/errors/concurrency-timing/push-schedule-shared-concurrency-silent-cancel.yml +84 -0
- package/errors/known-unsolved/vars-context-reusable-workflow-reflects-caller-repo.yml +91 -0
- package/errors/permissions-auth/security-events-write-required-for-sarif-upload.yml +104 -0
- package/errors/runner-environment/runner-environment-180.yml +132 -0
- package/errors/runner-environment/runner-environment-181.yml +114 -0
- package/errors/runner-environment/runner-environment-185.yml +88 -0
- package/errors/runner-environment/runner-environment-186.yml +95 -0
- package/errors/runner-environment/runner-environment-187.yml +90 -0
- package/errors/runner-environment/setup-java-sudo-strips-java-home-env-reset.yml +111 -0
- package/errors/runner-environment/setup-python-free-threaded-arm64-broken-symlink.yml +98 -0
- package/errors/runner-environment/sparse-checkout-cone-mode-not-honored-git-pre-237.yml +121 -0
- package/errors/silent-failures/silent-failures-099.yml +104 -0
- package/errors/silent-failures/sparse-checkout-non-cone-gitignore-depth-extra-paths.yml +96 -0
- package/errors/silent-failures/upload-download-artifact-silent-failure-windows-heap-corruption.yml +90 -0
- package/package.json +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
id: runner-environment-181
|
|
2
|
+
title: 'Self-hosted Windows runner steps stuck "Waiting for a runner to pick up this job..." mid-job after v2.321.0 auto-update'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- self-hosted
|
|
7
|
+
- windows
|
|
8
|
+
- runner-update
|
|
9
|
+
- stuck
|
|
10
|
+
- queued
|
|
11
|
+
- multi-step
|
|
12
|
+
- message-queue
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'Waiting for a runner to pick up this job'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'Current runner version.*2\.32[1-9]|v2\.32[1-9]\.'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
error_messages:
|
|
19
|
+
- "Waiting for a runner to pick up this job..."
|
|
20
|
+
root_cause: |
|
|
21
|
+
After the GitHub Actions runner auto-updated to v2.321.0 (released November 2024),
|
|
22
|
+
Windows self-hosted runners began exhibiting a specific failure mode in multi-step
|
|
23
|
+
jobs: the first step of a job executes successfully, but subsequent steps hang
|
|
24
|
+
indefinitely in a queued state showing "Waiting for a runner to pick up this job..."
|
|
25
|
+
|
|
26
|
+
Root cause: The v2.321.0 update introduced a regression in the Windows runner's
|
|
27
|
+
inter-step message queue session management. After completing a step, the runner
|
|
28
|
+
sends a completion signal to the GitHub broker but fails to maintain the job session
|
|
29
|
+
channel open for the next step. GitHub's broker interprets the broken session as
|
|
30
|
+
the job needing a fresh runner allocation — hence the "waiting for runner" message
|
|
31
|
+
for a job that is technically already in-flight.
|
|
32
|
+
|
|
33
|
+
The runner service itself remains running and reports "idle" to GitHub, but the job
|
|
34
|
+
session token has already been invalidated or the queue socket closed. Restarting
|
|
35
|
+
the runner service re-establishes the connection and any subsequent cancel+rerun
|
|
36
|
+
immediately picks up because the session management is freshly initialized.
|
|
37
|
+
|
|
38
|
+
Characteristics:
|
|
39
|
+
- Specific to Windows self-hosted runners (not Ubuntu/macOS hosted runners)
|
|
40
|
+
- Only occurs in jobs with 2 or more steps
|
|
41
|
+
- Step 1 always completes; step 2+ hangs without timeout
|
|
42
|
+
- Cancel + rerun of the stuck job resolves it immediately
|
|
43
|
+
- Runner service restart also resolves it
|
|
44
|
+
- Began appearing after Nov 27, 2024 auto-update on Windows machines
|
|
45
|
+
- Still open as of May 2026 with 90+ reactions (actions/runner#3609)
|
|
46
|
+
|
|
47
|
+
Note: This is distinct from runner-environment-082 (runner stuck between JOBS in
|
|
48
|
+
the same workflow) — this failure occurs between STEPS within a single job.
|
|
49
|
+
fix: |
|
|
50
|
+
Immediate mitigation:
|
|
51
|
+
1. Cancel the stuck run in the GitHub Actions UI and re-run it — the job typically
|
|
52
|
+
completes correctly on rerun because the session is re-initialized.
|
|
53
|
+
2. Restart the GitHub Actions runner service on the Windows host between runs:
|
|
54
|
+
Restart-Service -Name "actions.runner.*"
|
|
55
|
+
(replace wildcard with the actual runner service name from services.msc)
|
|
56
|
+
|
|
57
|
+
Permanent mitigation:
|
|
58
|
+
3. Upgrade the runner to the latest version (v2.334.0+) which includes session
|
|
59
|
+
management improvements. Check https://github.com/actions/runner/releases for
|
|
60
|
+
the latest stable version.
|
|
61
|
+
4. Disable auto-update and pin to a known-good runner version by setting
|
|
62
|
+
`RUNNER_ALLOW_RUNASROOT=false` and specifying the version in your runner
|
|
63
|
+
configuration script.
|
|
64
|
+
5. If operating ARC (Actions Runner Controller), upgrade the controller to use a
|
|
65
|
+
runner image version 2.334.0+ to pick up the fix.
|
|
66
|
+
fix_code:
|
|
67
|
+
- language: yaml
|
|
68
|
+
label: 'Workflow with restart-runner step for self-hosted Windows runners (workaround)'
|
|
69
|
+
code: |
|
|
70
|
+
# Workaround: add a pre-step that verifies the runner session is healthy.
|
|
71
|
+
# This forces a new session token for each major step block.
|
|
72
|
+
jobs:
|
|
73
|
+
build:
|
|
74
|
+
runs-on: [self-hosted, windows]
|
|
75
|
+
steps:
|
|
76
|
+
- name: Verify runner session (workaround for runner#3609)
|
|
77
|
+
run: Write-Host "Runner session active — version $env:RUNNER_VERSION"
|
|
78
|
+
shell: pwsh
|
|
79
|
+
|
|
80
|
+
- uses: actions/checkout@v4
|
|
81
|
+
|
|
82
|
+
- name: Build
|
|
83
|
+
run: dotnet build
|
|
84
|
+
shell: pwsh
|
|
85
|
+
- language: yaml
|
|
86
|
+
label: 'Script to upgrade self-hosted runner to latest version on Windows'
|
|
87
|
+
code: |
|
|
88
|
+
# Run on each Windows runner host to upgrade to the latest runner version.
|
|
89
|
+
# Execute from PowerShell as Administrator.
|
|
90
|
+
|
|
91
|
+
# Stop the runner service
|
|
92
|
+
Stop-Service -Name "actions.runner.*" -Force
|
|
93
|
+
|
|
94
|
+
# Download and replace the runner binary
|
|
95
|
+
$version = (Invoke-RestMethod "https://api.github.com/repos/actions/runner/releases/latest").tag_name.TrimStart('v')
|
|
96
|
+
Invoke-WebRequest "https://github.com/actions/runner/releases/download/v$version/actions-runner-win-x64-$version.zip" -OutFile runner.zip
|
|
97
|
+
Expand-Archive runner.zip -DestinationPath . -Force
|
|
98
|
+
|
|
99
|
+
# Restart the service
|
|
100
|
+
Start-Service -Name "actions.runner.*"
|
|
101
|
+
Write-Host "Runner upgraded to v$version"
|
|
102
|
+
prevention:
|
|
103
|
+
- 'Keep self-hosted runners updated to the latest runner version — regression fixes are frequent'
|
|
104
|
+
- 'Monitor runner logs at _diag/Runner_*.log for session/message-queue errors between steps'
|
|
105
|
+
- 'Set up automatic runner version checks in your infrastructure pipeline'
|
|
106
|
+
- 'For critical pipelines, disable auto-update and pin to a tested runner version then upgrade on schedule'
|
|
107
|
+
- 'On Windows hosts, ensure the runner service account has rights to re-establish named pipe connections between steps'
|
|
108
|
+
docs:
|
|
109
|
+
- url: 'https://github.com/actions/runner/issues/3609'
|
|
110
|
+
label: 'actions/runner#3609: Self-hosted runner stuck "Waiting for runner" in multi-step jobs (90 reactions, open Dec 2024)'
|
|
111
|
+
- url: 'https://github.com/actions/runner/releases'
|
|
112
|
+
label: 'GitHub Actions Runner releases — check for v2.321.0 regression fixes'
|
|
113
|
+
- url: 'https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners'
|
|
114
|
+
label: 'GitHub Docs: About self-hosted runners'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
id: runner-environment-185
|
|
2
|
+
title: "Node.js 18 Removed from Toolcache After EOL — setup-node Falls Back to Slow Download or Times Out"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- nodejs
|
|
7
|
+
- node18
|
|
8
|
+
- toolcache
|
|
9
|
+
- eol
|
|
10
|
+
- setup-node
|
|
11
|
+
- runner-images
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "Unable to find Node version '18|Couldn't find a version that satisfied.*18"
|
|
14
|
+
flags: i
|
|
15
|
+
- regex: 'Acquiring 18\.[0-9]+\.[0-9]+ - (x64|arm64) from.*node-versions'
|
|
16
|
+
flags: i
|
|
17
|
+
- regex: 'Client network socket disconnected before secure TLS connection was established'
|
|
18
|
+
flags: i
|
|
19
|
+
- regex: 'Request timeout.*node.*18|Error.*node.*18.*download'
|
|
20
|
+
flags: i
|
|
21
|
+
error_messages:
|
|
22
|
+
- "Unable to find Node version '18' in the local cache."
|
|
23
|
+
- "Couldn't resolve the package 'node' to a version matching '18'"
|
|
24
|
+
- "Acquiring 18.20.4 - x64 from https://github.com/actions/node-versions/releases/download/18.20.4-xxxxxxxxxxxxxxxx/node-18.20.4-linux-x64.tar.gz"
|
|
25
|
+
- "Request timeout..."
|
|
26
|
+
- "Client network socket disconnected before secure TLS connection was established"
|
|
27
|
+
root_cause: |
|
|
28
|
+
Node.js 18 reached end-of-life on **April 30, 2025**. GitHub subsequently removed it from the
|
|
29
|
+
pre-installed toolcache on all GitHub-hosted runner images (Ubuntu, macOS, and Windows). When
|
|
30
|
+
a workflow specifies `node-version: '18'` or `node-version: '18.x'`, the `actions/setup-node`
|
|
31
|
+
action cannot find Node 18 in the local toolcache and falls back to downloading the binary from
|
|
32
|
+
GitHub's node-versions release page. This remote download frequently times out on hosted runners
|
|
33
|
+
(the GitHub Releases endpoint for old Node versions is rate-limited under load), causing the step
|
|
34
|
+
to fail part-way through setup. On self-hosted runners without unrestricted outbound internet
|
|
35
|
+
access, the fallback download fails immediately with a TLS or connection error. The failure is
|
|
36
|
+
unexpected for teams that previously never pinned a `setup-node` step because Node 18 "just
|
|
37
|
+
worked" from the toolcache — after the removal, those workflows break silently on the next
|
|
38
|
+
runner image update. Distinct from `runner-environment-029` (Node.js 20 toolcache removal)
|
|
39
|
+
and `runner-environment-062` (ubuntu-latest default changing from Node 20 to 22).
|
|
40
|
+
fix: |
|
|
41
|
+
Upgrade to a currently-supported Node.js LTS version. Node.js 22 is the current Active LTS
|
|
42
|
+
(supported until April 2027). Update the `node-version` field in your `setup-node` step and
|
|
43
|
+
verify your `package.json` `engines` field matches the new version:
|
|
44
|
+
fix_code:
|
|
45
|
+
- language: yaml
|
|
46
|
+
label: "Upgrade to Node.js 22 (Active LTS)"
|
|
47
|
+
code: |
|
|
48
|
+
- name: Set up Node.js
|
|
49
|
+
uses: actions/setup-node@v4
|
|
50
|
+
with:
|
|
51
|
+
node-version: '22'
|
|
52
|
+
cache: 'npm'
|
|
53
|
+
- language: yaml
|
|
54
|
+
label: "Pin to .nvmrc / .node-version file for consistency"
|
|
55
|
+
code: |
|
|
56
|
+
# .nvmrc or .node-version in repo root:
|
|
57
|
+
# 22
|
|
58
|
+
|
|
59
|
+
- name: Set up Node.js
|
|
60
|
+
uses: actions/setup-node@v4
|
|
61
|
+
with:
|
|
62
|
+
node-version-file: '.nvmrc'
|
|
63
|
+
cache: 'npm'
|
|
64
|
+
- language: yaml
|
|
65
|
+
label: "Matrix test across supported LTS versions"
|
|
66
|
+
code: |
|
|
67
|
+
strategy:
|
|
68
|
+
matrix:
|
|
69
|
+
node-version: ['20', '22']
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/setup-node@v4
|
|
72
|
+
with:
|
|
73
|
+
node-version: ${{ matrix.node-version }}
|
|
74
|
+
prevention:
|
|
75
|
+
- "Subscribe to Node.js EOL announcements at https://nodejs.org/en/about/previous-releases to know when to migrate"
|
|
76
|
+
- "Use `node-version-file: '.nvmrc'` so your CI and local environments stay in sync automatically"
|
|
77
|
+
- "Enable Dependabot or Renovate to auto-bump `node-version` in workflow files when LTS versions rotate"
|
|
78
|
+
- "Prefer `lts/*` for non-version-sensitive workflows to always track the current LTS without manual updates"
|
|
79
|
+
- "Avoid relying on the toolcache for EOL versions — always add an explicit `setup-node` step"
|
|
80
|
+
docs:
|
|
81
|
+
- url: "https://github.com/actions/setup-node"
|
|
82
|
+
label: "actions/setup-node"
|
|
83
|
+
- url: "https://nodejs.org/en/about/previous-releases"
|
|
84
|
+
label: "Node.js Release Schedule and EOL Dates"
|
|
85
|
+
- url: "https://github.com/actions/setup-node/issues/933"
|
|
86
|
+
label: "setup-node #933: Node 18 toolcache download timeout reports"
|
|
87
|
+
- url: "https://github.com/actions/runner-images"
|
|
88
|
+
label: "actions/runner-images — pre-installed toolcache contents"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
id: runner-environment-186
|
|
2
|
+
title: "windows-2025 Runner Label Unexpectedly Includes VS 2026 — Pinned VS 2022 Paths Break"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- windows
|
|
7
|
+
- windows-2025
|
|
8
|
+
- visual-studio
|
|
9
|
+
- runner-image
|
|
10
|
+
- msbuild
|
|
11
|
+
- cmake
|
|
12
|
+
- breaking-change
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'Cannot find path.*Visual Studio\\2022.*because it does not exist'
|
|
15
|
+
flags: i
|
|
16
|
+
- regex: 'Visual Studio 2022.*not found|MSBuild.*17\.[0-9]+.*not available'
|
|
17
|
+
flags: i
|
|
18
|
+
- regex: 'CMake.*generator.*Visual Studio 17 2022.*not available'
|
|
19
|
+
flags: i
|
|
20
|
+
- regex: 'vswhere.*version.*\[17,18\).*returned empty|No valid VS instances found'
|
|
21
|
+
flags: i
|
|
22
|
+
- regex: 'MSB4019.*Microsoft\.CppBuild\.targets.*was not found'
|
|
23
|
+
flags: i
|
|
24
|
+
error_messages:
|
|
25
|
+
- "Cannot find path 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\MSBuild\\Microsoft\\VC' because it does not exist."
|
|
26
|
+
- "MSB4019: The imported project 'Microsoft.CppBuild.targets' was not found. Confirm that the expression in the Import declaration is correct."
|
|
27
|
+
- "CMake Error: CMake was unable to find a build program corresponding to \"Visual Studio 17 2022\"."
|
|
28
|
+
- "The C++ toolchain version 14.30 targeting platform 'x64' is not installed. Install it from the VS Installer."
|
|
29
|
+
root_cause: |
|
|
30
|
+
In early 2026, some builds of the `windows-2025` runner image label began shipping with
|
|
31
|
+
Visual Studio 2026 (Public Preview) as the primary Visual Studio installation, removing or
|
|
32
|
+
demoting VS 2022 components that had been present in earlier `windows-2025` builds. Developers
|
|
33
|
+
who had explicitly pinned `runs-on: windows-2025` (rather than `windows-latest`) to preserve
|
|
34
|
+
VS 2022 compatibility found their workflows unexpectedly broken, because hardcoded paths to
|
|
35
|
+
`C:\Program Files\Microsoft Visual Studio\2022\...` no longer existed, and CMake generators
|
|
36
|
+
targeting "Visual Studio 17 2022" could not locate a matching installation.
|
|
37
|
+
|
|
38
|
+
This is distinct from the intentional `windows-latest` → VS 2026 migration documented in
|
|
39
|
+
`runner-environment-020`. In that case, developers pinned to a versioned label specifically
|
|
40
|
+
to avoid the change — the versioned label was supposed to be stable. The regression occurred
|
|
41
|
+
because `windows-2025` image builds that included VS 2026 were briefly pushed to the label's
|
|
42
|
+
rotation before being identified and rolled back.
|
|
43
|
+
|
|
44
|
+
Source: actions/runner-images#13638, actions/runner-images#14004.
|
|
45
|
+
fix: |
|
|
46
|
+
Pin to `windows-2022` to guarantee a VS 2022 toolchain for the foreseeable future. Use
|
|
47
|
+
`vswhere.exe` to discover Visual Studio components at runtime rather than hardcoding
|
|
48
|
+
installation paths, which protects against future image changes on any Windows label.
|
|
49
|
+
fix_code:
|
|
50
|
+
- language: yaml
|
|
51
|
+
label: "Pin to windows-2022 for guaranteed VS 2022"
|
|
52
|
+
code: |
|
|
53
|
+
jobs:
|
|
54
|
+
build:
|
|
55
|
+
# Use windows-2022 instead of windows-2025 to guarantee VS 2022 toolchain
|
|
56
|
+
runs-on: windows-2022
|
|
57
|
+
- language: yaml
|
|
58
|
+
label: "Use vswhere to discover MSBuild path at runtime"
|
|
59
|
+
code: |
|
|
60
|
+
- name: Locate MSBuild via vswhere
|
|
61
|
+
id: msbuild
|
|
62
|
+
shell: pwsh
|
|
63
|
+
run: |
|
|
64
|
+
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
|
65
|
+
$msbuild = & $vswhere -latest -requires Microsoft.Component.MSBuild `
|
|
66
|
+
-find MSBuild\**\Bin\MSBuild.exe | Select-Object -First 1
|
|
67
|
+
if (-not $msbuild) { throw "MSBuild not found via vswhere" }
|
|
68
|
+
"path=$msbuild" | Out-File -Append $env:GITHUB_OUTPUT
|
|
69
|
+
|
|
70
|
+
- name: Build solution
|
|
71
|
+
shell: pwsh
|
|
72
|
+
run: |
|
|
73
|
+
& "${{ steps.msbuild.outputs.path }}" MySolution.sln /p:Configuration=Release /p:Platform=x64
|
|
74
|
+
- language: yaml
|
|
75
|
+
label: "Use CMake with dynamic VS version detection"
|
|
76
|
+
code: |
|
|
77
|
+
- name: Configure CMake
|
|
78
|
+
run: |
|
|
79
|
+
# Let CMake auto-detect the installed VS version instead of pinning generator
|
|
80
|
+
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
|
81
|
+
# Avoid: cmake -G "Visual Studio 17 2022" which fails if VS 2022 is absent
|
|
82
|
+
prevention:
|
|
83
|
+
- "Use `vswhere.exe` to locate Visual Studio and MSBuild components at runtime — never hardcode installation paths"
|
|
84
|
+
- "Subscribe to the actions/runner-images releases feed to get notified when versioned labels are updated"
|
|
85
|
+
- "Avoid CMake `-G \"Visual Studio 17 2022\"` in favor of `cmake -B build` with auto-detection when possible"
|
|
86
|
+
- "For CUDA or other toolchain integrations that require a specific VS version, test on a matrix of runner labels to catch regressions early"
|
|
87
|
+
docs:
|
|
88
|
+
- url: "https://github.com/actions/runner-images/issues/13638"
|
|
89
|
+
label: "runner-images #13638: windows-2025 label includes VS2026 regression report"
|
|
90
|
+
- url: "https://github.com/actions/runner-images/issues/14004"
|
|
91
|
+
label: "runner-images #14004: VS 2022 paths missing on windows-2025"
|
|
92
|
+
- url: "https://github.com/microsoft/vswhere"
|
|
93
|
+
label: "vswhere — Visual Studio locator (Microsoft)"
|
|
94
|
+
- url: "https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md"
|
|
95
|
+
label: "Windows Server 2025 Runner Image Readme"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
id: runner-environment-187
|
|
2
|
+
title: "ubuntu-24.04 Runner Missing software-properties-common — add-apt-repository Not Found"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- ubuntu
|
|
7
|
+
- ubuntu-24.04
|
|
8
|
+
- apt
|
|
9
|
+
- ppa
|
|
10
|
+
- runner-image
|
|
11
|
+
- breaking-change
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'add-apt-repository.*not found|command not found.*add-apt-repository'
|
|
14
|
+
flags: i
|
|
15
|
+
- regex: '/bin/(sh|bash).*add-apt-repository.*not found'
|
|
16
|
+
flags: i
|
|
17
|
+
- regex: 'Unable to locate executable file: add-apt-repository'
|
|
18
|
+
flags: i
|
|
19
|
+
- regex: 'No such file or directory.*add-apt-repository'
|
|
20
|
+
flags: i
|
|
21
|
+
error_messages:
|
|
22
|
+
- "/bin/sh: 1: add-apt-repository: not found"
|
|
23
|
+
- "bash: add-apt-repository: command not found"
|
|
24
|
+
- "Error: Unable to locate executable file: add-apt-repository"
|
|
25
|
+
- "/usr/bin/add-apt-repository: No such file or directory"
|
|
26
|
+
root_cause: |
|
|
27
|
+
The `ubuntu-24.04` GitHub-hosted runner image does not pre-install `software-properties-common`,
|
|
28
|
+
the Debian/Ubuntu package that provides the `add-apt-repository` command. On `ubuntu-22.04`
|
|
29
|
+
runners, `software-properties-common` was included by default, so workflows that used
|
|
30
|
+
`add-apt-repository` to add third-party PPAs (e.g., `ppa:deadsnakes/ppa` for older Python
|
|
31
|
+
versions, `ppa:graphics-drivers/ppa` for NVIDIA drivers) worked without any explicit install
|
|
32
|
+
step. After migrating to `ubuntu-24.04` — either explicitly or when `ubuntu-latest` switched
|
|
33
|
+
from 22.04 to 24.04 in March 2025 — these workflows fail immediately with "command not found".
|
|
34
|
+
|
|
35
|
+
The failure message points at the `add-apt-repository` line, but the actual missing dependency
|
|
36
|
+
is the `software-properties-common` package. Other apt commands in the same step (like
|
|
37
|
+
`apt-get update`) succeed, making the root cause less obvious.
|
|
38
|
+
fix: |
|
|
39
|
+
Install `software-properties-common` before calling `add-apt-repository`. For new workflows,
|
|
40
|
+
prefer adding apt source lists directly using a signing key, which does not require
|
|
41
|
+
`software-properties-common` and is more reproducible.
|
|
42
|
+
fix_code:
|
|
43
|
+
- language: yaml
|
|
44
|
+
label: "Install software-properties-common before using add-apt-repository"
|
|
45
|
+
code: |
|
|
46
|
+
- name: Add PPA and install package
|
|
47
|
+
run: |
|
|
48
|
+
sudo apt-get update
|
|
49
|
+
sudo apt-get install -y software-properties-common
|
|
50
|
+
sudo add-apt-repository -y ppa:deadsnakes/ppa
|
|
51
|
+
sudo apt-get update
|
|
52
|
+
sudo apt-get install -y python3.11 python3.11-venv
|
|
53
|
+
- language: yaml
|
|
54
|
+
label: "Preferred: add repository via source list (no software-properties-common needed)"
|
|
55
|
+
code: |
|
|
56
|
+
- name: Add repository via signed source list
|
|
57
|
+
run: |
|
|
58
|
+
# Download and install the repository GPG key
|
|
59
|
+
curl -fsSL https://example.com/gpg.key \
|
|
60
|
+
| sudo gpg --dearmor -o /usr/share/keyrings/example-archive-keyring.gpg
|
|
61
|
+
|
|
62
|
+
# Add the apt source list with the key reference
|
|
63
|
+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/example-archive-keyring.gpg] \
|
|
64
|
+
https://example.com/apt stable main" \
|
|
65
|
+
| sudo tee /etc/apt/sources.list.d/example.list > /dev/null
|
|
66
|
+
|
|
67
|
+
sudo apt-get update
|
|
68
|
+
sudo apt-get install -y example-package
|
|
69
|
+
- language: yaml
|
|
70
|
+
label: "Conditionally install software-properties-common (ubuntu-24.04 only)"
|
|
71
|
+
code: |
|
|
72
|
+
- name: Install apt prerequisites
|
|
73
|
+
run: |
|
|
74
|
+
# software-properties-common is not pre-installed on ubuntu-24.04
|
|
75
|
+
sudo apt-get install -y software-properties-common
|
|
76
|
+
prevention:
|
|
77
|
+
- "Do not rely on `software-properties-common` being pre-installed — always add it as an explicit apt-get install step"
|
|
78
|
+
- "Prefer direct apt source list additions (with GPG key dearmoring) over PPAs for better reproducibility on ubuntu-24.04"
|
|
79
|
+
- "Verify pre-installed packages when migrating runner labels — check https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md"
|
|
80
|
+
- "Test workflows explicitly on ubuntu-24.04 before relying on ubuntu-latest defaulting to 24.04"
|
|
81
|
+
- "Use `apt-get install -y --no-install-recommends` to keep explicit and minimal dependencies"
|
|
82
|
+
docs:
|
|
83
|
+
- url: "https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md"
|
|
84
|
+
label: "Ubuntu 24.04 Runner Image Readme — pre-installed packages list"
|
|
85
|
+
- url: "https://github.com/actions/runner-images/issues/9848"
|
|
86
|
+
label: "runner-images #9848: ubuntu-latest migration to ubuntu-24.04 tracking issue"
|
|
87
|
+
- url: "https://manpages.ubuntu.com/manpages/noble/man1/add-apt-repository.1.html"
|
|
88
|
+
label: "add-apt-repository man page (Ubuntu Noble)"
|
|
89
|
+
- url: "https://help.launchpad.net/Packaging/PPA/InstallingSoftware"
|
|
90
|
+
label: "Launchpad PPA Installation Guide"
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
id: runner-environment-183
|
|
2
|
+
title: "setup-java JAVA_HOME stripped by sudo env_reset on Ubuntu — wrong JDK used silently"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- setup-java
|
|
7
|
+
- sudo
|
|
8
|
+
- java
|
|
9
|
+
- ubuntu
|
|
10
|
+
- env-reset
|
|
11
|
+
- sudoers
|
|
12
|
+
- java-home
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'error: invalid target release: \d+'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: '(bad source file|class file has wrong version).*\d+\.\d+'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
error_messages:
|
|
19
|
+
- "error: invalid target release: 25"
|
|
20
|
+
- "error: invalid target release: 21"
|
|
21
|
+
- "error: invalid target release: 23"
|
|
22
|
+
- "class file has wrong version"
|
|
23
|
+
root_cause: |
|
|
24
|
+
Ubuntu's sudoers policy includes `env_reset` and `secure_path` by default. When a
|
|
25
|
+
workflow step runs any command via `sudo` (e.g., `sudo apt-get install ...`,
|
|
26
|
+
`sudo ant build`, `sudo mvn package`), the environment is completely reset: PATH
|
|
27
|
+
reverts to the sudoers secure_path and JAVA_HOME is cleared.
|
|
28
|
+
|
|
29
|
+
Because the runner image has JDK 17 registered as the system default via
|
|
30
|
+
`update-alternatives`, any subsequent Java invocation under sudo — including
|
|
31
|
+
tool-wrapped invocations via Debian-packaged `ant` (which uses `java-wrappers.sh`
|
|
32
|
+
to detect Java through system alternatives) — silently uses JDK 17 regardless of
|
|
33
|
+
what `actions/setup-java` configured.
|
|
34
|
+
|
|
35
|
+
This causes silent failures when the build silently compiles against JDK 17 and
|
|
36
|
+
produces wrong artifacts, and explicit errors when the requested JDK is newer
|
|
37
|
+
than 17 and javac refuses with "error: invalid target release: N".
|
|
38
|
+
|
|
39
|
+
The root cause is not a bug in setup-java — it correctly sets JAVA_HOME and PATH
|
|
40
|
+
via $GITHUB_ENV / $GITHUB_PATH, which only apply to non-sudo process contexts.
|
|
41
|
+
Ubuntu's sudoers env_reset is OS-level behaviour that strips those env variables.
|
|
42
|
+
fix: |
|
|
43
|
+
1. Pass JAVACMD explicitly to sudo: `sudo JAVACMD=$JAVA_HOME/bin/java ant ...`
|
|
44
|
+
(Debian-packaged ant reads JAVACMD before system alternatives)
|
|
45
|
+
2. Register the setup-java JDK as the system default before any sudo steps:
|
|
46
|
+
sudo update-alternatives --install /usr/bin/java java "$JAVA_HOME/bin/java" 2000
|
|
47
|
+
sudo update-alternatives --set java "$JAVA_HOME/bin/java"
|
|
48
|
+
3. Avoid running Java build tools via sudo entirely — install build dependencies
|
|
49
|
+
first, then run the build as the runner user (without sudo).
|
|
50
|
+
4. Use `sudo -E` to preserve the current environment (requires sudoers NOPASSWD
|
|
51
|
+
with env_keep or SETENV; not available by default on GitHub-hosted runners).
|
|
52
|
+
fix_code:
|
|
53
|
+
- language: yaml
|
|
54
|
+
label: "Workaround: pass JAVACMD explicitly to sudo ant/maven"
|
|
55
|
+
code: |
|
|
56
|
+
- name: Setup Java
|
|
57
|
+
uses: actions/setup-java@v4
|
|
58
|
+
with:
|
|
59
|
+
java-version: '25'
|
|
60
|
+
distribution: temurin
|
|
61
|
+
|
|
62
|
+
# Debian ant uses java-wrappers which ignores JAVA_HOME — pass JAVACMD directly
|
|
63
|
+
- name: Build with ant (sudo)
|
|
64
|
+
run: sudo JAVACMD=$JAVA_HOME/bin/java ant build
|
|
65
|
+
|
|
66
|
+
- language: yaml
|
|
67
|
+
label: "Workaround: register JDK as system default before sudo steps"
|
|
68
|
+
code: |
|
|
69
|
+
- name: Setup Java
|
|
70
|
+
uses: actions/setup-java@v4
|
|
71
|
+
with:
|
|
72
|
+
java-version: '25'
|
|
73
|
+
distribution: temurin
|
|
74
|
+
|
|
75
|
+
- name: Register JDK as system default (for sudo)
|
|
76
|
+
run: |
|
|
77
|
+
sudo update-alternatives --install /usr/bin/java java "$JAVA_HOME/bin/java" 2000
|
|
78
|
+
sudo update-alternatives --set java "$JAVA_HOME/bin/java"
|
|
79
|
+
sudo update-alternatives --install /usr/bin/javac javac "$JAVA_HOME/bin/javac" 2000
|
|
80
|
+
sudo update-alternatives --set javac "$JAVA_HOME/bin/javac"
|
|
81
|
+
|
|
82
|
+
- name: Build (sudo now uses correct JDK)
|
|
83
|
+
run: sudo ant build
|
|
84
|
+
|
|
85
|
+
- language: yaml
|
|
86
|
+
label: "Best practice: separate install from build to avoid sudo"
|
|
87
|
+
code: |
|
|
88
|
+
- name: Install build dependencies
|
|
89
|
+
run: sudo apt-get install -y build-essential
|
|
90
|
+
|
|
91
|
+
- name: Setup Java
|
|
92
|
+
uses: actions/setup-java@v4
|
|
93
|
+
with:
|
|
94
|
+
java-version: '25'
|
|
95
|
+
distribution: temurin
|
|
96
|
+
|
|
97
|
+
# No sudo here — JAVA_HOME is intact
|
|
98
|
+
- name: Build
|
|
99
|
+
run: ant build
|
|
100
|
+
prevention:
|
|
101
|
+
- "Avoid running Java build tools (ant, mvn, gradle) via sudo — install OS dependencies before setup-java, build without sudo"
|
|
102
|
+
- "After setup-java, verify sudo sees the correct JDK: sudo java -version"
|
|
103
|
+
- "For Debian-packaged tools (apt install ant), always pass JAVACMD=$JAVA_HOME/bin/java when invoking via sudo"
|
|
104
|
+
- "If sudo is unavoidable, register the JDK via update-alternatives immediately after setup-java"
|
|
105
|
+
docs:
|
|
106
|
+
- url: "https://github.com/actions/setup-java/issues/997"
|
|
107
|
+
label: "ubuntu-latest uses wrong JDK version under sudo (setup-java#997)"
|
|
108
|
+
- url: "https://github.com/actions/setup-java/pull/1013"
|
|
109
|
+
label: "Update README for Ubuntu sudo JAVA_HOME behavior (setup-java PR#1013)"
|
|
110
|
+
- url: "https://manpages.ubuntu.com/manpages/noble/en/man5/sudoers.5.html"
|
|
111
|
+
label: "sudoers(5) — env_reset and secure_path"
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
id: runner-environment-184
|
|
2
|
+
title: "setup-python free-threaded Python (3.13t/3.14t) on windows-11-arm64 installs broken 0-byte python.exe symlink"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- setup-python
|
|
7
|
+
- free-threaded
|
|
8
|
+
- python
|
|
9
|
+
- windows-11-arm64
|
|
10
|
+
- symlink
|
|
11
|
+
- arm64
|
|
12
|
+
- reparse-point
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'Fatal Python error: Failed to import encodings module'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'ModuleNotFoundError: No module named .encodings.'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'Remove-Item.*python\.exe.*does not exist'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
error_messages:
|
|
21
|
+
- "Fatal Python error: Failed to import encodings module"
|
|
22
|
+
- "ModuleNotFoundError: No module named 'encodings'"
|
|
23
|
+
- "Remove-Item : Cannot find path '...\\arm64-freethreaded\\python.exe' because it does not exist."
|
|
24
|
+
- "Error happened during pip installation / upgrade"
|
|
25
|
+
root_cause: |
|
|
26
|
+
The `win32-arm64-freethreaded` distribution zip for Python 3.13t and 3.14t packages
|
|
27
|
+
`python.exe` and `python3.exe` as Windows reparse points (symlinks) pointing to
|
|
28
|
+
`python3.13t.exe` / `python3.14t.exe`.
|
|
29
|
+
|
|
30
|
+
When actions/setup-python extracts and copies the zip contents to the tool cache on
|
|
31
|
+
`windows-11-arm64`, the symlink target is not found at the expected relative path —
|
|
32
|
+
the copy operation leaves a dangling 0-byte reparse point (`-a---l 0 python.exe`)
|
|
33
|
+
instead of a real executable.
|
|
34
|
+
|
|
35
|
+
`setup.ps1:131` then fails to Remove-Item the dangling reparse point (PowerShell
|
|
36
|
+
cannot delete it because the path resolves as non-existent), and the tool cache
|
|
37
|
+
entry has no working Python interpreter. When the action invokes the installed
|
|
38
|
+
python, it immediately crashes with "Fatal Python error: Failed to import encodings
|
|
39
|
+
module" because the 0-byte stub cannot locate its stdlib.
|
|
40
|
+
|
|
41
|
+
Non-free-threaded arm64 builds (3.11, 3.12, 3.13, 3.14) are not affected — only
|
|
42
|
+
the `*t` (free-threaded / GIL-free) variants hit this issue on windows-11-arm64.
|
|
43
|
+
fix: |
|
|
44
|
+
1. Workaround: Use the non-free-threaded variant (3.13 instead of 3.13t) unless
|
|
45
|
+
the GIL-free runtime is explicitly required.
|
|
46
|
+
2. Workaround for arm64 only: Install free-threaded Python from NuGet, which
|
|
47
|
+
ships real executables instead of symlinks. Gate on runner.arch == 'ARM64'.
|
|
48
|
+
3. Wait for actions/setup-python to land a fix that correctly resolves Windows
|
|
49
|
+
reparse points in free-threaded zip distributions (tracked in setup-python#1307).
|
|
50
|
+
fix_code:
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: "Workaround: use non-free-threaded Python on windows-11-arm64"
|
|
53
|
+
code: |
|
|
54
|
+
- uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
# Avoid '3.13t' / '3.14t' on windows-11-arm64 — use standard variant
|
|
57
|
+
python-version: '3.13'
|
|
58
|
+
|
|
59
|
+
- language: yaml
|
|
60
|
+
label: "Workaround: install free-threaded Python via NuGet on ARM64"
|
|
61
|
+
code: |
|
|
62
|
+
- name: Setup Python (non-ARM64)
|
|
63
|
+
if: runner.arch != 'ARM64'
|
|
64
|
+
uses: actions/setup-python@v5
|
|
65
|
+
with:
|
|
66
|
+
python-version: '3.13t'
|
|
67
|
+
|
|
68
|
+
- name: Install free-threaded Python via NuGet (windows-11-arm64 workaround)
|
|
69
|
+
if: runner.os == 'Windows' && runner.arch == 'ARM64'
|
|
70
|
+
run: |
|
|
71
|
+
nuget install python -Version 3.13.3t -OutputDirectory "$env:RUNNER_TEMP\nuget" -NonInteractive
|
|
72
|
+
$pythonDir = Get-ChildItem "$env:RUNNER_TEMP\nuget" -Filter "python.3*" | Select-Object -First 1
|
|
73
|
+
Add-Content $env:GITHUB_PATH "$($pythonDir.FullName)\tools"
|
|
74
|
+
Add-Content $env:GITHUB_PATH "$($pythonDir.FullName)\tools\Scripts"
|
|
75
|
+
|
|
76
|
+
- language: yaml
|
|
77
|
+
label: "Verification step: confirm Python works after setup"
|
|
78
|
+
code: |
|
|
79
|
+
- uses: actions/setup-python@v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: '3.13t'
|
|
82
|
+
|
|
83
|
+
- name: Verify Python installation
|
|
84
|
+
run: |
|
|
85
|
+
python --version
|
|
86
|
+
python -c "import sys; print(sys.version, sys._is_gil_enabled())"
|
|
87
|
+
prevention:
|
|
88
|
+
- "Do not use free-threaded Python variants (3.13t, 3.14t) on windows-11-arm64 until setup-python#1307 is resolved"
|
|
89
|
+
- "Gate free-threaded Python tests: run on ubuntu-latest or windows-latest (x64), avoid windows-11-arm64 for *t variants"
|
|
90
|
+
- "Add a verification step (python -c 'import sys') after setup-python to catch broken installs before test steps"
|
|
91
|
+
- "Follow setup-python#1307 for the official fix — upgrade as soon as a patched version is released"
|
|
92
|
+
docs:
|
|
93
|
+
- url: "https://github.com/actions/setup-python/issues/1307"
|
|
94
|
+
label: "setup-python fails for free-threaded Python (3.13t/3.14t) on windows-11-arm64 (setup-python#1307)"
|
|
95
|
+
- url: "https://github.com/onnx/onnx/pull/7869"
|
|
96
|
+
label: "Install free-threaded Python from NuGet on windows-11-arm (workaround reference)"
|
|
97
|
+
- url: "https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython"
|
|
98
|
+
label: "Python 3.13 — Free-threaded CPython documentation"
|