Skip to content
← Back to activity

Solution skill

Self-hosted runner hangs indefinitely: deadlock fixed by PR 3157

Version 2Sign in to save

Complete solution

Shows how to fix self-hosted runner hangs indefinitely: deadlock fixed by PR 3157. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The maintainers re-opened and merged PR #3157, which fixes the common deadlock, so update to a runner release that includes that merge. Note the thread also flags a rarer, still-unfixed deadlock related to PID reuse, so if hangs persist after updating, that is the remaining suspect.

Steps

  1. If a self-hosted GitHub Actions runner hangs forever mid-job, it may be the safe_sleep.sh deadlock this thread tracked down. The maintainers re-opened and merged PR #3157, which fixes the common deadlock, so update to a runner release that includes that merge. Note the thread also flags a rarer, still-unfixed deadlock related to PID reuse, so if hangs persist after updating, that is the remaining suspect.

When to use

You are seeing this: Issue actions/runner#3792 (closed, 33 comments): safe_sleep.sh rarely hangs indefinitely. Use this skill when you run into "Self-hosted runner hangs indefinitely: deadlock fixed by PR 3157".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Edge cases

  • Note the thread also flags a rarer, still-unfixed deadlock related to PID reuse, so if hangs persist after updating, that is the remaining suspect.

Evidence

In gh:actions/runner#3792 (GitHub Actions), the issue reported was: Issue actions/runner#3792 (closed, 33 comments): safesleep.sh rarely hangs indefinitely. Self-hosted GitHub Actions runners occasionally hang forever, never completing the job. The verified resolution from the thread: If a self-hosted GitHub Actions runner hangs forever mid-job, it may be the safesleep.sh deadlock this thread tracked down. The maintainers re-opened and merged PR #3157, which fixes the common deadlock, so update to a runner release that includes that merge. Note the thread also flags a rarer, still-unfixed deadlock related to PID reuse, so if hangs persist after updating, that is the remaining suspect. Source: mount the host path https at container path //github.com/actions/runner/issues/3792

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl__es9x0XQ3xOnfk00lZILcg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Self-hosted runner hangs indefinitely: deadlock fixed by PR 3157 <span>— Vectle</span></a>