ci: Rust (Windows) job intermittently lost the runner after 50 min (8 times since 2026-11-15)
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- github-actions, rust
- Domínio
- ci-cd, testing-qa
Direção de pesquisa
Start by reading atlas_core::sys::kill_tree and its Windows descendants and force_kill logic, then trace the callers crew::proc::run_bounded and crew::engine::TurnProc. The issue identifies the suspected process ID reuse bug and describes a proposed fix; done means applying that fix and checking whether the Windows runner losses continue. If they do, add step timeouts and log upload as the issue suggests.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What
The job Rust (Windows, full workspace) (ci.yml → rust-gate, cargo nextest on windows-latest) sometimes never finishes: it ends exactly 50:00 min after it starts with the annotation "The hosted runner lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.". No log is kept for the job (BlobNotFound), the Run ./.github/actions/rust-gate step is in_progress forever. A normal run takes 5–9 min; a rerun of the same commit passes.
Evidence (observed)
Scan of every ci.yml run since 2026-11-01 (631 Windows jobs that completed, via gh api .../actions/runs/<id>/jobs):
| started (UTC) | run | head | what |
|---|---|---|---|
| 11-15 01:00 | 43660731836 | af11513b | PR |
| 11-15 04:09 | 43675462339 | 08a6ccd2 | PR |
| 11-15 22:53 | 43771698009 | 0e292a3c | PR #460 (diff: one taskcache test file) |
| 11-16 11:17 | 43854338812 | 4303661f | main dispatch (#424 merge) |
| 11-16 14:22 | 43885042374 | e041082a | PR perf/lazy-hidden-webviews (desktop-only diff) |
| 11-16 21:34 | 43961249893 | d26c1780 | PR #514 |
plus the first attempts of #507 (6a92ff64, 20:21) and #512 (962e4e78, 21:31) that were overwritten by their reruns: 8 incidents.
- None before 2026-11-15 01:00 UTC in 316 earlier jobs; 6 of the 319 after (about 2 %). Every hung head contains
76eee2ce(#335) and the batch merged with it (21:50–21:57 -03 on 11-14: #332, #335, #338, #341, #342, #344, #345, #334, #327); the hung heads' diffs against main are unrelated to each other, so the cause is in main's code, not in a PR. - The runner image (
windows-2025-vs2026), runner (2.338.2) and Hosted Compute Agent (20261103.629) are the same in good and bad runs (logs of successful runs on 11-14, 11-15, 11-16): not an image rollout. - #424 is not the cause: its first hang (
0e292a3c,af11513b,08a6ccd2) predates it, and almost all of its tests arecfg(unix).
Suspect (code defect proven by reading; link to the runner loss is inferred)
atlas_core::sys::kill_tree(root) on Windows (used by crew::proc::run_bounded, crew::engine::TurnProc, the pty control, the language servers):
- it called
descendants(root, rows)which didborn(p) = start_time_secs(p).unwrap_or(0). For a root that has already exited (callers end the tree afterwait_with_output)born(root)was 0, so every process whose recorded parent pid equals that number passed theborn(child) >= born(parent)guard. Windows keepsppidafter the parent ends and reuses pids: any older process whose original parent had the same number (the CI runner's own children are such candidates) was killed withTerminateProcess; force_kill(root)was also called on a pid whose process had ended: afterrun_boundedconsumed the child (wait_with_output) its handle was closed and the number belongs to the next process.
#335 (TurnProc::kill_tree) and #352 (run_bounded → Tree::kill, git/gh calls of the crew) added these callers on Windows around the first incident. Precedent: #223 (kill_uid ending every process of the runner's user).
Not proven: no log of a hung job survives, so it is not known which process was ended, and which test ran. The Windows-visible tests that reach these callers are crew::project, crew::runner::github, gitrun, the pty/hostd Windows tests and the lsp server unit tests (most crew tests are cfg(unix)).
Other candidates checked (not the cause)
Every other kill in the workspace that a Windows test can reach acts on a pid its test spawned or one verified by name/start time (kill_orphans, kill_prior, retire_hostd, hygiene::reap start-time recheck, tunnel adopt is_ssh_name, cleanup_lock, desktop_agent::terminate is unix-only); port_conflict's fake pids only reach classify, never a kill; hostd_windows.rs waits are bounded (ping -n 30/60, timeouts).
Fix
PR: root without a creation time has no tree; caller and its ancestors never in a tree; run_bounded keeps the child's handle until it ended the tree. If the 50-minute losses continue after this, the next step is a step-level timeout-minutes and nextest --no-capture log upload on the Windows job so a loss leaves a log.
Separate failure, same day
runtime::port_conflict::tests::a_holder_in_our_pid_tree_is_own_and_anything_else_is_foreign on PR #514: classify treats pid == std::process::id() as own, the test calls 900 "somebody else's"; Windows pids are small multiples of 4, so a test process numbered 900 fails line 128 (the 900 assertion, which only fails when pid == own pid). Fixed in the same PR (classify_as(me, …)).
- Linguagem predominante
- Rust
- Estrelas
- 3
- Forks
- 1
- Merge médio
- 9h 51min
- PRs com merge (30d)
- 310
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codeatlasdev/atlas
-
type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
codeatlasdev/atlas#597 ·
Mantenedores costumam responder em até 1 dia
-
area: ci os: linux type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
codeatlasdev/atlas#496 ·
Mantenedores costumam responder em até 1 dia
-
area: ci type: bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
codeatlasdev/atlas#596 ·
Mantenedores costumam responder em até 1 dia
-
os: linux type: bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
codeatlasdev/atlas#591 ·
Mantenedores costumam responder em até 1 dia
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Abertaarea: ci os: windows type: bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 56/100
codeatlasdev/atlas#550 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de codeatlasdev/atlas
Issues semelhantes
-
<input type="number"> misses text-entry leaf sizing in layoutTalvez já em andamento @GoCoder7 assumiu hoje. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
DioxusLabs/blitz#1675 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: NP 管理器文件编辑器里删除键无效Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
metasequoiaime/msime#11666 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
camunda/orchestration-cluster-api-rust#179 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
bug drawings help wanted ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
userFRM/egui-charts#3479 ·
Mantenedores costumam responder em até 1 dia