Skip to content

Crashes every day with "Code: '5'" #143101

Closed

Description

Issue Type: Performance Issue

My VSCode instance crashes every day. I have switched recently, so I cannot state since when exactly. I cannot bind these chrases to any specific set of reproducible actions — it looks just random.

I can somewhat predict it's going to crash soon because it starts to respond sluggishly seconds or a couple of minutes before a crash. For example, switching to a different tab takes ~2-5 seconds to complete when this happens. That usually signals it's about to crash soon.

The crash dialog doesn't provide any meaningful information, just a laconic, cryptic reason: 'crashed', code: '5' line.

VS Code version: Code 1.64.2 (f80445a, 2022-02-09T22:00:58.347Z)
OS version: Darwin x64 21.2.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 4, 4, 4
Memory (System) 8.00GB (1.02GB free)
Process Argv --crash-reporter-id 1004a7b4-dd6b-4c5b-97a9-c41af381dd3c
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
   17	    90	 39780	code main
    0	    33	 39783	   gpu-process
    0	     8	 39785	   utility-network-service
    0	    49	 40144	   shared-process
    0	    25	 40160	     ptyHost
    0	     0	 40457	       node /Users/jaime/.nvm/versions/node/v17.2.0/bin/yarn run start:web
    0	     0	 40477	         /Users/jaime/.nvm/versions/node/v17.2.0/bin/node --require /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/vcc.js /Users/jaime/.node/corepack/yarn/3.1.1/yarn.js run start:web
    0	     0	 40553	           /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/yarn.js workspace @c20/web dev
    0	     0	 40554	             /Users/jaime/.nvm/versions/node/v17.2.0/bin/node --require /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/vcc.js /Users/jaime/.node/corepack/yarn/3.1.1/yarn.js workspace @c20/web dev
    0	     0	 40566	               /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/.yarn/releases/yarn-3.1.1.cjs workspace @c20/web dev
    0	     8	 40570	                 /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/node_modules/next/dist/bin/next dev
    0	     0	 40580	       node /Users/jaime/.nvm/versions/node/v17.2.0/bin/yarn run start:api
    0	     0	 40582	         /Users/jaime/.nvm/versions/node/v17.2.0/bin/node --require /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/vcc.js /Users/jaime/.node/corepack/yarn/3.1.1/yarn.js run start:api
    0	     0	 40589	           /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/yarn.js workspace @c20/api start
    0	     0	 40590	             /Users/jaime/.nvm/versions/node/v17.2.0/bin/node --require /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/vcc.js /Users/jaime/.node/corepack/yarn/3.1.1/yarn.js workspace @c20/api start
    0	     0	 40597	               /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/.yarn/releases/yarn-3.1.1.cjs workspace @c20/api start
    0	     0	 40601	                 /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/node_modules/nodemon/bin/nodemon.js src/server.ts
    0	     8	 47554	                   /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/node_modules/ts-node/dist/bin.js src/server.ts
    0	    25	 62305	       node /Users/jaime/.nvm/versions/node/v17.2.0/bin/yarn run start:api
    0	    82	 62308	         /Users/jaime/.nvm/versions/node/v17.2.0/bin/node --require /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/vcc.js /Users/jaime/.node/corepack/yarn/3.1.1/yarn.js run start:api
    0	    25	 62314	           /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/yarn.js workspace @c20/api start
    0	    25	 62317	             /Users/jaime/.nvm/versions/node/v17.2.0/bin/node --require /Users/jaime/.nvm/versions/node/v17.2.0/lib/node_modules/corepack/dist/vcc.js /Users/jaime/.node/corepack/yarn/3.1.1/yarn.js workspace @c20/api start
    0	    82	 62320	               /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/.yarn/releases/yarn-3.1.1.cjs workspace @c20/api start
    0	    33	 62324	                 /Users/jaime/.nvm/versions/node/v17.2.0/bin/node /Users/jaime/Code/c20/node_modules/nodemon/bin/nodemon.js src/server.ts
    0	    25	 62260	     fileWatcher
    0	     0	 62374	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	   156	 62254	   window (company.ts — c20)
    0	    49	 62257	   extensionHost
    0	    25	 62264	     /Applications/Visual Studio Code.app/Contents/MacOS/Electron --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /var/folders/jf/y8xgq9yd6yv3bn0wr2mwpxhw0000gn/T/vscode-typescript501/351cc628b6420b13b793/tscancellation-a155a17769e33a7e0c8d.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
    1	    33	 62265	     /Applications/Visual Studio Code.app/Contents/MacOS/Electron --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/jf/y8xgq9yd6yv3bn0wr2mwpxhw0000gn/T/vscode-typescript501/351cc628b6420b13b793/tscancellation-0dc703249f57b491be5d.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
    0	    33	 62268	       /Applications/Visual Studio Code.app/Contents/MacOS/Electron --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/jaime/Library/Caches/typescript/4.5 --enableTelemetry --typesMapLocation /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation
    0	    49	 62286	     /Applications/Visual Studio Code.app/Contents/MacOS/Electron --ms-enable-electron-run-as-node /Users/jaime/.vscode/extensions/dbaeumer.vscode-eslint-2.2.2/server/out/eslintServer.js --node-ipc --clientProcessId=62257
    0	    33	 62302	     /Applications/Visual Studio Code.app/Contents/MacOS/Electron --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=62257
    1	    66	 62369	   issue-reporter
