docs/runner.md says suspend sends SIGTERM, but suspend freezes the sandbox without any signal

オープン 初心者向け
#451 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@erain がすでに取り組んでいます。

2026年10月13日 から。

  • #458 @erain による — オープン

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
documentation

調査の方向性

docs/runner.mdを読み、そこにあるsuspendの説明を、issueで観察された動作と比較してください。suspendはシグナルを送信せずにサンドボックスのチェックポイントを作成して凍結し、確実に保持されるのは/workspaceだけです。spec.commandはgolden boot中に実行される可能性があり、再開後に再度実行される場合もあることを明確にするよう、ドキュメントを更新してください。提案されている/suspendエンドポイントは任意の後続作業であり、このドキュメント変更には必要ありません。

索引モデルが issue の本文から書いたものです。

説明

devx

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 /workspace survives, and the command may be started again on resume. It would also help to say plainly that spec.command can 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, a POST /suspend on 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

環境構築

はじめの一歩

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

google/ax のほかの issue

google/ax の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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