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

RestoreOperationLogger.Do blocks thread pool threads #5663

Closed
sharwell opened this issue Jul 28, 2017 · 1 comment
Closed

RestoreOperationLogger.Do blocks thread pool threads #5663

sharwell opened this issue Jul 28, 2017 · 1 comment

Comments

@sharwell
Copy link

Using Visual Studio 2017 (15.3 Preview 6) to open Roslyn.sln.

RestoreOperationLogger.Do performs a blocking wait operation on thread pool threads totaling 1575 seconds, contributing to thread pool starvation. One of the following approaches should be used to avoid blocking calls on these threads:

  1. Make Do (and its callers) properly asynchronous.
  2. Use TaskCreationOptions.LongRunning (or equivalent) to ensure the call is made on a separate thread.

The following shows the back trace for this issue:

microsoft.visualstudio.threading.ni!JoinableTaskFactory.WaitSynchronously
microsoft.visualstudio.threading.ni!JoinableTask.CompleteOnCurrentThread
NuGet.SolutionRestoreManager!RestoreOperationLogger.Do
NuGet.SolutionRestoreManager!RestoreOperationLogger.Log
NuGet.Common!LoggerBase.Log
NuGet.Common!LoggerBase.LogInformation
NuGet.Commands!NuGet.Commands.RestoreRunner+<CommitAsync>d__8.MoveNext()
mscorlib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.__Canon].Start(!!0&)
NuGet.Commands!RestoreRunner.CommitAsync
NuGet.Commands!NuGet.Commands.RestoreRunner+<ExecuteAndCommitAsync>d__6.MoveNext()
mscorlib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.__Canon].Start(!!0&)
NuGet.Commands!RestoreRunner.ExecuteAndCommitAsync
NuGet.Commands!NuGet.Commands.RestoreRunner+<>c__DisplayClass2_0.<RunAsync>b__0()
mscorlib.ni!Task.Execute
mscorlib.ni!Task.ExecutionContextCallback
mscorlib.ni!ExecutionContext.Run
mscorlib.ni!Task.ExecuteWithThreadLocal
mscorlib.ni!Task.ExecuteEntry
mscorlib.ni!IThreadPoolWorkItem.ExecuteWorkItem
mscorlib.ni!_ThreadPoolWaitCallback.PerformWaitCallback
@sharwell
Copy link
Author

📝 I'm looking into this one

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

No branches or pull requests

2 participants