Skip to content

Conversation

@kxxt
Copy link
Contributor

@kxxt kxxt commented Nov 5, 2025

For riscv64, the most commonly supported paging mode is sv39, which allocates 256GiB of virtual address space for the user space. However, due to trap handler security mechanism in V8, creating a wasm memory will cost 8GiB of continuous virtual address space. In a fresh node repl, I could only create 27 WebAssembly.Memory instances. When the virtual address space is more fragmented, it is worse.

The wpt tests are randomly failing on riscv64 due to insufficient virtual address space to create wasm memories. This PR fixes it by limiting the concurrency of the WPTRunner to prevent the tests from creating too many wasm memories.

For riscv64, the most commonly supported paging mode is sv39, which
allocates 256GiB of virtual address space for the user space. However,
due to trap handler security mechanism in V8, creating a wasm memory
will cost 8GiB of continuous virtual address space. In a fresh node
repl, I could only create 27 WebAssembly.Memory instances. When the
virtual address space is more fragmented, it is worse.

The wpt tests are randomly failing on riscv64 due to insufficient
virtual address space to create wasm memories. This PR fixes it by
limiting the concurrency of the WPTRunner to prevent the tests from
creating too many wasm memories.
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.56%. Comparing base (8511902) to head (a08efd1).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #60591   +/-   ##
=======================================
  Coverage   88.55%   88.56%           
=======================================
  Files         704      704           
  Lines      208077   208077           
  Branches    40076    40080    +4     
=======================================
+ Hits       184271   184287   +16     
+ Misses      15839    15824   -15     
+ Partials     7967     7966    -1     

see 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kxxt
Copy link
Contributor Author

kxxt commented Nov 5, 2025

I think the macOS test failure here is unrelated: https://github.com/nodejs/node/actions/runs/19103557173/job/54581287952?pr=60591

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 5, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 5, 2025
@nodejs-github-bot
Copy link
Collaborator

kxxt added a commit to kxxt/archriscv-packages that referenced this pull request Nov 7, 2025
- Fix test-strace-openat-openssl for RISC-V, upstreamed: nodejs/node#60588
- Fix randomly failing WPT tests, upstreamed: nodejs/node#60591
- Drop upstreamed patches
- Temporarily disable test-snapshot-reproducible.js, I am still
  investigating it.
- Now `check()` is supposed to pass, but some tests could hit revyos/revyos#27
  on SG2042 so we might still need nocheck.
kxxt added a commit to kxxt/archriscv-packages that referenced this pull request Nov 7, 2025
- Fix test-strace-openat-openssl for RISC-V, upstreamed: nodejs/node#60588
- Fix randomly failing WPT tests, upstreamed: nodejs/node#60591
- Drop upstreamed patches
- Temporarily disable test-snapshot-reproducible.js, I am still
  investigating it.
- Now `check()` is supposed to pass, but some tests could hit revyos/revyos#27
  on SG2042 so we might still need nocheck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants