vscode: Extension host crashes, possibly when opening ipynb files

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
  • OS Version:

Steps to Reproduce:

  1. Open VS Code insiders
  2. Open an ipynb file
  3. the ipynb will not open, go into console window and you’ll see the following error Error received from starting extension host (kind: 0). I’ve run into this issue twice today on my desktop VS Code insiders.

Here’s the output from console window

abstractExtensionService.ts:1147 Extension 'testing.typeh cannot use PROPOSED API (must started out of dev or enabled via --enable-proposed-api)
updateEnableProposedApi @ abstractExtensionService.ts:1147
console.ts:137 [Extension Host] (node:10874) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use `Code - Insiders Helper (Renderer) --trace-deprecation ...` to show where the warning was created) (at writeOut (internal/process/warning.js:43:3))
v @ console.ts:137
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.r.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/r/syntaxes/r.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/ikuyadeu.r-2.3.0/syntax/r.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.python.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/python/syntaxes/MagicPython.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/magicstack.magicpython-1.1.0/grammars/MagicPython.tmLanguage
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.js.jsx.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.5.20210926/syntaxes/JavaScriptReact.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.js.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/javascript/syntaxes/JavaScript.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.5.20210926/syntaxes/JavaScript.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.ts.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.5.20210926/syntaxes/TypeScript.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.tsx.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.5.20210926/syntaxes/TypeScriptReact.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/redhat.vscode-yaml-0.22.0/syntaxes/yaml.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.kusto.
Old grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/donjayamanne.kusto-0.3.8/syntaxes/kusto.tmLanguage.
New grammar file: file:///Users/donjayamanne/.vscode-insiders/extensions/rosshamish.kuskus-kusto-syntax-highlighting-1.1.8/syntaxes/kusto.tmLanguage
register @ TMScopeRegistry.ts:45
extensionHostManager.ts:138 Error received from starting extension host (kind: 0)
(anonymous) @ extensionHostManager.ts:138
extensionHostManager.ts:139 timeout
(anonymous) @ extensionHostManager.ts:139
log.ts:301   ERR Error: Unknown extension vscode.ipynb
    at Hl._activateById (abstractExtensionService.ts:948)
    at async F.canResolve (notebookServiceImpl.ts:503)
    at async Sn.resolve (notebookEditorInput.ts:212)
    at async fs.setInput (notebookEditor.ts:202)
    at async u.doSetInput (editorPanes.ts:264)
    at async u.doOpenEditor (editorPanes.ts:142)
    at async u.openEditor (editorPanes.ts:110)
    at async editorGroupView.ts:1061
log.ts:301   ERR undefined
log.ts:295  WARN Settings Sync: Accounts are not initialized

Screen Shot 2021-09-27 at 11 36 47

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (24 by maintainers)

Commits related to this issue

Most upvoted comments

FYI @DonJayamanne . I wanted to follow up on this one. We have now understood that this was indeed caused by the move to spawn the extension host on the shared process and we have identified the root cause (a ‘connection’ listener added too late) in https://github.com/microsoft/vscode/issues/135101

I’ve pushed that the extension host process will be launched again from the renderer process via https://github.com/microsoft/vscode/commit/2a37970fbaae4aa7e28f2f9a38a83b45adfe484d .

@rebornix regarding IExtensionService._activateById, I think that can remain as is for now, that error stack was a direct consequence of the extension host that was hosting the respective extension id having crashed before.

Thank you @DonJayamanne for the logs, but unfortunately again there are no clues in the logs, perhaps the only weird log is the third one which is for an extension host that was alive for only 40ms 🤷 .

The timeout error that you might be seeing @DonJayamanne could come from two distinct code paths:

  • the first one could happen if the extension host process does not manage to start up and connect to a domain socket where the renderer process is listening within 60s. Insiders still has the extension host being launched from the shared process right now (new this iteration), so it is theoretically possible that the times have changed, but I thought 1 minute would be sufficient. Is it possible that your computer was under tremendous load when this occurred? Perhaps you had many windows opened and after an update they all came back and started really slowing down the shared process?
  • the second one could happen if, once connected, the extension host process does not send a ready message. I personally think this is less likely, but unfortunately both errors are called timeout.

I will push a change to distinguish these two cases better and we will roll back the launching of the extension host back to the renderer process for this stable release (we want to collect more times to see if moving the launching to the shared process delays startup significantly).

Yeah I reproed what I said several times this morning. But now, I see a JSON file but the codespace is broken with no remote EH

image