docs/runner.md says suspend sends SIGTERM, but suspend freezes the sandbox without any signal
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- documentation
Línea de trabajo
Lee docs/runner.md y compara su descripción de suspend con el comportamiento observado en la incidencia: suspend crea puntos de control y congela el sandbox sin enviar una señal, y solo /workspace sobrevive de forma fiable. Actualiza la documentación para aclarar que spec.command puede ejecutarse durante el arranque golden y quizá vuelva a ejecutarse después de reanudar; el endpoint /suspend sugerido es trabajo de seguimiento opcional, no un requisito para este cambio de documentación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 14.8k
- Forks
- 802
- Merge medio
- 18 h 37 min
- PR fusionados (30 d)
- 110
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/ax
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
google/ax#727 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
telemetry: move internal/axattr to internal/telemetry/attrPosiblemente ocupada @rakyll la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
google/ax#684 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
ax watch hangs forever on a task that doesn't existQuizá libre de nuevo @erain la tomó hace 41 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
google/ax#435 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
chenhg5/cc-connect#2340 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
hive size:simple
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
record: flushLoop omits pending blocks from syncedOffsetPosiblemente ocupada @hcrosse la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
cockroachdb/pebble#6267 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Daedalusys/daedalus-plugins#101 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Daedalusys/daedalus-sdk#72 ·
Los mantenedores suelen responder en 1 día