SIGILL on a valid instruction in Wasm code called from a worker thread (v26.6.0, macOS arm64)
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
- 8/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ệ
- cpp, javascript, wasm
Hướng nghiên cứu
The crash sits in V8's JS-to-Wasm wrapper (Builtins_JSToWasmWrapperAsm) and in code-page writes during lazy compilation, so start with the arm64 instruction-cache flush path and the lazy-compilation entry points, and read #65724 for the related riscv64 report. Reproducing needs a multi-worker WasmGC load test on arm64 macOS, and there is no minimal case yet. Done would mean a root cause plus a fix or a validated workaround, which is not a newcomer task.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
v26.6.0 (Homebrew bottle, node/26.6.0), V8 14.6.202.34-node.26. Not yet tried on 26.13.1 or on the official nodejs.org binary.
Platform
Darwin 25.6.0 Darwin Kernel Version 25.6.0: Fri Jul 31 19:16:20 PDT 2026; root:xnu-12377.161.14~5/RELEASE_ARM64_T8142 arm64
macOS 26.6.2 (25G83), Apple M5 (Mac17,3), 32 GB.
Subsystem
wasm, worker_threads
What steps will reproduce the bug?
We have not reduced it. It happens now and then while a test runner runs a large WebAssembly module (a compiler's test bundle of several MB, using WasmGC) in several worker_threads at once. Each worker compiles the same module bytes with WebAssembly.compile and calls its exports in fresh instances, many times over a run of about a minute. The machine was heavily loaded each time (load average 60 to 170 on 10 cores).
The process dies with Illegal instruction: 4 (exit status 132), with nothing on stderr. On 2026-10-19 it happened while the bundle ran; the same command, rerun at once on the same files, passed.
How often does it reproduce? Is there a required condition?
Rarely: several times between 2026-10-19 and 2026-11-14, out of many runs a day, all on this machine and under heavy load.
What is the expected behavior? Why is that the expected behavior?
The process keeps running, or V8 reports a fatal error with a message.
What do you see instead?
SIGILL in a WorkerThread, in JIT code entered from Builtins_JSToWasmWrapperAsm. From the macOS crash report of 2026-11-14:
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x00000000d2800650
Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4
Thread 11 Crashed (WorkerThread):
0 ??? 0x261743dd4740
1 libnode.147.dylib Builtins_JSToWasmWrapperAsm + ...
2 libnode.147.dylib Builtins_JSToWasmWrapper + ...
3 ??? (Wasm code)
4 libnode.147.dylib Builtins_WasmToJsWrapperCSA + ...
...
The faulting word, 0xd2800650, is movz x16, #0x32, a valid instruction, and the bytes the report shows at the PC are that instruction followed by ordinary frame setup (stp). A valid instruction raising SIGILL suggests the core executed stale contents of a freshly written code page (an instruction cache not invalidated, or a page still being written) rather than a bad instruction. At the moment of the crash, other worker threads of the same process were in TurboFan (register allocation, Assembler::DeleteUnresolvedBranchInfoForLabelTraverse) and in a concurrent scavenge.
Additional information
#65724 looks related: SIGILL in the JS-to-Wasm wrapper on riscv64, where lazy compilation enters code pages not yet populated, and --no-wasm-lazy-compilation avoids it. We have not tried that flag here, because the crash is too rare to tell a fix from luck.
We can share the whole crash report, and run a build with extra checks if that helps.
- Ngôn ngữ chính
- JavaScript
- Star
- 124k
- Fork
- 38k
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 266
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 nodejs/node
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Maintainer thường phản hồi trong vòng 1 ngày
-
fs: document readStream.start and readStream.endCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdoc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
nodejs/node#67848 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
doc: document the Buffer.prototype.*Slice() methodsCó thể đã có người làm @AyushCipher đã nhận hôm nay. Đang mởdoc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
nodejs/node#67847 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`styleText` fast path bypasses `options` and `options.validateStream` validationCó thể đã có người làm @GBra-4-669 đã nhận 8 ngày trước. Đang mởutil
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
riscv64
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nodejs/node#67655 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug triage needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Resource]: PersephoneĐang mởresource-submission validation-passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
hesreallyhim/awesome-claude-code#3773 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
tabatkins/railroad-diagrams#129 ·
-
web: api() turns a null or object-valued error body into a TypeError or "[object Object]" and loses the statusCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày