microsoft / sarif-vscode-extension

SARIF Microsoft Visual Studio Code extension
MIT License
111 stars 51 forks source link

VS Code is spawning 100's of rg processes #573

Open Jason3S opened 2 months ago

Jason3S commented 2 months ago

Copied from: https://github.com/microsoft/vscode/issues/228877

Type: Bug

It is hard to "reproduce" because I don't know the cause.

The only difference between yesterday and today is SARIF started running.

I start up VS Code very soon, the rg process get launched.

The problem gets worse if I try to edit code.

VS Code version: Code 1.93.1 (Universal) (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Darwin x64 23.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|750, 473, 614| |Memory (System)|32.00GB (8.25GB free)| |Process Argv|--crash-reporter-id 21ae0ece-62a2-4681-a5cf-c687ea23e753| |Screen Reader|no| |VM|0%|
Extensions (95) Extension|Author (truncated)|Version ---|---|--- terraform|4op|0.2.5 ada|Ada|25.0.20240915 commit-message-editor|ada|0.25.0 tsl-problem-matcher|amo|0.6.2 alignment|ann|0.3.0 cpupro|ant|0.1.1 vscode-zipfs|arc|3.0.0 astro-vscode|ast|2.14.2 npm-intellisense|chr|1.4.5 jison-syntax-highlight|cru|0.1.1 scala|dal|0.0.5 vscode-jq-playground|dav|4.3.5 vscode-eslint|dba|3.0.13 vscode-wasm|dts|1.4.1 gitlens|eam|15.5.1 EditorConfig|Edi|0.16.4 prettier-vscode|esb|11.0.0 linter-gfortran|for|3.2.0 copilot|Git|1.229.0 copilot-chat|Git|0.20.1 remotehub|Git|0.64.0 vscode-github-actions|git|0.26.5 vscode-pull-request-github|Git|0.96.0 gitpod-desktop|git|0.0.173 yaml-plus-json|hil|1.12.2 mediawiki|jak|2.1.0 latex-workshop|Jam|10.3.2 svg|joc|1.5.4 jq-syntax-highlighting|jq-|0.0.2 vscode-tree-sitter-query|jri|0.0.6 language-haskell|jus|3.6.0 vscode-cfml|Kam|0.5.4 bison|lun|0.1.0 Kotlin|mat|1.7.1 Lisp|mat|0.1.12 rainbow-csv|mec|3.12.0 dotenv|mik|1.0.1 vscode-apache|mrm|1.2.0 vscode-puglint|mrm|2.3.0 vscode-azureresourcegroups|ms-|0.9.5 vscode-docker|ms-|1.29.2 vscode-language-pack-de|MS-|1.93.2024091109 vscode-dotnet-runtime|ms-|2.1.5 al|ms-|13.1.1065068 playwright|ms-|1.1.7 black-formatter|ms-|2024.2.0 debugpy|ms-|2024.10.0 isort|ms-|2023.10.1 python|ms-|2024.14.1 vscode-pylance|ms-|2024.9.1 sarif-viewer|MS-|3.4.4 jupyter|ms-|2024.8.1 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.19 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-containers|ms-|0.384.0 remote-ssh|ms-|0.114.3 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.88.3 azure-account|ms-|0.12.0 azure-repos|ms-|0.40.0 cpptools|ms-|1.21.6 cpptools-extension-pack|ms-|1.3.0 live-server|ms-|0.4.15 powershell|ms-|2024.2.2 remote-explorer|ms-|0.4.3 remote-repositories|ms-|0.42.0 test-adapter-converter|ms-|0.1.9 vscode-js-profile-flame|ms-|1.0.9 vsliveshare|ms-|1.0.5940 vetur|oct|0.37.3 common-lisp|qin|1.2.11 vscode-yaml|red|1.15.0 rust-analyzer|rus|0.3.2112 es6-mocha-snippets|spo|0.2.2 avro|str|0.5.0 code-spell-checker|str|4.0.13 code-spell-checker-british-english|str|1.4.11 code-spell-checker-portuguese|str|2.0.2 code-spell-checker-portuguese-brazilian|str|2.2.1 hunspell|str|1.0.4 iconfont-preview|stx|0.0.5 svelte-vscode|sve|109.0.1 even-better-toml|tam|0.19.2 msbuild-project-tools|tin|0.6.5 es6-string-html|Tob|2.16.0 vscode-mdx|uni|1.8.10 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-gradle|vsc|3.16.4 vscode-java-debug|vsc|0.58.0 debug|web|0.27.0 php-debug|xde|1.35.0 php-intellisense|zob|1.3.3 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 vscaac:30438847 c4g48928:30535728 azure-dev_surveyone:30548225 vscrp:30673768 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 945dj816:31013170 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 impr_priority:31102340 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 nativeloc2:31134642 wkspc-ranged-c:31125598 autoexpandse:31133494 fje88620:31121564 ```
Process Explorer ``` Process Name CPU (%) Memory (MB) PID code main 17 295 62418 gpu-process 1 98 62421 utility-network-service 0 33 62422 window [2] (Flatpack.mts — cspell (Workspace)) 0 590 62424 ptyHost 0 66 62617 /bin/zsh -il 0 0 65608 shared-process 0 164 62633 fileWatcher [2] 0 33 62748 extensionHost [2] 0 918 62793 electron-nodejs (tsserver.js ) 0 131 63005 electron-nodejs (tsserver.js ) 0 295 63007 electron-nodejs (typingsInstaller.js typesMap.js ) 0 66 66894 electron-nodejs (server.js ) 1 164 63150 mdx-language-server 0 66 66222 electron-nodejs (eslintServer.js ) 0 164 70831 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/jason/.vscode/extensions/streetsidesoftware.code-spell-checker-4.0.13/packages/_server/dist/main.cjs --node-ipc --clientProcessId=62793 0 229 70832 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/jason/.vscode/extensions/streetsidesoftware.code-spell-checker-4.0.13/packages/_serverPatternMatcher/dist/main.cjs --node-ipc --clientProcessId=62793 2 66 71784 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=62793 0 33 72610 electron-nodejs (server-node.js ) 0 66 72845 (rg) 0 0 87210 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 14 0 87253 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 7 0 87296 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 15 0 87326 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 7 0 87377 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 16 0 87407 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 6 0 87437 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 7 0 87467 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 13 0 87497 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 8 0 87527 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 6 0 87557 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/Flatpack.mts -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !/docs -g !/packages/dynamic-import -g !/integration-tests -g !/packages/cspell-bundled-dicts -g !/packages/cspell-config-lib -g !/packages/cspell-dictionary -g !/packages/cspell-eslint-plugin -g !/packages/cspell-filetypes -g !/packages/cspell-gitignore -g !/packages/cspell-glob -g !/packages/cspell-grammar -g !/packages/cspell-io -g !/packages/cspell-json-reporter -g !/packages/cspell-lib -g !/packages/cspell-normalize-json -g !/packages/cspell-pipe -g !/packages/cspell-resolver -g !/packages/cspell-service-bus -g !/packages/cspell-strong-weak-map -g !/packages/cspell-tools -g !/packages/cspell-trie-lib -g !/packages/cspell-trie -g !/packages/cspell-types -g !/packages/cspell-url -g !/packages/cspell -g !/packages/hunspell-reader -g !/test-packages -g !/rfc -g !/website --no-ignore --follow --no-config --no-ignore-global 7 0 87599 ```

Yesterday 2024-09-17, the SARIF extension popped up and suggested scanning the currently opened repo (it did this for each repo I had opened). It hadn't done that before. Out of curiosity, I clicked connect. At first there wasn't an issue, but as I edited files, more and more rg processes were spawned. It got so bad, it was difficult to do anything on the computer.

Closing VS Code caused the problem to go away (along with all the rg processes). But when VS Code was restarted, the problem came back quickly.

After disabling the SARIF extension, the problem is gone.

enricojonas commented 1 month ago

Suffering the same issue. It's like for 10seconds. One thing that is interesting is that if used in combination with CodeTogether Live it hogs 100% CPU forever?!