UI Hang - Deadlock initializing NuGet.SolutionRestoreManager.RestoreManagerPackage #4371

Closed
rrelyea opened this Issue Jan 23, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@rrelyea
Contributor

rrelyea commented Jan 23, 2017

Notes from Internal bug: 369371
This is a deadlock in initializing an async package

The package being initialized is NuGet.SolutionRestoreManager.RestoreManagerPackage.
 
From msenv.dll!CVsPackageMgr::CVsPackageInfo::SitePackage:
 
    // THREADING: This will deadlock if the users async task needs to run code on the UI thread
    // to complete and they have scheduled it using the WPF dispatcher (directly, which would be
    // very hard for an async loading package, or indirectly via something like ThreadHelper.BeginInvoke).
    // What they need to do is use the task library stuff or joinable task factory instead. If you are
    // investigating a deadlock in your package and are reading this under the debugger then 'they' means
    // 'you'.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Feb 6, 2017

Contributor

@alpaix any updates on this issue? This has a fairly high hit count. Not clear if all 43 hits are from NuGet however.

Contributor

emgarten commented Feb 6, 2017

@alpaix any updates on this issue? This has a fairly high hit count. Not clear if all 43 hits are from NuGet however.

@rrelyea rrelyea modified the milestones: 4.0 RTM, 4.0 RC4 Feb 6, 2017

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Feb 6, 2017

Contributor

Probably not fixed. Need to investigate. 34 hits in RC2. 1 hit in RC3.

Contributor

rrelyea commented Feb 6, 2017

Probably not fixed. Need to investigate. 34 hits in RC2. 1 hit in RC3.

@emgarten emgarten self-assigned this Feb 10, 2017

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Feb 13, 2017

Contributor

1 hit on RC.4 it looks like this may have been improved by: NuGet/NuGet.Client@abb6b0e
and looking at that hit, it doesn't look like we are involved.

Contributor

emgarten commented Feb 13, 2017

1 hit on RC.4 it looks like this may have been improved by: NuGet/NuGet.Client@abb6b0e
and looking at that hit, it doesn't look like we are involved.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Feb 13, 2017

Contributor

In investigating the hang dump from RC.4 I do not see NuGet.SolutionRestoreManager as loaded in the hang. I believe a different VSIX is causing these remaining hangs.

The original issue with NuGet seems to be fixed.

Contributor

emgarten commented Feb 13, 2017

In investigating the hang dump from RC.4 I do not see NuGet.SolutionRestoreManager as loaded in the hang. I believe a different VSIX is causing these remaining hangs.

The original issue with NuGet seems to be fixed.

@emgarten emgarten closed this Feb 13, 2017

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Mar 3, 2017

Contributor

Old title: [Watson] apphangb1: APPLICATION_HANG_BusyHang_cfffffff_Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.VsTaskLibraryHelper+__c__DisplayClass24_0_1+__AsVsTask_b__1_d[[System.__Canon,_mscorlib]].MoveNext

Contributor

rrelyea commented Mar 3, 2017

Old title: [Watson] apphangb1: APPLICATION_HANG_BusyHang_cfffffff_Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.VsTaskLibraryHelper+__c__DisplayClass24_0_1+__AsVsTask_b__1_d[[System.__Canon,_mscorlib]].MoveNext

@rrelyea rrelyea changed the title from [Watson] apphangb1: APPLICATION_HANG_BusyHang_cfffffff_Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.VsTaskLibraryHelper+__c__DisplayClass24_0_1+__AsVsTask_b__1_d[[System.__Canon,_mscorlib]].MoveNext to UI Hang - Deadlock initializing NuGet.SolutionRestoreManager.RestoreManagerPackage Mar 3, 2017

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