Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WakaTime extension hangs Visual Studio on shutdown #134

Open
davkean opened this issue Aug 30, 2022 · 0 comments
Open

WakaTime extension hangs Visual Studio on shutdown #134

davkean opened this issue Aug 30, 2022 · 0 comments
Labels

Comments

@davkean
Copy link

davkean commented Aug 30, 2022

Hey folks, I'm from the Visual Studio perf and reliability team, and our telemetry shows that WakaTime is hanging Visual Studio on shutdown via the following path, causing folks to kill Visual Studio via Task Manager.

 	[Async] mscorlib.dll!Task (System.Net.Http.HttpResponseMessage) [Promise]	C# <--- hangs Visual Studio until network request is completed
	[Async] WakaTime.Shared.ExtensionUtils.dll!WakaTime.Shared.ExtensionUtils.Dependencies.DownloadFile(string url, string saveAs) Line 286	C#
 	[Async] WakaTime.Shared.ExtensionUtils.dll!WakaTime.Shared.ExtensionUtils.Dependencies.InstallCli() Line 99	C#
 	[Async] WakaTime.Shared.ExtensionUtils.dll!WakaTime.Shared.ExtensionUtils.Dependencies.CheckAndInstallCli() Line 75	C#
 	[Async] WakaTime.Shared.ExtensionUtils.dll!WakaTime.Shared.ExtensionUtils.Dependencies.CheckAndInstall() Line 58	C#
 	[Async] WakaTime.Shared.ExtensionUtils.dll!WakaTime.Shared.ExtensionUtils.WakaTime.InitializeAsync() Line 62	C#
 	[Async] WakaTime.Dev17.dll!WakaTime.WakaTimePackage.InitializeAsync(System.Threading.CancellationToken cancellationToken) Line 81	C#
 	[Async] WakaTime.Dev17.dll!WakaTime.WakaTimePackage.InitializeAsync(System.Threading.CancellationToken cancellationToken, System.IProgress<Microsoft.VisualStudio.Shell.ServiceProgressData> progress) Line 65	C#
 	[Async] Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.AsyncPackage.Microsoft.VisualStudio.Shell.Interop.IAsyncLoadablePackageInitialize.Initialize.AnonymousMethod__1(System.Threading.CancellationToken token) Line 248	C#
 	[Async] [Awaited by multiple tasks/threads]	

This is occuring because WakaTime is making a network request without passing through the cancellation token through to HttpClient. Please pass through the cancellation token along this path and pass it to every method on HttpClient and HttpContent that takes it.

Thanks
Dave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants