nodejs / nodejs/node

RISC-V: "Illegal instruction" crash when vector instructions detected by V8

Đang mở
#64,538 36 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

riscv64 v8 engine
Ngôn ngữ chính
JavaScript
Star
122k
Fork
37.3k
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
283

Mô tả

Version

v26.5.0 (but any v26 and above is affected)

Platform
Linux firefly 6.18.3 #2 SMP PREEMPT_DYNAMIC Wed May 13 16:58:11 CST 2026 riscv64 GNU/Linux
Subsystem

V8

What steps will reproduce the bug?

run npm or any node-gyp on a SpacemiT-K3 board. Also fails in the build-addons step with make run-ci as that executes node-gyp. Other boards such as the SpacemiT-K1 do not show the crash (Both should have vector instructions available)

How often does it reproduce? Is there a required condition?

100% of the time

What is the expected behavior? Why is that the expected behavior?

There should be no crash when running npm

What do you see instead?

Illegal Instruction

Additional information

Based on the fact that https://github.com/sxa/node/commit/1ecdd388f13391c55cffd9aea580770e1d26a952 fixes it seems likely that this was introduced as part of the vector instructions introduced in https://github.com/v8/v8/commit/de361fd2544a89c0c94fd820f987378edbb98fce - I haven't yet tracked it down to any specific operation in that function. At the moment I've also only determined that it fixes the initial crash and hopefully that doesn' uncover more issues.

FYI @luhenry @luyahan @nodejs/platform-riscv64

Split out from https://github.com/nodejs/build/issues/4099#issuecomment-4935757486

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện bằng npm hoặc node-gyp trên SpacemiT-K3 chạy riscv64 Linux và so sánh với K1; đồng thời kiểm tra đường dẫn build-addons được make run-ci chạy. Đọc thay đổi về lệnh vector của V8 de361fd2544a89c0c94fd820f987378edbb98fce cùng với workaround đã được báo cáo 1ecdd388f13391c55cffd9aea580770e1d26a952. Được xem là hoàn tất khi các lệnh này không còn gây ra Illegal Instruction trên K3 mà không làm phát sinh hồi quy trên K1.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, linux, node.js
Lĩnh vực
backend, operating-systems
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.