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

`reflex run --json` ignores SIGINT sent to its pid; under supervisord stopsignal=INT the app is orphaned and blocks the restart

Aperta Adatta ai principianti
#7,509 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@harsh21234i ci sta già lavorando.

Dal 14/10/2026.

  • #7558 di @harsh21234i — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia da packages/reflex-base/src/reflex_base/utils/log.py, in particolare dall’inoltro di SIGTERM alla riga 519 e dalla gestione di KeyboardInterrupt alle righe 520–526. Verifica come il processo supervisore attende il processo figlio e gli invia segnali, quindi riproduci il problema con reflex run --json e inviando SIGINT al suo pid. Il lavoro è completato quando il processo figlio termina rapidamente e il server non continua a essere in esecuzione; esegui di nuovo la matrice di riproduzione dell’issue per verificare il comportamento.

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

Descrizione

Severity: LOW, pre-existing. 0.10.0a2 behaves like a3; 0.9.12 also needs a SIGKILL, but there nothing survives it. Confirmed by an independent verifier (pre-release finding A3-07).

Symptom. kill -INT <pid> of reflex run --json does nothing: the server is still serving 12–210 s later. Every other way of stopping it works quickly:

stop method time to exit
plain reflex run, SIGINT 0.18–0.25 s
--json, SIGTERM to the pid 0.29 s–2 s
--json, SIGINT to the process group (Ctrl-C) 0.27 s
--json, SIGINT to every pid in the tree (systemd's default KillMode=control-group) 0.25 s

Cause. The supervising process catches SIGINT, polls wait4(WNOHANG) for 0.25 s and goes back to a blocking wait without signalling the child. packages/reflex-base/src/reflex_base/utils/log.py:519 forwards only SIGTERM, and :520-526 does except KeyboardInterrupt: continue.

Under supervisord stopsignal=INT (default stopasgroup/killasgroup):

  • the stop waits 10.2 s, then SIGKILLs only the supervisor pid;
  • the inner reflex, the backend worker, bun and node become orphans that keep serving;
  • the next supervisorctl start fails 4× with "Frontend port: 3640 is already in use" and goes FATAL.

With stopasgroup=true it stops in 0.42 s, and with the default TERM config in 0.59 s.

Also affected:

  • systemd with KillMode=mixed/process and KillSignal=SIGINT;
  • proc.send_signal(SIGINT);
  • docker --init (tini) or running as PID 1 (simulated: hung 15 s);
  • timeout --foreground -s INT.

GNU timeout -s INT signals the whole group, so it isn't affected. This contradicts the 0.10.0a1 changelog entry for #7328 ("stops its frontend on SIGTERM and SIGINT without a TTY") for --json.

Fix. Forward SIGINT to the child the same way SIGTERM is forwarded in log.py.

Repro: a3_upgrade/bin/json_matrix.sh a3fast a3 INT-pid:100000 (dir). Evidence: A3-07 in FINDINGS.md.

Lingua principale
Python
Stelle
28.9k
Fork
1.8k
Merge medio
2g 22h
PR unite (30g)
196

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 reflex-dev/reflex

Tutte le issue di reflex-dev/reflex

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.