Skip to content

v8 crash when loading wasm in extension host #115646

Closed

Description

@deepak1556

Created from #113410 (comment)

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

StackTrace: #113410 (comment)

Upstream issue in node: nodejs/node#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

Activity

  1. changed the title [-]v8crash when loading wasm in extension host[/-] [+]v8 crash when loading wasm in extension host[/+] on Feb 2, 2021
  2. added
    freeze-slow-crash-leak
    upstream
    upstream-issue-linked
    on Feb 2, 2021
  3. added this to the January 2021 milestone on Feb 2, 2021
  4. added
    important
    on Feb 2, 2021
  5. deepak1556 commented on Feb 3, 2021

    @deepak1556
    CollaboratorAuthor

    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.

  6. deepak1556 commented on Feb 3, 2021

    @deepak1556
    CollaboratorAuthor
  7. deepak1556 commented on Feb 4, 2021

    @deepak1556
    CollaboratorAuthor

    \closedWith ff85144

  8. added
    unreleased
    on Feb 4, 2021
  9. 3 remaining items

  10. added
    unreleased
    and removed
    unreleased
    on Feb 5, 2021
  11. jtkiley commented on Feb 5, 2021

    @jtkiley

    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?

  12. rajtslegr commented on Feb 5, 2021

    @rajtslegr

    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!

  13. andreialecu commented on Feb 5, 2021

    @andreialecu

    Screenshot 2021-02-05 at 21 32 21

    I'm seeing this error in the developer tools with the latest insiders. cc Robo (@deepak1556)

    Just noticed it's related to an extension. That same extension works on Stable though.

    Edit: False alarm: could be an extension problem. I actually see the same error logged on Stable, but everything seems to work both on Insiders and Stable.

  14. deepak1556 commented on Feb 5, 2021

    @deepak1556
    CollaboratorAuthor

    Can you open an new issue for that extension vscode-oniguruma https://github.com/microsoft/vscode-oniguruma if the issue is seen with stable too. /cc Alexandru Dima (@alexdima)

  15. removed
    unreleased
    on Feb 8, 2021
  16. vscode-triage-bot commented on Feb 8, 2021

    @vscode-triage-bot

    Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting \closedWith someCommitSha, or directly add the insiders-released label if you know this has already been releaased

  17. added
    unreleased
    on Feb 8, 2021
  18. alexdima commented on Feb 8, 2021

    @alexdima
    Member

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

  19. andreialecu commented on Feb 8, 2021

    @andreialecu

    Was my initial suspicion as well.

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

  20. removed
    unreleased
    on Feb 9, 2021
  21. simonhyphen8 commented on Feb 9, 2021

    @simonhyphen8

    I'm using VSCode with Salesforce.
    MacBook Pro M1 with Big Sur V11.0
    VSCode version 1.53.0
    I only have 14 extensions installed - the standard Salesforce ones, VSCode LiveShare, ESLint and a Salesforce Documenter.
    Restarting the extension host using the button that pops up works, as does closing & reopening the project, but this is proving very frustrating. I can't tell in these posts if this issue is fixed or not, or if I have to do something to resolve it myself?

    Any advice greatly appreciated!

    Log Info:
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1747 Overwriting grammar scope name to file mapping for scope text.log.
    Old grammar file: file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/log/syntaxes/log.tmLanguage.json.
    New grammar file: file:///Users/simonmolloy/.vscode/extensions/salesforce.salesforcedx-vscode-apex-replay-debugger-50.16.0/syntaxes/apexlog.tmLanguage.json
    register @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1747
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1747 Overwriting grammar scope name to file mapping for scope text.html.basic.
    Old grammar file: file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/html/syntaxes/html.tmLanguage.json.
    New grammar file: file:///Users/simonmolloy/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-50.16.0/syntaxes/html.tmLanguage.json
    register @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1747
    4/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Cannot find en-gb, defaulting to en
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] (node:9590) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    2/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Cannot find en-gb, defaulting to en
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Activation Mode: autodetect
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Aura Components Extension Activated
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] WorkspaceType detected: 4
    3/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Cannot find en-gb, defaulting to en
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Activation Mode: autodetect
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Lightning Web Components Extension Activated
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] WorkspaceType detected: 4
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] SFDX CLI Extension Activated
    5/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Cannot find en-gb, defaulting to en
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Listening on port 63009
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1961 [[object Object]]The "file" argument must be of type string. Received null
    $onExtensionRuntimeError @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1961
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1961 TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received null
    at validateString (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/validators.js:120)
    at normalizeSpawnArguments (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/child_process.js:415)
    at Object.spawn (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/child_process.js:551)
    at Server. (/Users/simonmolloy/.vscode/extensions/salesforce.salesforce-vscode-slds-1.4.0/client/out/sldsLanguageClient.js:151)
    at Object.onceWrapper (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/events.js:421)
    at Server.emit (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/events.js:315)
    at emitListeningNT (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/net.js:1347)
    at processTicksAndRejections (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/process/task_queues.js:83)
    $onExtensionRuntimeError @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1961
    4/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received null at validateString (internal/validators.js:120:11) at normalizeSpawnArguments (child_process.js:415:3) at Object.spawn (child_process.js:551:16) at Server. (/Users/simonmolloy/.vscode/extensions/salesforce.salesforce-vscode-slds-1.4.0/client/out/sldsLanguageClient.js:151:41) at Object.onceWrapper (events.js:421:28) at Server.emit (events.js:315:20) at emitListeningNT (net.js:1347:10) at processTicksAndRejections (internal/process/task_queues.js:83:21)
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    4/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Cannot find en-gb, defaulting to en
    b @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Apex Debugger Extension Activated
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Setting up ISV Debugger environment variables
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Configured file watcher for .sfdx/sfdx-config.json
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Apex Replay Debugger Extension Activated
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Project is not for ISV Debugger
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60 [Extension Host] Deleted environment variables SFDX_DEFAULTUSERNAME and SFDX_INSTANCE_URL
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:738 SFDX: Deploy Source to Org failed to run
    onDidChangeNotification @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:738
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1734 Extension host terminated unexpectedly. Code: null Signal: SIGSEGV
    _onExtensionHostCrashed @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1734
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:618 ERR Extension host terminated unexpectedly. The following extensions were running: vscode.microsoft-authentication, vscode.emmet, vscode.html-language-features, HugoOM.sfdx-autoheader, salesforce.salesforcedx-vscode-core, vscode.debug-auto-launch, vscode.git, ms-vsliveshare.vsliveshare, vscode.npm, salesforce.salesforcedx-vscode-lightning, dbaeumer.vscode-eslint, salesforce.salesforcedx-vscode-lwc, ms-vscode.js-debug, vscode.github-authentication, salesforce.salesforce-vscode-slds, salesforce.salesforcedx-vscode-apex, salesforce.salesforcedx-vscode-visualforce, salesforce.salesforcedx-vscode-apex-debugger, salesforce.salesforcedx-vscode-apex-replay-debugger, vscode.github, ms-vsliveshare.vsliveshare-audio, vscode.merge-conflict, vscode.testing-editor-contributions, vscode.typescript-language-features, vscode.configuration-editing, vscode.json-language-features, vscode.extension-editing
    /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:738 Extension host terminated unexpectedly.
    onDidChangeNotification @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:738
    bootstrap-window.js:1 [uncaught exception]: Error: This socket has been ended by the other party
    g @ bootstrap-window.js:1
    bootstrap-window.js:1 Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/net.js:455)
    at v.write (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2653)
    at v._writeNow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at Immediate. (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at processImmediate (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/timers.js:456)
    g @ bootstrap-window.js:1
    events.js:292 Uncaught Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/net.js:455)
    at v.write (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2653)
    at v._writeNow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at Immediate. (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at processImmediate (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/timers.js:456)
    bootstrap-window.js:1 [uncaught exception]: Error: This socket has been ended by the other party
    g @ bootstrap-window.js:1
    bootstrap-window.js:1 Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/net.js:455)
    at v.write (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2653)
    at v._writeNow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at v.flush (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at v.dispose (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at Object.S [as dispose] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:14)
    at i.dispose (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2659
    g @ bootstrap-window.js:1
    events.js:292 Uncaught Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/net.js:455)
    at v.write (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2653)
    at v._writeNow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at v.flush (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at v.dispose (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at Object.S [as dispose] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:14)
    at i.dispose (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:76)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2659

  22. deepak1556 commented on Feb 9, 2021

    @deepak1556
    CollaboratorAuthor

    Can you try the universal build or arm64 build insiders version https://code.visualstudio.com/insiders and see if the issue persists.

  23. locked and limited conversation to collaborators on Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

freeze-slow-crash-leakimportantupstreamupstream-issue-linked

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions