`supabase status` spins at ~160% CPU forever when stdout and stderr share a pipe whose reader closes early
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 67/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Start by reproducing npx supabase status 2>&1 | head -3 and compare it with the non-hanging commands listed in the issue. Trace the supabase status handling of stdout and stderr when the shared pipe closes early. Done means the CLI exits instead of spinning after an EPIPE, while normal output and draining consumers still complete.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- Supabase CLI 2.116.0 (npm
supabase,@supabase/cli-darwin-arm64); also observed on 2.118.0 - macOS 27.0 (26A428), Apple Silicon (arm64)
- Local stack running (
supabase start)
Steps to reproduce
npx supabase status 2>&1 | head -3
Expected
head prints three lines and exits; the CLI receives EPIPE/SIGPIPE on its next write and exits.
Actual
head exits, but the CLI process never does. It stays at 157-161% CPU until killed. sample shows the main thread looping in kevent64. Because the shell waits on every member of a pipeline, the command never completes. One background invocation ran for 14 hours before it was noticed.
Measurements (each run killed by a watchdog after 15-25 s)
| Command | Result |
|---|---|
npx supabase status 2>&1 | head -3 |
hangs, 159.8% CPU after 24 s |
npx supabase status 2>&1 | grep -q Stopped |
hangs, 157.5% CPU |
node_modules/@supabase/cli-darwin-arm64/bin/supabase status 2>&1 | head -1 |
hangs, 161.2% CPU |
npx supabase status 2>/dev/null | head -3 |
exits 0 |
npx supabase status 2>&1 >/dev/null | head -1 |
exits 0 |
npx supabase status 2>&1 | cat >/dev/null |
exits 0 |
X=$(npx supabase status -o json 2>/dev/null) |
exits 0 |
The hang requires both stdout and stderr in the same pipe, with a reader that closes before the CLI has finished writing. Piping only one stream, or draining everything, exits normally. Setting SUPABASE_NO_UPDATE_NOTIFIER=1 does not change the result.
Suggested fix
Exit (or stop writing) when a write to stdout or stderr fails with EPIPE, rather than retrying in the event loop.
Workaround
Capture the whole output first (X=$(supabase status -o json 2>/dev/null)) or redirect to a file, then read that.
- Lingua principale
- TypeScript
- Stelle
- 2.4k
- Fork
- 526
- Merge medio
- 1g 38m
- PR unite (30g)
- 271
Preparare l'ambiente
- 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 supabase/cli
-
🐛 Bug supabase/cli
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug supabase/cli
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
supabase/cli#6847 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
✨ Feature supabase/cli
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
bug supabase/cli
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
test new accepts parent-directory names and creates files outside supabase/testsForse già presa @7ttp l’ha presa 5 giorni fa. Aperta🐛 Bug supabase/cli
supabase/cli#6742 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di supabase/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/vscode-livepreview#876 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"ApertaNeeds Triage Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wso2/product-integrator#2585 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Telemundo West sdApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
design
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MTES-MCT/monitor-field#119 ·
I maintainer di solito rispondono entro 1 giorno