Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updpatch: nodejs 22.9.0-1 #4176

Merged
merged 1 commit into from
Oct 4, 2024
Merged

updpatch: nodejs 22.9.0-1 #4176

merged 1 commit into from
Oct 4, 2024

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Oct 4, 2024

Disable v8's trap handler1 to workaround ENOMEM on sv39 systems2.

v8's OOB trap handler for wasm tries to allocate a 10 GB guard region3, but unfortunately on sv39 systems we only have 256GB virtual memory for userspace, which is usually already exhausted by the node process and leads to WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance errors

There is a second bug in 2, which needs to be investigated separately and disabling trap handler won't fix it.

Footnotes

  1. https://chromium-review.googlesource.com/c/v8/v8/+/5227604

  2. https://github.com/riscv-forks/electron/issues/3#issuecomment-2391689815 2

  3. https://github.com/nodejs/node/blob/09a8440b45f69651ff52110cb1bc2dde9e14e2e8/deps/v8/src/objects/backing-store.cc#L38

Disable v8's trap handler[1] to workaround ENOMEM on sv39 systems[2].

v8's OOB trap handler for wasm tries to allocate a 10 GB guard region[3],
but unfortunately on sv39 systems we only have 256GB virtual memory for
userspace, which is usually already exhausted by the node process and
leads to `WebAssembly.Instance(): Out of memory: Cannot allocate Wasm
memory for new instance` errors

There is a second bug in [2], which needs to be investigated separately
and disabling trap handler won't fix it.

[1]: https://chromium-review.googlesource.com/c/v8/v8/+/5227604
[2]: riscv-forks/electron#3 (comment)
[3]: https://github.com/nodejs/node/blob/09a8440b45f69651ff52110cb1bc2dde9e14e2e8/deps/v8/src/objects/backing-store.cc#L38
@felixonmars felixonmars merged commit c892e1f into felixonmars:master Oct 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants