nodejs / nodejs/node

Node.js v24.2.0 Segmentation Fault on WSL2

Đang mở
#58,690 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

stale
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

v24.2.0

Platform
Linux DESKTOP-QV82TM5 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux
Subsystem

No response

What steps will reproduce the bug?

Install v24.2.0

nvm install v24.2.0
nvm use v24.2.0

Basic commands that trigger segfault

node --version # Segmentation fault
npm --version # Segmentation fault

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

[svnbjrn@DESKTOP-QV82TM5 W15]$ node -v
Segmentation fault

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

[svnbjrn@DESKTOP-QV82TM5 W15]$ node -v
v24.1.0

What do you see instead?

[svnbjrn@DESKTOP-QV82TM5 W15]$ node -v
Segmentation fault

Additional information

As you can probably tell the following was absolutely written by Claude:

Node.js v24.2.0 Segmentation Fault on WSL2

Summary

Node.js v24.2.0 consistently crashes with segmentation faults on WSL2 + Arch Linux, while v24.1.0 works perfectly.

Environment

  • OS: Arch Linux on WSL2
  • Kernel: 5.15.167.4-microsoft-standard-WSL2
  • Node.js versions tested:
    • v24.1.0: ✅ Works fine
    • v24.2.0: ❌ Segfaults consistently
    • v22.16.0 (LTS): ✅ Works fine

Reproduction

# Install v24.2.0
nvm install v24.2.0
nvm use v24.2.0

# Basic commands that trigger segfault
node --version    # Segmentation fault
npm --version     # Segmentation fault

Crash Details

Jun 12 09:34:50 DESKTOP-QV82TM5 kernel: potentially unexpected fatal signal 11.
Jun 12 09:34:50 DESKTOP-QV82TM5 kernel: CPU: 12 PID: 16666 Comm: node Not tainted 5.15.167.4-microsoft-standard-WSL2 #1
Jun 12 09:34:50 DESKTOP-QV82TM5 kernel: RIP: 0033:0x7ff67b041bcb
Jun 12 09:34:50 DESKTOP-QV82TM5 kernel: Code: Unable to access opcode bytes at RIP 0x7ff67b041ba1.
Jun 12 09:34:50 DESKTOP-QV82TM5 kernel: RAX: fffffffffffffff2 RBX: 0000562e10ab6740 RCX: 00007ff67b041bcb

Suspected Root Cause

Based on the v24.2.0 changelog, likely candidates:

  1. libuv update to 1.51.0 (most likely) - handles system calls where WSL2 translation could fail
  2. V8 cherry-pick 249de887a8d3 - engine-level memory management changes
  3. nghttp2 update to 1.65.0 - less likely but possible

Additional Info

  • Affects both basic startup (node --version) and any Node.js execution
  • Issue is specific to WSL2 environment
  • Same binary works on native Linux systems
  • Regression introduced between v24.1.0 and v24.2.0

Workaround

Use Node.js v24.1.0 or LTS versions until fixed.

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

Bắt đầu bằng cách tái hiện lỗi crash với node --version trên WSL2 bằng v24.2.0, sau đó so sánh với v24.1.0 và v22.16.0. Điều tra các thay đổi trong v24.2.0 liên quan đến libuv 1.51.0, V8 cherry-pick được liệt kê và nghttp2 1.65.0. Công việc được xem là hoàn tất khi Node khởi động thành công trong môi trường WSL2 đã báo cáo mà không xảy ra segmentation fault.

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, nodejs
Lĩnh vực
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
45/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.