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

Abierto
#1,302 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
bash, linux, shell

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C
Estrellas
10
Forks
8
Merge medio
6 h 32 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de FriendsofECCE/ECCE

Todos los issues de FriendsofECCE/ECCE

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.