vscode: VSCode freezing frequently after medium to long usage

  • VSCode Version: 1.28.0
  • OS Version: Windows 10

Steps to Reproduce:

After update to 1.27.0, I started seeing some freezing under vscode, but I didn’t investigate further at the time. But after this month’s 1.28.0 update, it happened 8 times in the last 8 minutes. I collected some stats when the vscode window is hung, and it seems like the main window process is using around 50% of CPU without me even typing anything. It unfreezes for some time, but if I type for 10 seconds, it freezes again. It used to crash in 1.27.0 on freezing, but that hasn’t occurred yet in 1.28.0.

Here are some logs on running code --status:

Version:          Code 1.28.0 (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-05T14:58:53.203Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)
Memory (System):  7.84GB (1.01GB free)
VM:               0%
Screen Reader:    no
Process Argv:     .
GPU Status:       2d_canvas:                    enabled
                  checker_imaging:              disabled_off
                  flash_3d:                     enabled
                  flash_stage3d:                enabled
                  flash_stage3d_baseline:       enabled
                  gpu_compositing:              enabled
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                enabled
                  video_decode:                 enabled
                  video_encode:                 enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       53   23948  code main
    0       65    9652     shared-process
   43      489   10304     window (ΓùÅ _xxxxxxxxxxx.js - catalyst-v2 - Visual Studio Code)
    0        6    1448       electron-crash-reporter
    0      164    7136       extensionHost
    0        8    9008         "C:\Users\khs\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\khs\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=7136
    0       87   10024         electron_node eslintServer.js
    0        5   14308         "C:\Users\khs\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\khs\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\cssServerMain" --node-ipc --clientProcessId=7136
    0       15   17304         electron_node server.js
    0       35   22260         electron_node server.js
    0        9   22416         C:\Users\khs\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.735\dotnet_modules\vsls-agent.exe --autoexit --pipe c5c82c8296d544e0a222cb091facc52e --service https://insiders.liveshare.vsengsaas.visualstudio.com/
    0        3   20344           console-window-host (Windows internal process)
    3      529   24552         electron_node tsserver.js
    0        8   22408           electron_node typingsInstaller.js typesMap.js
    0       12   15476       watcherService
    0        5   21268         console-window-host (Windows internal process)
    0        5   18536       searchService
    0       89   10492     gpu-process
    2       86   13816     window (Process Explorer)

Workspace Stats:
|  Window (ΓùÅ _xxxxxxxxxx.js - catalyst-v2 - Visual Studio Code)
|    Folder (yyyyyyy): more than 22404 files
|      File types: go(5411) html(3113) js(2081) png(569) css(427) h(300)
|                  gql(288) md(197) sc(100) feature(93)
|      Conf files: makefile(17) launch.json(2) package.json(2)
|                  webpack.config.js(2) settings.json(1) tasks.json(1)
|                  jsconfig.json(1)
|      Launch Configs: go chrome

Does this issue occur when all extensions are disabled?: Can’t confirm.

This issue happens erratically, but whenever it does occur, it’s mostly after prolonged usage (5 hours+). So disabling extensions is not a viable solution for me. I also have a dump file, is there a secure channel to share this info?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 17 (11 by maintainers)

Most upvoted comments

I’ve been running into this issue quite a lot lately, though it only happens to me after VS code has been running for some time (eg, 2+ hours of consecutive development). As time goes on, the freezes happen more and more frequently, often getting to a point where it’s freezing on each keystroke before I restart the program (which does resolve the freezing issues).

This first profile is of code when it's running fine (to provide some sort of baseline):

