Skip to content

Self-hosted runner (macOS/ARM64): Runner.Worker deadlocks at job startup right after creating the results WebSocket (ingest.sock), holding the runner busy #4558

Open

Description

@mfortunas

Describe the bug

On self-hosted macOS/ARM64 runners, Runner.Worker intermittently deadlocks at job startup, immediately after opening the results/live-log WebSocket. The worker process stays alive, keeps renewing the job lease (so GitHub shows the runner busy), but never spawns the first step — blocking all queued jobs for hours until the process is killed.

Runner Version and Platform

  • Runner: 2.335.1 (also reproduced on 2.334.0 — see below)
  • OS: macOS (Darwin 25.5.0), Apple Silicon (M4), self-hosted, running as a launchd service
  • Trigger: normal pull_request CI (matrix of Rust/gate jobs)

What's the expected behavior?

The worker sets up the results WebSocket and proceeds to run the job steps.

Symptom / evidence

The Worker_*.log freezes right after:

[ResultServer] Creating websocket client ...wss://results-receiver.actions.githubusercontent.com/_ws/ingest.sock
...
[JobServerQueue] Stop aggressive process web console line queue.

Then: no further log lines, no child process spawned (checkout never runs), ~0% CPU, for hours. JobDispatcher keeps logging Successfully renew job ..., so the runner reports busy=true to GitHub and no new jobs are dispatched to it.

sample <Runner.Worker pid> (macOS) shows all ~17 threads parked on .NET synchronization primitives and zero threads in socket/network I/O:

main thread: ... RunMain -> [managed] -> ObjectNative::WaitTimeout -> SyncBlock::Wait
             -> Thread::Block -> _pthread_cond_wait -> __psynch_cvwait
aggregate:   ~10x InternalWaitForMultipleObjectsEx, 4x WaitHandleNative::CorWaitOneNative,
             3x CorWaitOnePrioritizedNative, 2x ObjectNative::WaitTimeout - 0x SSLRead/recv

i.e. an internal deadlock, not a network stall (a network hang would show a thread blocked in a socket read).

Ruled out during investigation

  • Network: basic connectivity is fine; a curl WebSocket upgrade to results-receiver.../_ws/ingest.sock returns HTTP 401 in ~0.5s. Thread sample shows no thread doing network I/O.
  • Runner version: downgrading to 2.334.0 hangs identically at the same WebSocket point (both versions contain the same ResultServer/WebSocket code).
  • Thread-pool starvation: DOTNET_ThreadPool_ForceMinWorkerThreads=64 (verified present in the Worker's env) has no effect.

Behaves intermittently — some jobs complete; during bad spells nearly every job hangs at this point. Looks related to #2140 and the (closed) #1496.

Questions

  1. Is there a known deadlock in the results/live-log WebSocket setup path?
  2. Is there a client-side way to disable the live-log WebSocket feed (fall back to HTTP batch upload) as a workaround?

Activity

  1. TingluoHuang commented on Jul 27, 2026

    @TingluoHuang
    Member

    👋 do you have an sample workflow YAML that can repro this issue? 🙇

  2. mfortunas commented on Jul 29, 2026

    @mfortunas
    Author

    Thanks for looking into this, @TingluoHuang!

    We don't have a minimal reproducible workflow, unfortunately — this looks like a race condition tied to the results-WebSocket setup path rather than something we can force deterministically with a specific job/step combination. But we do have real production telemetry that might be more useful than a repro attempt:

    Frequency/timing data (we run a watchdog that detects and restarts hung workers, logging every incident):

    • Over 16 days of observation (2026-07-16 to 2026-07-29) across 3 self-hosted macOS/ARM64 runners in the same repo, we recorded 69 total hangs.
    • 68 of those 69 (98%) happened within a single ~2h17m window on 2026-07-16: 12:50:48–15:07:59 UTC. All 3 runners hung repeatedly and concurrently during that window.
    • Before and after that window, hangs were essentially absent: zero on every other day except one stray occurrence on 2026-07-24, and zero since.
    • Runner version at the time of the burst: 2.335.1. We separately confirmed mid-burst that downgrading to 2.334.0 reproduced the identical hang (see the "Ruled out" section in the issue body), so this isn't version-specific. Our runners have since auto-updated to 2.336.0; given how short-lived the original burst was, we can't yet confidently attribute the quiet period to that update versus the underlying condition simply not recurring.

    This burst-then-silence pattern (a violent concentrated spike, then near-total quiet for 13 days) reads more like a transient issue on the results-WebSocket-serving side than a steady-state client bug that would scale with job volume. If there's a way to check server-side telemetry/incidents for that UTC window, it might correlate.

    Happy to share anything else we have — we don't have per-request IDs since the raw per-job logs from that day were pruned by our own retention policy, but the timeline above is solid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions