microsoft / vscode

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

version 1.53 consumes 100% CPU on Linux #116092

Closed jungand closed 3 years ago

jungand commented 3 years ago

We have written the needed data into your clipboard because it was too large to send. Please paste.

Issue Type: Performance Issue

Working with this version was no longer possible so I had to downgrade to 1.52, with works as usual. The Extension Bisect tool didn't find any critical extension.

Version: 1.52.1 Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523 Date: 2020-12-16T16:32:10.090Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Linux x64 3.10.0-1160.11.1.el7.x86_64

VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:32:10.090Z) OS version: Linux x64 3.10.0-1160.11.1.el7.x86_64

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (4 x 2699)| |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: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|15.38GB (0.46GB free)| |Process Argv|--no-sandbox --unity-launch --crash-reporter-id ff211164-f91c-41c3-8aac-e152b45c1c0e| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|gnome-classic| |XDG_CURRENT_DESKTOP|GNOME-Classic:GNOME| |XDG_SESSION_DESKTOP|gnome-classic| |XDG_SESSION_TYPE|x11|
Process Info ``` CPU % Mem MB PID Process 0 94 18792 code main 0 16 18796 zygote 0 47 18833 gpu-process 0 16 18797 zygote 1 31 23082 window (Issue Reporter) 0 31 18858 utility 0 142 18874 window (Welcome to GitLens - rcm-prov-infra (Workspace) - Visual Studio Code) 0 142 18998 extensionHost 0 47 19506 electron_node server.js 0 31 18999 watcherService 0 31 19037 searchService 0 63 19080 shared-process 0 0 23102 /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 63 22944 window (undefined) ```
Workspace Info ``` | Window (Welcome to GitLens - rcm-prov-infra (Workspace) - Visual Studio Code) | Folder (nodejs-package): 0 files | File types: | Conf files: | Folder (rcm-admin-docs-general): 49 files | File types: md(29) png(14) gif(2) jpg(1) | Conf files: | Folder (susiserver2): 45 files | File types: js(13) pl(8) md(6) out(4) json(2) gitignore(1) txt(1) | conf(1) raw(1) pm(1) | Conf files: package.json(1) | Folder (rcm-datamodel): 1465 files | File types: md(706) pl(1) | Conf files: | Folder (rcm-web-portal): 87 files | File types: stanza(10) md(6) sql(6) xml(3) properties(3) ora(3) pl(3) | cgi(3) profile(2) conf(2) | Conf files: | Folder (rcm-wiki-md): 480 files | File types: md(167) png(85) jpg(41) pdf(18) txt(9) html(8) odp(6) | xls(4) zip(3) odt(3) | Conf files:; ```
Extensions (31) Extension|Author (truncated)|Version ---|---|--- node-essentials|afr|1.1.0 vscode-icontheme-nomo-dark|be5|1.3.6 markdown-preview-github-styles|bie|0.1.6 tcl|bit|0.4.0 node-snippets|chr|1.3.2 path-intellisense|chr|2.3.0 perl-toolbox|d97|1.4.0 vscode-eslint|dba|2.1.14 gitlens|eam|11.2.1 EditorConfig|Edi|0.16.4 perl-completions|erg|1.0.2 vscode-pull-request-github|Git|0.23.0 vscode-perl|hen|1.17.0 perl-syntax|jac|0.0.7 mojolicious|kra|1.9.0 dotenv|mik|1.0.1 perl-debug|mor|0.6.3 vscode-kubernetes-tools|ms-|1.2.3 vscode-typescript-tslint-plugin|ms-|1.3.3 vsliveshare|ms-|1.0.3629 debugger-for-chrome|msj|4.12.12 oracledevtools|Ora|19.3.3 vscode-jest|Ort|3.2.0 fabric8-analytics|red|0.3.1 vscode-yaml|red|0.14.0 perltidy|sfo|1.3.2 vscodeintellicode|Vis|1.2.11 quokka-vscode|Wal|1.0.341 vscode-import-cost|wix|2.15.0 plsql-language|xyz|1.8.2 markdown-all-in-one|yzh|3.4.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 pythonvspyt617cf:30253240 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30211402 pythonvsdeb440:30248342 pythonvsded773:30248341 vstes627:30244334 pythonvspyt600cf:30251589 ```
gjsjohnmurray commented 3 years ago

To make any progress on this issue the dev team will need the performance reports from when 1.53 is installed and the problem is happening. The information you submitted here is from 1.52.1.

See also https://github.com/microsoft/vscode/wiki/Performance-Issues

gjsjohnmurray commented 3 years ago

Alternatively, install Insiders (1.54) alongside your downgraded Stable (1.52.1) and try to reproduce the issue there.

MiriPii commented 3 years ago

I have the same issue with the current stable and insider -builds on CentOS7, installed from official rpm-repo. Unfortunately, the Report Issue-tool is not functional for the affected builds.

Affected builds (that I tested) on my system:

No issues with previous stable rpm (1.52):

Behaviour

Watching at htop for a while, I could see that the process spun up each of the cores to the max one at a time.

System specs

Report from build 1.52:

CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 3411)
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: unavailable_off rasterization: disabled_software skia_renderer: enabled_on video_decode: unavailable_off vulkan: disabled_off webgl: enabled webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 15.33GB (6.48GB free)
Process Argv --disable-extensions --no-sandbox --crash-reporter-id b94169cd-72d6-4273-a21d-fe4f00dde1d6
Screen Reader no
VM 0%
gjsjohnmurray commented 3 years ago

Might relate to #115784

Tyriar commented 3 years ago

The process information isn't showing any process consuming much CPU, do you know what process is causing the problem?

image

gjsjohnmurray commented 3 years ago

@Tyriar the performance data posted by @jungand seems to have been generated after downgrading to 1.52.1. I have already requested new info.

MiriPii commented 3 years ago

The process information isn't showing any process consuming much CPU, do you know what process is causing the problem?

image

As I said in my post as well, the Report Issue-tool is not functioning at all with the builds that consume a lot of CPU; namely rpm-builds v1.53.0 and 1.54.0-insider. My and OP's system statistics are from the working build (1.52).

We need another way to debug this than the Report Issue -tool, any suggestions?

gjsjohnmurray commented 3 years ago

@MiriPii the underlying problem is detailed in #115784. Versions after 1.52.1 are currently giving various problems on RHEL7/CentOS7 etc.

deepak1556 commented 3 years ago

I will document in the other issue about the issue with RHEL7/CentOS7, tl:dr; it is not supported officially from v1.53 and above.

jungand commented 3 years ago

sorry, had to finish some work on my project before I got some minutes to dive deeper into this issue.

The 'Report Issue' function doesn't open so I've created the output this way:

$ code --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. [2551:0208/200726.620705:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process. Version: Code 1.53.0 (8490d3dde47c57ba65ec40dd192d014fd2113496, 2021-02-03T15:56:04.185Z) OS Version: Linux x64 3.10.0-1160.11.1.el7.x86_64 CPUs: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (4 x 2668) Memory (System): 15.38GB (1.26GB free) Load (avg): 2, 3, 3 VM: 0% Screen Reader: no Process Argv: --no-sandbox --unity-launch --crash-reporter-id ff211164-f91c-41c3-8aac-e152b45c1c0e GPU Status: 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: disabled_software skia_renderer: enabled_on video_decode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled

CPU % Mem MB PID Process 0 79 2265 code main 0 16 2268 zygote 0 31 2298 gpu-process 0 16 2269 zygote 0 31 2308 utility 0 157 2318 window (Welcome - rcm-prov-infra (Workspace) - Visual Studio Code) 25 110 2408 extensionHost 0 31 2420 watcherService 0 31 2435 searchService 0 94 2445 shared-process

Workspace Stats: | Window (Welcome - rcm-prov-infra (Workspace) - Visual Studio Code) | Folder (nodejs-package): 0 files | File types: | Conf files: | Folder (rcm-admin-docs-general): 49 files | File types: md(29) png(14) gif(2) jpg(1) | Conf files: | Folder (susiserver2): 45 files | File types: js(13) pl(8) md(6) out(4) json(2) gitignore(1) txt(1) | conf(1) raw(1) pm(1) | Conf files: package.json(1) | Folder (rcm-datamodel): 1465 files | File types: md(706) pl(1) | Conf files: | Folder (rcm-web-portal): 92 files | File types: stanza(10) md(9) sql(8) xml(3) properties(3) ora(3) pl(3) | cgi(3) profile(2) conf(2) | Conf files: | Folder (rcm-wiki-md): 480 files | File types: md(167) png(85) jpg(41) pdf(18) txt(9) html(8) odp(6) | xls(4) zip(3) odt(3) | Conf files:

I tried to 'Disable All Installed Extensions' but this didn't have any effect.

Then I've installed code-insiders-1.54.0-1612761896.el7.x86_64.rpm and started it up with no extensions installed. Still 100% CPU usage.

deepak1556 commented 3 years ago

@jungand which distro is this ?

jungand commented 3 years ago

$ cat /etc/os-release NAME="Red Hat Enterprise Linux Workstation" VERSION="7.9 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Workstation" VARIANT_ID="workstation" VERSION_ID="7.9" PRETTY_NAME="Red Hat Enterprise Linux Workstation 7.9 (Maipo)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:workstation" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.9 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.9"

deepak1556 commented 3 years ago

Thanks, this is dupe of https://github.com/microsoft/vscode/issues/115784 , RHEL 7 is not officially supported with 1.53 and above, you can check https://github.com/microsoft/vscode/issues/115784#issuecomment-775224787 for fixing the cpu usage.