test(githttp): node-session signal handler ignores inherited SIG_IGN and misses non-signal deaths

Aperta
#471 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ThomasK33 ci sta già lavorando.

Dal 5/11/2026.

  • #690 di @ThomasK33 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
testing

Direzione di ricerca

Read internal/githttp/testnode_linux_test.go and inspect trackNodeSession and killNodesOnSignal; the issue describes the inherited ignored-signal case and the child-process leak when the test process dies without a signal. Start by checking the signal behavior and existing test coverage. Done means ignored signals are not intercepted and Git child processes are handled on non-signal deaths; a linked pull request is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Follow-ups from the clean-context advisory on #461 (the #439 harness fix). Both are in internal/githttp/testnode_linux_test.go.

  1. Inherited ignored signals. trackNodeSession calls signal.Notify for SIGINT, SIGTERM and SIGHUP. That enables a signal even when the test binary started with it ignored (under nohup, or as a background & job in a non-interactive shell, which ignores SIGINT). On such a signal, killNodesOnSignal kills every node session, signal.Reset restores "ignored", and the re-raise does nothing. The test binary keeps running with its nodes dead, and later tests fail confusingly. I saw this in a dogfood run: SIGINT to a backgrounded test binary killed the node, and the test then ran to completion. Fix: skip each signal for which signal.Ignored(sig) is true.
  2. Deaths without a signal: a test panic, the -timeout panic, or SIGKILL of the test binary. Pdeathsig ends serve, but serve's git children keep running. This is not a regression: before #461, serve leaked too.

Trigger: the next change to testNode, any e2e run under nohup, or stray git receive-pack processes on a runner after a timed-out run.

Refs #439


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Lingua principale
Go
Stelle
0
Fork
0
Merge medio
6h 16m
PR unite (30g)
243

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/openstorage

Tutte le issue di coder/openstorage

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.