dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.83k stars 654 forks source link

Extension host is unresponsive while enabling C# extension #6751

Open adolfdaniel opened 6 months ago

adolfdaniel commented 6 months ago

Type: Bug

I have the C# extension enabled on my VSCode insider editor and Extention host become unresponsive every time I do anything in the editor. VSCode becomes unusable until I disable this extension.

Extension version: 2.13.10 VS Code version: Code - Insiders 1.86.0-insider (f87fb292c3af22e51a7f5c628496cd8d6fd9ecd5, 2023-12-13T08:07:18.340Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (16 x 2793)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software| |Load (avg)|undefined| |Memory (System)|63.95GB (38.09GB free)| |Process Argv|--crash-reporter-id 0d7e94f8-13a8-49e9-871d-e0f29a922d60| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythontb:30258533 pythonptprofiler:30281269 vshan820:30294714 vscod805cf:30301675 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30404738 py29gd2263:30784851 vscaac:30438845 vsclangdf:30492506 c4g48928:30535728 dsvsc012cf:30540253 a9j8j154:30646983 showlangstatbar:30737417 fixshowwlkth:30771523 showindicator:30805243 pythongtdpath:30726887 i26e3531:30792625 welcomedialog:30812478 pythonnosmt12:30779711 pythonidxpt:30768918 pythonnoceb:30776497 asynctok:30898717 dsvsc013:30777762 dsvsc014:30777825 pythonmpsinfo:30901776 dsvsc015:30821418 pythontestfixt:30866404 pythonregdiag2:30902439 pyreplss1:30879911 pythonmypyd1:30859725 pythoncet0:30859736 pythontbext0:30879054 accentitlementst:30870582 dsvsc016:30879898 dsvsc017:30880771 dsvsc018:30880772 aa_t_chat:30882232 ```
dibarbet commented 6 months ago

@adolfdaniel would you mind setting dotnet.server.trace to Trace in your vscode settings, running the repro, then attaching the contents of the C# output window here?

adolfdaniel commented 6 months ago

C# output:

Installing Razor Telemetry Version = 7.0.0-preview.23528.1...
Platform: win32, x86_64

Downloading package 'Razor Language Server Telemetry (Windows / x64)' (9395 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'Razor Language Server Telemetry (Windows / x64)'

Finished

Using dotnet configured on PATH
Dotnet path: C:\Program Files\dotnet\dotnet.exe
Activating C# + C# Dev Kit + C# IntelliCode...
Starting server at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.dll
Server arguments c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Trace --starredCompletionComponentPath c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64\components\starred-suggestions\node_modules\@vsintellicode\starred-suggestions-csharp --extension c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslynDevKit\Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 31371d14-345d-43aa-94a0-1ddd6110ff661702944404537 --telemetryLevel all --extensionLogDirectory c:\Users\adolfdaniel\AppData\Roaming\Code - Insiders\logs\20231218T111024\window1\exthost\ms-dotnettools.csharp
waiting for named pipe information from server...
[stdout] trce: Program[0]
      .NET Runtime Version: .NET 7.0.14
[stdout] dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.AnalyzerUtilities.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.CSharp.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.CSharp.Features.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.CSharp.Workspaces.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Elfie.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Features.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Razor.Compiler.CSharp.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Razor.Compiler.Language.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Razor.Compiler.Mvc.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version1_X.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version2_X.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Remote.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Scripting.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at c:\Users\adolfdaniel\.vscode-insiders\extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.roslyn\Microsoft.CodeAnalysis.Workspaces.MSBuild.dll added to workspace.
[stdout] {"pipeName":"\\\\.\\pipe\\8d88b2e1"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 4:06:57 PM] [Program] Language server initialized
[LanguageServerHost] [12:06:57.391][Start]initialize
[LanguageServerHost] [12:06:57.400][Start]Initialize
[LanguageServerHost] [12:06:57.584][End]Initialize
[LanguageServerHost] [12:06:57.646][End]initialize
[LanguageServerHost] [12:06:57.661][Start]initialized
[LanguageServerHost] [12:06:57.763][End]initialized
[LanguageServerHost] [12:06:57.800][Start]workspace/diagnostic
[LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents

Window output:

2023-12-18 11:10:25.936 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'registerIssueDataProvider' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2023-12-18 11:10:26.470 [info] Started local extension host with pid 45560.
2023-12-18 11:10:27.369 [error] Extension 'ms-python.python' wants API proposal 'saveEditor' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2023-12-18 11:10:30.196 [info] [perf] Render performance baseline is 65ms
2023-12-18 11:10:31.579 [error] Cannot read properties of undefined (reading 'querySelector'): TypeError: Cannot read properties of undefined (reading 'querySelector')
    at b.n (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2633:11406)
    at b.xtermReady (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2633:11169)
    at vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2622:52624
2023-12-18 11:53:13.759 [info] Settings Sync: Updating due to change in sessions
2023-12-18 11:57:27.186 [info] Settings Sync: Updating due to change in sessions
2023-12-18 12:06:38.112 [info] Settings Sync: Updating due to change in sessions
2023-12-18 12:06:47.193 [info] Settings Sync: Updating due to change in sessions
2023-12-18 12:43:46.510 [info] Settings Sync: Updating due to change in sessions
2023-12-18 12:47:35.818 [info] Settings Sync: Updating due to change in sessions
2023-12-18 12:48:07.506 [info] Settings Sync: Updating due to change in sessions
2023-12-18 12:50:27.440 [info] Settings Sync: Updating due to change in sessions
2023-12-18 13:28:18.305 [info] Settings Sync: Updating due to change in sessions
2023-12-18 13:31:24.464 [info] Settings Sync: Updating due to change in sessions
2023-12-18 13:36:57.682 [info] Settings Sync: Updating due to change in sessions
2023-12-18 13:37:50.985 [info] Settings Sync: Updating due to change in sessions
2023-12-18 14:20:50.083 [info] Settings Sync: Updating due to change in sessions
2023-12-18 14:25:58.381 [info] Settings Sync: Updating due to change in sessions
2023-12-18 14:28:11.209 [info] Settings Sync: Updating due to change in sessions
2023-12-18 14:29:02.764 [info] Settings Sync: Updating due to change in sessions
2023-12-18 15:09:33.660 [info] Settings Sync: Updating due to change in sessions
2023-12-18 15:15:06.119 [info] Settings Sync: Updating due to change in sessions
2023-12-18 15:15:47.978 [info] Settings Sync: Updating due to change in sessions
2023-12-18 15:17:43.692 [info] Settings Sync: Updating due to change in sessions
2023-12-18 15:53:39.997 [info] Settings Sync: Updating due to change in sessions
2023-12-18 15:58:03.918 [info] Settings Sync: Updating due to change in sessions
2023-12-18 16:03:47.975 [info] Settings Sync: Updating due to change in sessions
2023-12-18 16:06:13.259 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:13.619 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:21.234 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:21.295 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:21.782 [error] [Extension Host] (node:45560) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code - Insiders --trace-deprecation ...` to show where the warning was created)
2023-12-18 16:06:44.523 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'registerIssueDataProvider' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2023-12-18 16:06:44.958 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:45.063 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:46.059 [info] Started local extension host with pid 16192.
2023-12-18 16:06:46.098 [error] Extension 'ms-python.python' wants API proposal 'saveEditor' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2023-12-18 16:06:46.532 [error] Cannot read properties of undefined (reading 'querySelector'): TypeError: Cannot read properties of undefined (reading 'querySelector')
    at b.n (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2633:11406)
    at b.xtermReady (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2633:11169)
    at vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2622:52624
