docs/runner.md says suspend sends SIGTERM, but suspend freezes the sandbox without any signal
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 1/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
docs/runner.mdを読み、そこにあるsuspendの説明を、issueで観察された動作と比較してください。suspendはシグナルを送信せずにサンドボックスのチェックポイントを作成して凍結し、確実に保持されるのは/workspaceだけです。spec.commandはgolden boot中に実行される可能性があり、再開後に再度実行される場合もあることを明確にするよう、ドキュメントを更新してください。提案されている/suspendエンドポイントは任意の後続作業であり、このドキュメント変更には必要ありません。
索引モデルが issue の本文から書いたものです。
説明
docs/runner.md says "Stop and suspend both deliver SIGTERM to PID 1." In practice, suspend doesn't send any signal. Substrate checkpoints the sandbox and freezes it, so a runner that waits for SIGTERM to flush state never gets the chance. We saw the same on Agent Substrate v0.1.0-gke.1 and v0.3.0.
Example: a command that logs when it starts and when it gets SIGTERM, writing to the durable volume:
apiVersion: ax.io/v1alpha1
kind: Task
metadata:
name: term-test
atespace: default
spec:
image: "<runner image>@sha256:..."
command:
- sh
- -c
- |
log() { echo "$(date +%T) $*" >> /workspace/term.log; }
trap 'log got-SIGTERM; exit 0' TERM
log "started pid=$$"
while true; do sleep 1; done
debug: true
$ ax resume task term-test
$ ax suspend task term-test
$ ax resume task term-test
$ ax ssh term-test -- cat /workspace/term.log
22:25:18 started pid=9
22:26:00 started pid=10
There's no got-SIGTERM line. On v0.3.0 the command simply starts again after resume (new PID), while PID 1 still has the golden boot's start time. On v0.1.0-gke.1 the process memory came back from the golden snapshot instead. Either way, the only thing that reliably survives a suspend is /workspace. Files in /tmp and processes started after the golden boot are gone.
Suggested fix
- Correct
docs/runner.md: suspend is a checkpoint with no signal, only/workspacesurvives, and the command may be started again on resume. It would also help to say plainly thatspec.commandcan run during the golden boot (#428), since that's part of the same picture for runner authors. - If a graceful suspend is wanted, ax could ask the runner before calling
SuspendActor. For example, aPOST /suspendon the runner's port 80 that forwards SIGTERM to the command's process group and waits (with a deadline) for it to exit or acknowledge.
Note: I opened #446 on the assumption that suspend sends SIGTERM. That request still makes sense for stop and delete, but it won't help suspend.
- 主要言語
- Go
- スター
- 14.8k
- フォーク
- 802
- 平均マージ
- 18時間 37分
- マージ済み PR(30日)
- 110
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/ax のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
telemetry: move internal/axattr to internal/telemetry/attr対応中かも @rakyll が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
google/ax#684 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
ax watch hangs forever on a task that doesn't exist再び着手できるかも @erain が 41 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
google/ax#435 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
[Bug]: Agent editor shows empty MCP selection mode as "All" while the backend treats it as none対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
agentscope-ai/AgentTeams#1707 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
blinklabs-io/dingo#6714 ·
メンテナーはふだん 1 日以内に返信
-
kind/cleanup
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
kubernetes-sigs/kueue#19407 ·
メンテナーはふだん 1 日以内に返信
-
flaky-test
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信