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

Offen
#471 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@ThomasK33 arbeitet bereits daran.

Seit 05.11.2026.

  • #690 von @ThomasK33 — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
go
Bereich
testing

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Go
Sterne
0
Forks
0
Ø Merge
6 Std. 16 Min.
Gemergte PRs (30 T.)
243

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus coder/openstorage

Alle Issues in coder/openstorage

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.