`supabase status` spins at ~160% CPU forever when stdout and stderr share a pipe whose reader closes early
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 67/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 526
- Merge trung bình
- 1 ngày 38 phút
- Pull request đã merge (30 ngày)
- 271
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của supabase/cli
-
🐛 Bug supabase/cli
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 Bug supabase/cli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
supabase/cli#6847 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
✨ Feature supabase/cli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug supabase/cli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
test new accepts parent-directory names and creates files outside supabase/testsCó thể đã có người làm @7ttp đã nhận 5 ngày trước. Đang mở🐛 Bug supabase/cli
supabase/cli#6742 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-livepreview#876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"Đang mởNeeds Triage Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/product-integrator#2585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Telemundo West sdĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MTES-MCT/monitor-field#119 ·
Maintainer thường phản hồi trong vòng 1 ngày