2023-12-18 16:06:47.037 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:47.063 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:47.865 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:47.896 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:48.578 [error] [Extension Host] (node:16192) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code - Insiders --trace-deprecation ...` to show where the warning was created)
2023-12-18 16:06:49.027 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:49.072 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:50.645 [warning] Settings pattern "application.*" doesn't match any settings
2023-12-18 16:06:50.669 [warning] Settings pattern "GitHub.copilot.manageExtension" doesn't match any settings
2023-12-18 16:06:50.815 [info] [perf] Render performance baseline is 34ms
2023-12-18 16:07:14.130 [info] Settings Sync: Updating due to change in sessions
2023-12-18 16:07:24.083 [info] Extension host (LocalProcess pid: 16192) is unresponsive.
2023-12-18 16:07:36.954 [error] Error: The editor could not be opened because the file was not found.
    at M.fc (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2152:25035)
    at async M.setInput (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2152:24121)
    at async g.S (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2150:24337)
    at async g.L (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2150:22946)
    at async g.openEditor (vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2150:21935)
    at async vscode-file://vscode-app/c:/Users/adolfdaniel/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2279:23222

@dibarbet

dibarbet commented 3 months ago

Apologies for the delay here. I'm not sure what we could be doing to lock up the extension host. Does this still reproduce with the latest version of the extension? Does it reproduce if you're not using vscode insiders?

adolfdaniel commented 3 months ago

@dibarbet: Yes, I can reproduce the issue in the latest extension with the latest VS Code Stable build. The code that I open is fairly a large codebase though.

dibarbet commented 1 month ago

Can you let me know if the issue reproduces when you disable just the C# Dev Kit (and intellicode) extension, and leave the C# extension active by itself?

adolfdaniel commented 1 month ago

@dibarbet: Yes, I can still reproduce the extension host being unresponsive when I just enable the C# extension.

2024-05-30 14:20:04.878 [info] Extension host (LocalProcess pid: 35468) is unresponsive.
2024-05-30 14:20:07.224 [info] Extension host (LocalProcess pid: 35468) is responsive.
2024-05-30 14:20:07.225 [info] UNRESPONSIVE extension host: received responsive event and cancelling profiling session
2024-05-30 14:20:07.225 [info] UNRESPONSIVE extension host: starting to profile NOW
2024-05-30 14:21:15.620 [info] Extension host (LocalProcess pid: 35468) is unresponsive.
2024-05-30 14:21:16.172 [info] UNRESPONSIVE extension host: starting to profile NOW