Skip to content

Commit 7274995

Browse files
fix(ci): increase apt retry timeout to prevent kill EPERM crash
Restore timeout_minutes from 3 to 5 for the apt-get retry step, and add retry_on: error to only retry on command failure, not timeout. The 3-minute timeout was too tight: DPkg::Lock::Timeout=120 means apt-get can legitimately take up to 120s waiting for the dpkg lock on each of the two sudo calls (update + install). With slow mirrors on top, total time can approach or exceed 180s, triggering the nick-fields/retry timeout. When the timeout fires, the action tries to process.kill() the sudo child process, but since sudo runs as root and the runner runs as admin, Node.js gets EPERM — a known upstream bug (nick-fields/retry#124). The action crashes instead of retrying. With timeout_minutes: 5 (300s), even worst-case lock wait (240s) + slow install (30s) = 270s fits with 30s headroom. apt-get resolves on its own before the timeout fires, so the kill path is never hit. Adding retry_on: error ensures retries only happen on actual apt failures (mirror desync, lock timeout), not on the retry-action's own timeout — which would crash with EPERM anyway. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent cc4cc5c commit 7274995

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/actions/setup-e2e-env/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ runs:
116116
if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' && runner.os == 'Linux' }}
117117
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
118118
with:
119-
timeout_minutes: 3
119+
timeout_minutes: 5
120120
max_attempts: 3
121121
retry_wait_seconds: 30
122+
retry_on: error
122123
on_retry_command: sudo apt-get clean
123124
command: |
124125
set -euo pipefail

0 commit comments

Comments
 (0)