Workspace Info
|  Window (company.ts — c20)
|    Folder (c20): 10757 files
|      File types: gz(6678) zip(2595) js(519) json(213) ts(105) mdx(92)
|                  pack(44) map(40) html(29) md(25)
|      Conf files: package.json(6) tsconfig.json(5) github-actions(2)
|                  settings.json(1) tasks.json(1);
Extensions (17)
Extension Author (truncated) Version
better-comments aar 2.1.0
unique-lines bib 1.0.0
vscode-eslint dba 2.2.2
xml Dot 2.5.1
vscode-html-css ecm 1.11.0
EditorConfig Edi 0.16.4
prettier-vscode esb 9.2.0
vscode-pull-request-github Git 0.36.1
customize-ui ioc 0.1.58
monkey-patch ioc 0.1.16
rainbow-csv mec 2.0.0
dotenv mik 1.0.1
vscode-language-pack-es MS- 1.64.6
remote-containers ms- 0.217.4
emoji Per 1.0.1
vscode-sort-json ric 1.20.0
vscode-sort-package-json uni 1.2.2

(2 theme extensions excluded)

Captura de pantalla 2022-02-11 a las 12 26 29

Activity

  1. gjsjohnmurray commented on Feb 15, 2022

    @gjsjohnmurray
    Contributor

    Maybe disable all non-essential extensions and see if the problem still occurs.

  2. JaimeObregon commented on Feb 15, 2022

    @JaimeObregon
    Author

    Thank you, John. Seems like a good starting point. I have just disabled all the 13 non-essential extensions I have installed. I will slowly re-enable them during the following days. That may provide insight. For the record, I jot down here the essential four I am starting with.

    Extensions (4)
    Extension Author (truncated) Version
    vscode-eslint dba 2.2.2
    EditorConfig Edi 0.16.4
    prettier-vscode esb 9.2.0
    vscode-language-pack-es MS- 1.64.6
  3. JaimeObregon commented on Feb 15, 2022

    @JaimeObregon
    Author

    It just crashed again. I have disabled two of my remaining extensions, and now I am running only two, both authored by Microsoft.

    Extensions (2)
    Extension Author (truncated) Version
    vscode-eslint dba 2.2.2
    vscode-language-pack-es MS- 1.64.6
  4. JaimeObregon commented on Feb 16, 2022

    @JaimeObregon
    Author

    Got today's crash. Only the two aforementioned extensions were enabled (as well as GitHub's official theme for VSCode, which I pressume innocuous):

    Captura de pantalla 2022-02-16 a las 13 00 09

    So I have enabled back all of my 17 extensions and I am abandoning this road and driving my attention to the running tasks. I have several configured but only one running continuosly. This is how my workspace's tasks.json file looks like:

    {
      "tasks": [
        {
          "isBackground": true,
          "label": "Starts the API",
          "runOptions": { "runOn": "folderOpen" },
          "script": "start:api",
          "type": "npm"
        },
        // ...
      ],
      "version": "2.0.0"
    }

    The referenced script property justs invokes a simple Express server written in TypeScript: nodemon src/server.ts.

    It is not so simple for me to disable this task without affecting my workflow, so any hint about how to further diagnose this issue will be welcome.

  5. JaimeObregon commented on Feb 18, 2022

    @JaimeObregon
    Author

    Yesterday it didn't crash, but today it crashed early 🙂.

    Would love to provide a more detailed report, such as a stack trace or a core dump, but the error dialog doesn't provide any, nor a hint about where to action.

  6. JaimeObregon commented on Feb 18, 2022

    @JaimeObregon
    Author

    Crashed again. This time I saw it coming because it started to respond in a sluggish way seconds before it collapsed, and I could jump over the activity monitor and take this screenshot an instant before the crash. Probably not very useful, but just in case it helps…

    Captura de pantalla 2022-02-18 a las 16 58 32

  7. JaimeObregon commented on Feb 19, 2022

    @JaimeObregon
    Author

    Got my daily crash. VS Code's logs don't detail much:

    On main.log:

    [2022-02-19 14:20:26.664] [main] [error] CodeWindow: renderer process crashed (reason: crashed, code: 5)
    [2022-02-19 14:20:26.995] [main] [info] Extension host with pid 67864 exited with code: 0, signal: null.
    

    On sharedprocess.log:

    [2022-02-19 14:20:31.373] [sharedprocess] [info] Worker process with pid 67866 terminated normally (type: fileWatcher, window: 6).
    

    The latter might be related to the restart and not the crash itself, as I killed a task just upon restart.

  8. JaimeObregon commented on Feb 24, 2022

    @JaimeObregon
    Author

    Today It's five days without a crash. I can't tell what has happened, but it feels more stable since a few days ago. No significant changes in my setup. In hindsight, the only relevant thing I can think of, is that I did a full computer shut down and restart exactly 2,5 days ago.

    $ uptime
    12:11  up 2 days, 12:41, 3 users, load averages: 2,25 3,85 3,59
    

    My VS Code's version (as per commit) and setup remains exactly the same, though.

  9. JaimeObregon commented on Feb 26, 2022

    @JaimeObregon
    Author

    It crashed again today. I won't keep reporting, as I cannot attach more specific insights useful to identify the cause.

  10. andresfjobs commented on Mar 7, 2022

    @andresfjobs

    I have the same issue but the problem is when I try to do an npm i using a private server to get the dependencies, so in my case is related to the terminal, I'm using a MAC Pro 2019 Intel and this issues started suddenly without any new configuration.

  11. b055man commented on Mar 16, 2022

    @b055man

    I started seeing crashes as well (crashed, code 5), a few days ago (?)- I'm not sure if something has changed in the VS or in my dev environment.
    It happens extremely frequently, esp. when working with unit tests and assessing failed cases (when the peek dialog is displayed) - VS Code crashes every couple of minutes :/

    It's really easy to reproduce, so if anyone is willing, I can grab some logs, but I need instructions.

    FWIW, I'm on MacOS 11/Big Sur

    Version: 1.65.2
    Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
    Date: 2022-03-10T14:33:49.188Z
    Electron: 13.5.2
    Chromium: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Darwin x64 20.6.0
    
  12. rafo commented on Jun 10, 2022

    @rafo

    Maybe "[Creating and symbolicating local crash reports](Creating and symbolicating local crash reports)" can help?

    I have the same issue right now, but only when

    1. I open my home folder in vscode (macOS Monterey M1).
    2. Adding a new folder
    3. Adding some files from somewhere else
  13. bsassoli commented on Nov 7, 2022

    @bsassoli

    I am experiencing the same issue. I noticed the following message upon reopening:

    The isort server crashed 5 times in the last 3 minutes. The server will not be restarted.

  14. JaimeObregon commented on Nov 7, 2022

    @JaimeObregon
    Author

    I am the OP and I haven't experienced any crash in the last six months. 🎉

    Whatever caused this, it is already gone for me. I will leave this issue open because there seem to be others facing this instability.

  15. fosterushka commented on Nov 18, 2022

    @fosterushka

    Ventura 13.0.1 crashing all the time
    Disabled every extension styll.

    crashed code 5 vscode m1

  16. deepak1556 commented on Dec 7, 2022

    @deepak1556
    Collaborator

    Closing per #143101 (comment)

  17. memiux commented on Dec 15, 2022

    @memiux

    I'm having the same issue, what was the solution?

  18. ray8828 commented on Dec 27, 2022

    @ray8828

    I have the same issue, this looks like a big bug and we can't get any trace from it
    image

  19. hypeofpipe commented on Dec 28, 2022

    @hypeofpipe

    Same stuff, crashed today several times with the next error:

    (reason: 'crashed', code: '5')
    

    M1 Pro, Ventura 13.X.X

    image

  20. jimmyddalton commented on Jan 8, 2023

    @jimmyddalton

    I'm having the same issue, not sure why it was closed.

  21. deepak1556 commented on Jan 9, 2023

    @deepak1556
    Collaborator

    If you are facing similar crashes, please open a new issue with crash dumps following the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-a-crash-report. Thanks!

  22. locked and limited conversation to collaborators on Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions