Worker aborts with V8 OOM in JSON.parse when several exec requests carry large stdin payloads; all leases lost
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/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ệ
- node.js, typescript
Hướng nghiên cứu
Start at the worker and gateway handling for POST /v1/leases/:id/exec, then trace where the request body is materialized and parsed. The issue does not name files or tests, so locate the relevant entry points and existing request-size or concurrency limits first. Done means oversized or concurrent large stdin requests are rejected with a typed error instead of crashing the worker; streaming or preserving leases across restarts are broader alternatives.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
A simlock 0.5.0 worker (Node 22.23.4, macOS, gateway mode) aborts with a V8 out-of-memory error while parsing an incoming message with JSON.parse. This happens when several POST /v1/leases/<id>/exec requests carrying a large stdin (base64 payloads of tens of MB) are in flight at once. Every lease on that worker is lost: in-flight execs return 503 after about 105 s, and later calls get 404 UNKNOWN_LEASE.
Evidence
Crash report node-2026-11-03-144256.ips:
EXC_CRASH (SIGABRT) — abort() called
node::OOMErrorHandler
v8::internal::V8::FatalProcessOutOfMemory
v8::internal::Heap::CollectGarbage
v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath
v8::internal::FactoryBase::NewRawStringWithMap<SeqOneByteString>
v8::internal::JsonParser<unsigned char>::MakeString
v8::internal::JsonParser<unsigned char>::Parse
v8::internal::Builtin_JsonParse
- Worker log: the next start at 13:42:56Z logs
Recovered stale daemon socket/Daemon startedand re-establishes the gateway uplink.launchctlreports the last exit as-6. - Gateway log for one lease:
device.exec→POST …/exec 503after 105,242 ms → the client releases →POST …/exec 404 UNKNOWN_LEASE. - Workload: a tester-army
e2esuite with 10 workers. Each worker uploads an ~89 MB fixture archive (deflated, base64 instdin) throughexec(simctl spawn <helper> untar) at the same moment. The host's load average was about 70. - The same burst also produced Cloudflare
524s and connection resets on other runs, because each exec holds a single long request.
Root cause
The worker (or its gateway uplink) materialises each exec request, stdin included, as one JSON string and parses it on the heap. Concurrent large stdin payloads exceed the V8 heap limit, and the process aborts instead of rejecting the request.
Suggested fix
- Bound the accepted
execstdinsize per request, and the total in flight per worker. Reject an over-limit request with a typed error (413/PAYLOAD_TOO_LARGE) instead of crashing. - Stream
stdinthrough the uplink and into the child process instead of parsing it as a single JSON string, or offer a separate upload endpoint, so large file transfers don't sit on the JSON path. - Optionally, keep lease state across a worker restart (the leases were lost even though the devices survived).
On the client side, we are capping concurrent large uploads (consumer issue linked below), but a worker should not be crashable by request size.
- Ngôn ngữ chính
- TypeScript
- Star
- 535
- Fork
- 21
- Merge trung bình
- 9 giờ 53 phút
- Pull request đã merge (30 ngày)
- 435
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 callstackincubator/simlock
-
Full-mode iOS boot wait is fixed at 120 s: on a busy 16 GiB Mac every new full simulator failsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstackincubator/simlock#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/simlock#1234 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
callstackincubator/simlock#1229 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
os:windows request:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
callstackincubator/simlock#1071 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task:draft
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
callstackincubator/simlock#1261 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/simlock
Issue tương tự
-
bug module:nodes tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rocketride-org/rocketride-server#3020 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area: dashboard area: tests good first issue size: XS tests
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Read canvas commentsĐang mởenhancement needs-community-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
shaharia-lab/slackcli#501 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Pod detail shows CPU usage ten times too high, and throws on decimal memory suffixesCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 11 ngày
-
`package.json`: build tools listed as runtime dependencies, exact pins causing duplicate installsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
themesberg/flowbite-vue#471 ·