`supabase status` spins at ~160% CPU forever when stdout and stderr share a pipe whose reader closes early
メンテナーはふだん 1 日以内に返信
@7ttp がすでに取り組んでいます。
2026年9月27日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 67/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 2.4k
- フォーク
- 533
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 322
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
supabase/cli のほかの issue
-
🐛 Bug supabase/cli
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructive再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン✨ Feature supabase/cli
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
stack: the HTTP gateway closes idle keep-alive connections after 5 s, so a client whose event loop is blocked gets ECONNRESET (`fetch failed`) on its next request対応中かも @7ttp が 9 日前に担当しました。 オープン🐛 Bug supabase/cli
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
📘 Docs supabase/cli
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
supabase/cli#6974 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
🐛 Bug supabase/cli
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
alunduil/projects-v2-sync#21 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
christopher-buss/eslint-plugin-flawless#72 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openwatersio/slackwater-database#281 ·
メンテナーはふだん 1 日以内に返信