vscode: v8 crash when loading wasm in extension host

Created from https://github.com/microsoft/vscode/issues/113410#issuecomment-772096623

Minimal electron repo: https://gist.github.com/deepak1556/a6d791b204978aeed549347b6c55d124

StackTrace: https://github.com/microsoft/vscode/issues/113410#issuecomment-767052786

Upstream issue in node: https://github.com/nodejs/node/issues/37061

The issue is only with process running as node.

Version: 1.53.0-insider (Universal)
Commit: 8d779a4fadaadec06b44b8875a1d3c4adba8e380
Date: 2021-02-02T16:34:06.213Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 15 (7 by maintainers)

Most upvoted comments

The difference between the chrome and node arise from the use of different page allocator for v8. Chrome renderer uses Gin’s v8 page allocator which inturn depends on partition_alloc to handle MAP_JIT allocations. Switching the page allocator in node platform creation to use chromium’s partition alloc fixes the issue.

I can push that as a fix for vscode but the root issue needs to be investigated in node as they can’t do such a switch.

Was my initial suspicion as well.

I can also confirm that latest insiders works great on MacOS arm64.

@andreialecu I think that is a problem with the bracket pair colorizer 2 extension (AFACIT it is using vscode-oniguruma incorrectly).

Sorry to ask here, but I’ve been poking around, can’t find a solid answer, and don’t want to break vscode on my M1. Is the latest insiders build now working with macOS 11.2 in cases where this issue popped up?

Yes!

Sorry to ask here, but I’ve been poking around, can’t find a solid answer, and don’t want to break vscode on my M1. Is the latest insiders build now working with macOS 11.2 in cases where this issue popped up?

The allocator switch has been made in our internal electron builds for early testing, we will create a PR in OSS electron with the same change sometime this week.

Out of curiosity. How does the electron bump fix it? I wasn’t able to find anything relevant in the commit history.