microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.98k stars 28.78k forks source link

VSCode randomly semi-freezes #112269

Closed MMK21Hub closed 3 years ago

MMK21Hub commented 3 years ago

Issue Type: Bug

  1. Use VSCode for a while
  2. Eventually it will go into a state when you can't type

Sorry that this isn't reliable to reproduce. I have not had this problem with another app that uses the Monaco Editor.

VS Code version: Code - Insiders 1.52.0-insider (dbbf7079b20b3036b3ff5ac2e2106b84dd3c6d66, 2020-12-10T17:20:40.435Z) OS version: Windows_NT x64 10.0.19041

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (6 x 2808)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|7.83GB (0.97GB free)| |Process Argv|--crash-reporter-id 746c4b6f-8c89-4002-834d-2cd392012f8b| |Screen Reader|no| |VM|0%|
Extensions (27) Extension|Author (truncated)|Version ---|---|--- overtype|ada|0.2.0 vscode-markdownlint|Dav|0.38.0 gc-excelviewer|Gra|3.0.40 svg|joc|1.4.2 vscode-insertdatestring|jsy|2.3.0 python|ms-|2020.11.371526539 vscode-pylance|ms-|2020.12.1 jupyter|ms-|2020.12.414227025 typescript-javascript-grammar|ms-|0.0.55 debugger-for-chrome|msj|4.12.11 terminal-command-keys|pet|0.3.0 quicktype|qui|12.0.46 LiveServer|rit|5.6.1 vscode-autohotkey|sle|0.2.2 datapack-language-server|SPG|3.2.0 vscode-nested-tags|vsc|1.7.0 mcmeta|xTe|0.0.1 markdown-all-in-one|yzh|3.4.0 html-css-class-completion|Zig|1.19.0
sandy081 commented 3 years ago

Can you please follow this wiki - https://github.com/microsoft/vscode/wiki/Performance-Issues and provide us necessary info that can help us in diagnosing the issue.

MMK21Hub commented 3 years ago

Here's the process explorer: image

MMK21Hub commented 3 years ago
PS C:\Users\KAGfa> code-insiders --status