Version:          Code 1.28.1 (3368db6750222d319c851f6d90eb619d886e08f5, 2018-10-11T18:13:53.910Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz (8 x 3510)
Memory (System):  15.69GB (4.02GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Users\dalla\Projects\my-proj\Desktop
GPU Status:       2d_canvas:                    enabled
                  checker_imaging:              disabled_off
                  flash_3d:                     enabled
                  flash_stage3d:                enabled
                  flash_stage3d_baseline:       enabled
                  gpu_compositing:              enabled
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                enabled
                  video_decode:                 enabled
                  video_encode:                 enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    1       70   14956  code main
    0       89     248     window (Process Explorer)
    0       76    6028     shared-process
    1      192    9308     gpu-process
    2      416   12776     window (ΓùÅ create.component.ts - Desktop - Visual Studio Code)
    0       10    1740       electron-crash-reporter
    0      363   10372       extensionHost
    0       28    3192         C:\Users\dalla\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.790\dotnet_modules\vsls-agent.exe --autoexit --pipe 60868fd75fee4f93814c621d00ea620b --service https://insiders.liveshare.vsengsaas.visualstudio.com/
    0        5   12072           console-window-host (Windows internal process)
    0       29    7812         "C:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\html-language-features\server\dist\htmlServerMain" --node-ipc --clientProcessId=10372
    0       71    9956         electron_node server.js
    0      240   11896         electron_node server.js
    0       19   15060         "C:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=10372
    0       47   16460         "C:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\cssServerMain" --node-ipc --clientProcessId=10372
    0       65   17292         electron_node tslintServer.js
    0        5   18192         "C:\Program Files\Git\cmd\git.exe" -c core.quotepath=false -c color.ui=false blame --root --incremental --contents - -- src/app/core/models/content/ContentType.ts
    0        5   10156           console-window-host (Windows internal process)
    0        4   13428           git.exe -c core.quotepath=false -c color.ui=false blame --root --incremental --contents - -- src/app/core/models/content/ContentType.ts
    0      220   18344         electron_node tsserver.js
    0       17    1936           electron_node typingsInstaller.js typesMap.js
    0        5   18452       winpty-process
    0       46   11216         C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0        3   18820           C:\WINDOWS\system32\cmd.exe /c ""C:\Users\dalla\AppData\Roaming\npm\ng.cmd" serve"
    0      581    7916             node   "C:\Users\dalla\AppData\Roaming\npm\\node_modules\@angular\cli\bin\ng" serve
    0      245   16692               electron_node worker.js
    0        8   18640         console-window-host (Windows internal process)
    0       14   18944       watcherService
    0        5    6748         console-window-host (Windows internal process)
Workspace Stats:
|  Window (ΓùÅ create.component.ts - Desktop - Visual Studio Code)
|    Folder (Desktop): 334 files
|      File types: ts(200) html(42) scss(42) js(20) json(9) png(4) svg(3)
|                  ico(2) eot(1) yml(1)
|      Conf files: package.json(1) tsconfig.json(1) tslint.json(1)
|                  settings.json(1)

This is a profile taken while it was frozen (the main thing I see is the window process is using significantly more CPU than normal):

Version:          Code 1.28.1 (3368db6750222d319c851f6d90eb619d886e08f5, 2018-10-11T18:13:53.910Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz (8 x 3510)
Memory (System):  15.69GB (3.99GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Users\dalla\Projects\my-proj\Desktop
GPU Status:       2d_canvas:                    enabled
                  checker_imaging:              disabled_off
                  flash_3d:                     enabled
                  flash_stage3d:                enabled
                  flash_stage3d_baseline:       enabled
                  gpu_compositing:              enabled
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                enabled
                  video_decode:                 enabled
                  video_encode:                 enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       70   14956  code main
    1       86     248     window (Process Explorer)
    0       76    6028     shared-process
    0      221    9308     gpu-process
   20      388   12776     window (ΓùÅ create.component.ts - Desktop - Visual Studio Code)
    0       10    1740       electron-crash-reporter
    0      378   10372       extensionHost
    0       27    3192         C:\Users\dalla\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.790\dotnet_modules\vsls-agent.exe --autoexit --pipe 60868fd75fee4f93814c621d00ea620b --service https://insiders.liveshare.vsengsaas.visualstudio.com/
    0        5   12072           console-window-host (Windows internal process)
    0       29    7812         "C:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\html-language-features\server\dist\htmlServerMain" --node-ipc --clientProcessId=10372
    0       68    9956         electron_node server.js
    0      263   11896         electron_node server.js
    0       19   15060         "C:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=10372
    0       47   16460         "C:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\dalla\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\cssServerMain" --node-ipc --clientProcessId=10372
    0       65   17292         electron_node tslintServer.js
    0        5   18192         "C:\Program Files\Git\cmd\git.exe" -c core.quotepath=false -c color.ui=false blame --root --incremental --contents - -- src/app/core/models/content/ContentType.ts
    0        5   10156           console-window-host (Windows internal process)
    0        4   13428           git.exe -c core.quotepath=false -c color.ui=false blame --root --incremental --contents - -- src/app/core/models/content/ContentType.ts
    0      247   18344         electron_node tsserver.js
    0       17    1936           electron_node typingsInstaller.js typesMap.js
    0        5   18452       winpty-process
    0       46   11216         C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0        3   18820           C:\WINDOWS\system32\cmd.exe /c ""C:\Users\dalla\AppData\Roaming\npm\ng.cmd" serve"
    0      581    7916             node   "C:\Users\dalla\AppData\Roaming\npm\\node_modules\@angular\cli\bin\ng" serve
    0      245   16692               electron_node worker.js
    0        8   18640         console-window-host (Windows internal process)
    0       14   18944       watcherService
    0        5    6748         console-window-host (Windows internal process)
Workspace Stats:
|  Window (ΓùÅ create.component.ts - Desktop - Visual Studio Code)
|    Folder (Desktop): 334 files
|      File types: ts(200) html(42) scss(42) js(20) json(9) png(4) svg(3)
|                  ico(2) eot(1) yml(1)
|      Conf files: package.json(1) tsconfig.json(1) tslint.json(1)
|                  settings.json(1)

And finally, attached is the CPU profile. It froze 3-4 times while I was taking this profile, so hopefully there is something helpful in it. CPU-20181016T182948.zip

I’ve disabled my extensions to see if removing them will help, but only time will tell.

though it does get very slow sometimes.

When it gets slow please consult the Process Explorer ‘Help>Open Process Explorer’ and check whether the Extension Host process is consuming a lot of CPU. If it does, then please create a CPU profile of the Extension Host process ad described in the Performance wiki page.

I also get this notification whenever vscode comes out of the freeze:

image

But inspecting the processes shows that it’s actually the main window which is using CPU and not any extension or the extension host.