run-offload.sh: cancelling a job leaves the remote driver running, holding the slot and building the cancelled commit

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
bash, linux, shell

调研方向

Start with tools/offload/run-offload.sh and trace how it starts the remote bash -s driver and manages the shared slot. Reproduce cancellation and inspect the remote process tree and slot handling; make sure cleanup targets only the job's branch or worktree path. Done means cancelling a wrapper stops its remote driver and test children without affecting other users' jobs.

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

描述

bug

Found while clearing nerdegg's single slot during the 9.6.1 work. It happened twice in one night, to two different people.

tools/offload/run-offload.sh drives the host over ssh. Killing the local wrapper - a cancelled background job, a stopped agent, Ctrl-C - does not stop the remote side. The bash -s -- <ref> <command> driver on the host keeps running, is reparented to init, and carries on. In one case its ctest was still launching tests, including starting ecce-qm runs, well after the local job was gone.

Two consequences:

  • The slot stays occupied by work nobody is waiting for, and other jobs queue behind a ghost.
  • A cancelled job still runs. One of the orphans here was an early build of a commit that had been superseded because it did not compile; had it reached the slot it would have built the broken commit and reported on it.

Cleaning up by hand means killing the remote driver, its orphaned ctest (whose parent is now init, so it does not match the job's process tree) and the remaining test children, by pid.

A trap worth naming in the fix: the obvious clean-up, matching on the tool name (pkill ctest), kills every other user's run on the shared host. Any clean-up must match on the branch or worktree path. One attempt at the broad form was made here and stopped before it executed; it would have destroyed two unrelated jobs.

Suggested fix: have the wrapper trap its own termination and tell the host to kill that job's process group; or have the host write the driver's pid into the slot file so a later job can tell a live holder from a ghost and reclaim the slot.

Related: #1220, #1292 and the #1282 verification were all queued behind the orphans while this was sorted out.

主要语言
C
星标
10
派生
8
平均合并
6 小时 32 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

FriendsofECCE/ECCE 的其他 Issue

查看 FriendsofECCE/ECCE 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

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