microsoft / vscode

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

Memory Leak in MultiCursor mode with MSSQL Connection #209716

Closed aviralgoyal closed 6 months ago

aviralgoyal commented 7 months ago

Type: Performance Issue

using sql extension to connect to sql server and language detected is SQL and then using multicursor mode to write queries causes a memory leak. Please note that memory leak does not happen when the langauage detected is not sql and I've tried with batch file, it does not happen.

VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2803)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.80GB (8.44GB free)| |Process Argv|--crash-reporter-id b99f3e9a-b490-4689-88cd-a9c53cc3838d| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 111 22020 code main 0 205 2120 window [1] (Welcome - Visual Studio Code) 0 78 2608 fileWatcher [1] 0 29 4520 crashpad-handler 0 94 11244 window [2] (Issue Reporter) 1 155 15732 gpu-process 0 107 16836 shared-process 2 215 18140 extensionHost [1] 0 85 7796 "C:\Users\aurig\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\aurig\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=18140 0 43 19476 utility-network-service ```
Workspace Info ``` ; ```
Extensions (50) Extension|Author (truncated)|Version ---|---|--- switcher|adr|1.0.4 Bookmarks|ale|13.5.0 ng-template|Ang|17.3.1 vscode-node-debug-process-picker|apr|1.0.0 npm-intellisense|chr|1.4.5 vscode-eslint|dba|2.4.4 xml|Dot|2.5.1 gitlens|eam|14.9.0 prettier-vscode|esb|10.4.0 vscode-firefox-debug|fir|2.9.10 copilot|Git|1.178.807 copilot-chat|Git|0.14.0 angular2-switcher|inf|0.4.0 Angular2|joh|16.0.1 node-module-intellisense|lei|1.5.0 dotenv|mik|1.0.1 vscode-edge-devtools|ms-|2.1.5 data-workspace-vscode|ms-|0.5.0 mssql|ms-|1.22.1 sql-database-projects-vscode|ms-|1.4.1 remote-ssh|ms-|0.111.2024040515 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.88.0 js-debug-nightly|ms-|2024.4.517 remote-explorer|ms-|0.4.3 vs-sequential-number|nep|1.1.0 material-icon-theme|PKi|4.34.0 vscode-thunder-client|ran|2.20.3 fabric8-analytics|red|0.9.4 java|red|1.29.0 vscode-xml|red|0.26.1 LiveServer|rit|5.7.9 eta-vscode|sha|1.0.0 vscode-scss-formatter|sib|3.0.0 csharp-region-manager|sua|1.0.11 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-boot-dev-pack|vmw|0.2.1 vscode-spring-boot|vmw|1.53.0 vscode-java-debug|vsc|0.57.0 vscode-java-dependency|vsc|0.23.6 vscode-java-pack|vsc|0.26.0 vscode-java-test|vsc|0.41.0 vscode-maven|vsc|0.44.0 vscode-spring-boot-dashboard|vsc|0.13.1 vscode-spring-initializr|vsc|0.11.2 vscode-nginx|wil|0.7.2 JavaScriptSnippets|xab|1.8.0 markdown-all-in-one|yzh|3.6.2 html-css-class-completion|Zig|1.20.0
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp1r6:30993540 dsvsc020:30976470 pythonait:31006305 gee8j676:31009558 dsvsc021:30996838 gd77d436:30999572 ```
IllusionMH commented 7 months ago

So issue doesn't happen if SQL extension is disabled?

Looks like issue with an extension. Have you filled the issue in extension's repo first?

aviralgoyal commented 7 months ago

Does detection as SQL Language automatically link it to the extension or does creating a connection with SQL server link it to the extension?

On Sat, Apr 6, 2024 at 8:57 PM Andrii Dieiev @.***> wrote:

So issue doesn't happen if SQL extension is disabled?

Looks like issue with an extension. Have you filled the issue in extension's repo first?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/209716#issuecomment-2041118239, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHRAWDW4BYNJTWK6CIWPCJ3Y4AH4RAVCNFSM6AAAAABF2QA5PGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGEYTQMRTHE . You are receiving this because you authored the thread.Message ID: @.***>

IllusionMH commented 7 months ago

Depends on the extension's activation events.

You can follow steps from bot below to investigate and confirm origin.

/confirmPlease

vscodenpa commented 7 months ago

Please diagnose the root cause of the issue by running the command F1 > Help: Troubleshoot Issue and following the instructions. Once you have done that, please update the issue with the results.

Happy Coding!

aviralgoyal commented 7 months ago

Thank you for your lightning fast reply, I ran the troubleshoot and can confirm the issue is with the mssql extension and not vs code. Thanks a ton!

On Sat, Apr 6, 2024 at 10:34 PM VSCode Triage Bot @.***> wrote:

Please diagnose the root cause of the issue by running the command F1 > Help: Troubleshoot Issue and following the instructions. Once you have done that, please update the issue with the results.

Happy Coding!

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/209716#issuecomment-2041139353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHRAWDRPP35WSBV253DDH4DY4ATKRAVCNFSM6AAAAABF2QA5PGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGEZTSMZVGM . You are receiving this because you authored the thread.Message ID: @.***>

IllusionMH commented 6 months ago

/causedByExtension

As it's caused by extension, please create issue in extension's repo (if you haven't done that already) Bot will close this one as it's not in VS Code editor itself.

vscodenpa commented 6 months ago

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!