(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
Version:          Code - Insiders 1.53.0-insider (c927a8015b9e26bd454d6e293bb0384aa1975d06, 2020-12-18T05:27:48.567Z)
OS Version:       Windows_NT x64 10.0.19041
CPUs:             Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (6 x 2808)
Memory (System):  7.83GB (0.59GB free)
VM:               0%
Screen Reader:    no
Process Argv:     D:\My Stuff\Backups\Discord\Knowledge Base 2020-12-21\Knowledge Base - 😎Staff - ✅reviewed-suggestions [732624340528529540].json --crash-reporter-id 746c4b6f-8c89-4002-834d-2cd392012f8b
GPU Status:       2d_canvas:                  enabled
                  gpu_compositing:            enabled
                  multiple_raster_threads:    enabled_on
                  oop_rasterization:          enabled
                  opengl:                     enabled_on
                  protected_video_decode:     enabled
                  rasterization:              enabled
                  skia_renderer:              enabled_on
                  video_decode:               enabled
                  vulkan:                     disabled_off
                  webgl:                      enabled
                  webgl2:                     enabled

CPU %   Mem MB     PID  Process
    0       76    7356  code-insiders main
    0        2    8568     C:\Users\KAGfa\AppData\Local\Temp\vscode-update-user-x64\CodeSetup-insider-4a875e23d20b64504a818834f3fa4c40adb8d480.exe /verysilent /update="C:\Users\KAGfa\AppData\Local\Temp\vscode-update-user-x64\CodeSetup-insider-4a875e23d20b64504a818834f3fa4c40adb8d480.flag" /nocloseapplications /mergetasks=runcode,!desktopicon,!quicklaunchicon    0        2   14020       "C:\Users\KAGfa\AppData\Local\Temp\is-7VISP.tmp\CodeSetup-insider-4a875e23d20b64504a818834f3fa4c40adb8d480.tmp" /SL5="$660BD2,68694668,827904,C:\Users\KAGfa\AppData\Local\Temp\vscode-update-user-x64\CodeSetup-insider-4a875e23d20b64504a818834f3fa4c40adb8d480.exe" /verysilent /update="C:\Users\KAGfa\AppData\Local\Temp\vscode-update-user-x64\CodeSetup-insider-4a875e23d20b64504a818834f3fa4c40adb8d480.flag" /nocloseapplications /mergetasks=runcode,!desktopicon,!quicklaunchicon
    0      249   15656     window (test.py - Mojira - Visual Studio Code - Insiders)
    0      145   10640       extensionHost
    0       14    3836         electron_node server.js
    0       14    6180         "D:\My Stuff\Code\Thins that help u 2 code code\VS Code Insiders\Code - Insiders.exe" "d:\My Stuff\Code\Thins that help u 2 code code\VS Code Insiders\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=10640
    0       22   11036         electron_node server.js
    0       53   16292         electron_node bundle.js
    0       12   23892         electron_node serverMain.js
    0       17   29608         electron_node eslintServer.js
    0        9   14296       C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0       12   19588       C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0        7   21556       console-window-host (Windows internal process)
    0        7   22396       console-window-host (Windows internal process)
    0       16   24068       watcherService
    0        6   16308         console-window-host (Windows internal process)
    0        7   32696       console-window-host (Windows internal process)
    0       13   36708       C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0       16   17224     utility
    0       46   21928     shared-process
    0      173   22736     gpu-process
    0        6   23744     crashpad-handler

Workspace Stats:
|  Window (test.py - Mojira - Visual Studio Code - Insiders)
|    Folder (Mojira): 13 files
|      File types: md(3) py(2) code-snippets(1)
|      Conf files:
sandy081 commented 3 years ago

Nothing suspecting from above info.

Please profile your renderer using this link - https://github.com/microsoft/vscode/wiki/Performance-Issues#profiling-the-renderer-process and share us the profile.

Indy9000 commented 3 years ago

sporadically freezes while typing or scrolling and unfreezes after a second or so. Happens very frequently this makes VSCode pretty unusable.

Here's the VSCODE info

Version: 1.52.1 Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523 Date: 2020-12-16T16:30:02.420Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 20.2.0

Extensions: Go, Flutter, Dart

sandy081 commented 3 years ago

Please profile your renderer using this link - https://github.com/microsoft/vscode/wiki/Performance-Issues#profiling-the-renderer-process and share us the profile.

MMK21Hub commented 3 years ago

Managed to get a profile.

https://cdn.discordapp.com/attachments/740615539340214382/799215104016646154/CPU-20210114T093155.cpuprofile

sandy081 commented 3 years ago

I do not see any suspicious things in the profile

@MMK21Hub It could be also due to an extension - have you checked that?

@jrieken Do you have any other suggestions for the user to follow to know about the perf issue?

jrieken commented 3 years ago

Profiling is the best but sometimes it is tricky to capture the actual slowness when profiling. I can only recommend to keep trying

ucirello commented 3 years ago

I tried running VSCode in safe mode (code --disable-extensions) and the behavior is the same as when the extensions are enabled. As it is, I can use it for read operations only. Actual interactive operation is not usable anymore.

I attached the JS profile as per in https://github.com/microsoft/vscode/wiki/Performance-Issues#profiling-the-renderer-process

CPU-20210121T064124.cpuprofile.zip

jrieken commented 3 years ago
image

Thanks. I see that spawning at +1.5sec which isn't good. This can happen on macOS BigSur and windows. Passing it to @deepak1556

ucirello commented 3 years ago

I see that spawning at +1.5sec which isn't good.

Well - the freeze happens after the shell has spawned. So there may be two instead of one problem.

lukel97 commented 3 years ago

Chiming in here to say I'm also getting pauses on big sur with extensions disabled, with a similar looking profiler trace as @jrieken Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:30:02.420Z)

image
deepak1556 commented 3 years ago

@ucirello @bubba @Indy9000 the issue you are facing is tracked at https://github.com/microsoft/vscode/issues/105446 , please follow that for updates. Thanks!

You can check https://github.com/electron/electron/pull/27026 and the corresponding libuv issue for more details on the root issue.

deepak1556 commented 3 years ago

@MMK21Hub do you continue to see the issue with latest insiders 1.53

MMK21Hub commented 3 years ago

I have just experienced the issue again. image

deepak1556 commented 3 years ago

@MMK21Hub can you open a new issue with the --status and cpu profile results. Thanks!