`reflex run --json` ignores SIGINT sent to its pid; under supervisord stopsignal=INT the app is orphaned and blocks the restart
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
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 startfails 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/processandKillSignal=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
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di reflex-dev/reflex
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reflex-dev/reflex#7561 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
npm: source-only hot reloads still reinstall packages because the rendered package.json has `devDependencies: {}` while the on-disk one has no key (residual of #7235)Forse già presa @harsh21234i l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reflex-dev/reflex#7480 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
reflex-dev/reflex#7260 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
reflex-dev/reflex#7148 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ClientStateVar: a component that mounts while the value is non-default never re-renders on the push back to the defaultForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
reflex-dev/reflex#6823 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di reflex-dev/reflex
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Graphify-Labs/graphify#4524 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
topoteretes/cognee#5982 ·
I maintainer di solito rispondono entro 1 giorno
-
Patches of derivations with `__structuredAttrs` are ignoredForse già presa @KiaraGrouwstra l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
nix-community/vulnix#184 ·
-
New InternshipApertanew_internship
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
aws-samples/sample-per-model-bedrock#295 ·
I maintainer di solito rispondono entro 1 giorno