Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Process exits 0 (Rust) / hangs (Go) when all listeners fail to bind — defeats Restart=on-failure

Aperta
#30 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, rust

Direzione di ricerca

Inizia da go/main.go:62 e segui i percorsi di avvio dei listener sia nell'implementazione Go sia in quella Rust, concentrandoti su come vengono segnalati i fallimenti di bind. Verifica che i fallimenti dei singoli listener rimangano indipendenti, mentre zero bind riusciti producano un errore e un'uscita rapida con un valore diverso da zero in ciascuna implementazione.

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

Descrizione

Priority: P2 Type: Bug

Summary

If every listener fails to bind (e.g. bad --listen-tcp address plus missing parent directory for --listen-socket), the process ends up serving nothing, but neither implementation signals failure usefully:

  • Rust: both listener tasks log an error and return; main exits with code 0. Under systemd Restart=on-failure, nothing restarts a proxy that serves nothing.
  • Go: startListener logs and returns for each failed listener, but main then blocks on <-ctx.Done() forever (go/main.go:62) — the process looks alive to the supervisor while serving nothing.

Per-listener independent failure is intentional (one listener failing shouldn't kill the other — matches both implementations). The bug is only the all-listeners-failed terminal state.

Affected implementation(s)

  • Go
  • Rust
  • TypeScript (single TCP listener only; worth confirming it exits non-zero on bind failure)

Expected behavior

If zero listeners bound successfully, exit promptly with a non-zero status so a supervisor (Restart=on-failure) restarts it and operators see a failed unit instead of a healthy-looking zombie.

Suggested fix

Have each listener task report whether it bound successfully; after startup (or after all tasks finish), if none bound, log an error and exit(1). Same pattern in both Go and Rust.

Context

Split out from the review follow-ups on PR #27. Related: #25.

Lingua principale
Rust
Stelle
2
Fork
0
Merge medio
9h 35m
PR unite (30g)
6

Guida per i contributori

Apri la guida per i contributori

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 ChainSafe/docker-socket-policy

Tutte le issue di ChainSafe/docker-socket-policy

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.