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

オープン
#1,302 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FriendsofECCE/ECCE のほかの issue

FriendsofECCE/ECCE の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。