Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Interrupting ctrace leaves the running tool and its run directory behind

Abierto
#188 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@SizzleUnrlsd ya está trabajando en esto.

Desde el 16/10/2026.

  • #206 de @SizzleUnrlsd — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
50/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp
Área
backend, cli

Línea de trabajo

Start with the process spawning in include/Process/UnixProcess.hpp around lines 68-77, where the tool gets its own process group, and with the RunDirectory cleanup. Then find where POST /shutdown drains server mode so the signal path can reuse it. Done means that after Ctrl+C or SIGTERM no tool process or run directory remains, the exit codes are 130 and 143, and an integration test with a hung fake tool checks both.

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

Descripción

bug severity/major

Interrupting ctrace while an external tool runs stops ctrace but not the tool: the tool keeps running, orphaned, and the run directory stays in the temporary directory.

Observed

main eba7f88, macOS 15.6.1. A fake cppcheck that sleeps 600 s is first in PATH; ctrace --input ok.c --invoke cppcheck is interrupted after 2 s:

Signal Sent to ctrace Tool process Run directory
SIGINT (Ctrl+C) the process group exits 130 within 1 s still running left behind
SIGTERM the process group exits 143 at once still running left behind
SIGINT ctrace only exits 130 within 1 s still running left behind
SIGTERM ctrace only exits 143 at once still running left behind

Each interrupted run leaves one ctrace-cppcheck-* directory in $TMPDIR. A server stopped with SIGINT or SIGTERM also exits at once, without the drain that POST /shutdown performs.

Cause

  • ctrace installs no signal handler: SIGINT and SIGTERM take their default action, so no destructor runs (RunDirectory is not removed).
  • With a timeout, which every external tool has by default, the tool is started in its own process group (include/Process/UnixProcess.hpp:68-77), so the terminal's Ctrl+C does not reach it, and nothing kills it when ctrace dies.

Fix

On SIGINT and SIGTERM, stop the running tools (SIGTERM to their process group, then SIGKILL after a grace period), let the run directories be removed, and exit with 128 + the signal. In server mode, start the same drain as POST /shutdown.

Acceptance

  • After Ctrl+C or SIGTERM during a run, no tool process and no run directory remain.
  • The exit code is 130 for SIGINT and 143 for SIGTERM.
  • An integration test interrupts a run with a hung fake tool and checks both.

Found by the resilience campaign (docs/quality/resilience.md, scenarios C31 to C34, S18, S21).

Lenguaje dominante
C++
Estrellas
5
Forks
4
Merge medio
1 h 57 min
PR fusionados (30 d)
88

Preparar el entorno

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 CoreTrace/coretrace

Todos los issues de CoreTrace/coretrace

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.