Ephemeral JIT runner hangs after "Acknowledging runner request" and never exits; job fails with "lost communication" (2.338.0, linux-x64)

未关闭
#4,855 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp, github
领域
ci-cd, devops

调研方向

Start with the runner listener logs and the request acknowledgement and credential token flow described in the report; compare the related issues #4309 and #2040 for clues. The report has no reproducer or named source files, so first trace where the listener waits after acknowledging a request and look for a way to reproduce the hang. Done means the runner starts the worker or exits cleanly when it cannot acquire the job.

由索引模型根据 Issue 内容生成。

描述

Describe the bug

A runner registered with a JIT config (ephemeral, one job) accepts a job and then hangs. The listener's diag log ends at "Acknowledging runner request" and one token-request line. Nothing follows, and no Runner.Worker process is started. In the case we traced, GitHub failed the job about 10 minutes later with "The self-hosted runner lost communication with the server", and the registration was gone afterwards (GET /orgs/{org}/actions/runners/{id} returned 404).

The listener process never exits. It stays alive with 13 threads, its main thread in futex_wait and its TCP connections open, so the service manager never restarts it. Two runners on the same host hung this way about an hour apart. Each stayed hung for 6–7 hours, until we killed it.

To reproduce

We can't reproduce it on demand. Both cases had these conditions:

  • Runner 2.338.0, linux-x64, Ubuntu 24.04, kernel 6.8.
  • Registered via generate-jitconfig. .runner has "ephemeral": true and "disableUpdate": true. Started through runsvc.sh under systemd, one job per start.
  • The job request arrived within about a second of "Listening for Jobs".
  • The runner directory is read-only to the runner user, except _work and _diag. In normal operation this causes only the expected "Read-only file system: .credentials" error after a completed job. Hundreds of jobs a day complete normally on this host.
Expected behavior

The job runs. Or, if the listener cannot acquire it, the listener gives up and exits so the supervisor can restart it.

Runner version / OS

2.338.0, Ubuntu 24.04.4 LTS x86_64

Logs

The listener diag log, last lines. Both instances end the same way:

[17:35:23Z INFO BrokerMessageListener] Session created.
[17:35:23Z INFO Terminal] WRITE LINE: Current runner version: '2.338.0'
[17:35:23Z INFO Terminal] WRITE LINE: 2026-11-11 17:35:23Z: Listening for Jobs
[17:35:23Z INFO JobDispatcher] Set runner/worker IPC timeout to 30 seconds.
[17:35:23Z INFO BrokerMessageListener] Acknowledging runner request '<id>'.
[17:35:23Z INFO CredentialManager] Creating credential type: OAuth
[17:35:23Z INFO RSAFileKeyManager] Loading RSA key parameters from file <runner>/.credentials_rsaparams
[17:35:23Z INFO GitHubActionsService] AAD Correlation ID for this token request: Unknown

Nothing follows these lines, and there is no Worker log.

Job annotation: "The self-hosted runner lost communication with the server. Verify the machine is running and has a healthy network connection. ..."

Possibly related: #4309, #2040.

主要语言
C#
星标
6.4k
派生
1.5k
平均合并
1 天 7 小时
30 天内合并 PR
36

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

actions/runner 的其他 Issue

查看 actions/runner 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。