Visual Studio deadlocks if you add TFM in targetframeworks, save, then build. 10% of time #4295

Closed
rrelyea opened this Issue Jan 16, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@rrelyea
Contributor

rrelyea commented Jan 16, 2017

@NickCraver reported this.
Perhaps similar issue to #4257

Came from Balaji via dotnet/project-system#1174 (comment)

@rrelyea rrelyea added this to the 4.0 RTM milestone Jan 16, 2017

@srivatsn srivatsn referenced this issue in dotnet/project-system Jan 16, 2017

Closed

Hang on .NET Core project close #1172

@davkean

This comment has been minimized.

Show comment
Hide comment
@davkean

davkean Jan 16, 2017

I hit this same just by changing target framework.

davkean commented Jan 16, 2017

I hit this same just by changing target framework.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Jan 16, 2017

Contributor

link to dump file is in email to alex and I from balaji

Contributor

rrelyea commented Jan 16, 2017

link to dump file is in email to alex and I from balaji

@rrelyea rrelyea modified the milestones: 4.0 RC3, 4.0 RTM Jan 17, 2017

@alpaix

This comment has been minimized.

Show comment
Hide comment
@alpaix

alpaix Jan 17, 2017

According to my analysis of the dump the project build has started and requested restore when active auto-restore was running in the background. At the same time another auto-restore request has arrived and has been blocked.

Active auto-restore pending UI thread switch:

28111b70 <0> NuGet.SolutionRestoreManager.RestoreOperationLogger+<>c__DisplayClass14_0+<<StartAsync>b__2>d
.2814efa0 <0> Microsoft.VisualStudio.Threading.JoinableTask+<JoinAsync>d__76
..2814f08c <0> NuGet.SolutionRestoreManager.RestoreOperationLogger+<StartAsync>d__14
...2814f140 <3> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<StartRestoreJobAsync>d__36
....26cf29c0 <0> Microsoft.VisualStudio.Threading.JoinableTask+<JoinAsync>d__76
.....26cf2a78 <0> Microsoft.VisualStudio.Threading.JoinableTask`1+<JoinAsync>d__3[[System.Boolean, mscorlib]]
......26cf2b28 <0> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<ProcessRestoreRequestAsync>d__34
.......219ed60c <2> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<StartBackgroundJobRunnerAsync>d__33

On-build restore pending task promotion:

27a358bc <0> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<PromoteTaskToActiveAsync>d__35
.27a3599c <1> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<>c__DisplayClass31_0+<<Restore>b__0>d

New auto-restore request being enqueued:

2810e05c <1> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<ScheduleRestoreAsync>d__30
.2810e118 <0> Microsoft.VisualStudio.ProjectSystem.VS.NuGet.NuGetRestorer+<>c__DisplayClass17_0+<<ProjectPropertyChangedAsync>b__0>d

alpaix commented Jan 17, 2017

According to my analysis of the dump the project build has started and requested restore when active auto-restore was running in the background. At the same time another auto-restore request has arrived and has been blocked.

Active auto-restore pending UI thread switch:

28111b70 <0> NuGet.SolutionRestoreManager.RestoreOperationLogger+<>c__DisplayClass14_0+<<StartAsync>b__2>d
.2814efa0 <0> Microsoft.VisualStudio.Threading.JoinableTask+<JoinAsync>d__76
..2814f08c <0> NuGet.SolutionRestoreManager.RestoreOperationLogger+<StartAsync>d__14
...2814f140 <3> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<StartRestoreJobAsync>d__36
....26cf29c0 <0> Microsoft.VisualStudio.Threading.JoinableTask+<JoinAsync>d__76
.....26cf2a78 <0> Microsoft.VisualStudio.Threading.JoinableTask`1+<JoinAsync>d__3[[System.Boolean, mscorlib]]
......26cf2b28 <0> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<ProcessRestoreRequestAsync>d__34
.......219ed60c <2> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<StartBackgroundJobRunnerAsync>d__33

On-build restore pending task promotion:

27a358bc <0> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<PromoteTaskToActiveAsync>d__35
.27a3599c <1> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<>c__DisplayClass31_0+<<Restore>b__0>d

New auto-restore request being enqueued:

2810e05c <1> NuGet.SolutionRestoreManager.SolutionRestoreWorker+<ScheduleRestoreAsync>d__30
.2810e118 <0> Microsoft.VisualStudio.ProjectSystem.VS.NuGet.NuGetRestorer+<>c__DisplayClass17_0+<<ProjectPropertyChangedAsync>b__0>d

alpaix added a commit to alpaix/NuGet.Client that referenced this issue Jan 20, 2017

Resolve VS hang on-build
Resolves NuGet/Home#4295.

Share the worker's jtf with restore job and logger to manage access to
the main thread and avoid the deadlock.

@alpaix alpaix referenced this issue in NuGet/NuGet.Client Jan 20, 2017

Closed

Resolve VS hang on-build #1141

@rrelyea rrelyea modified the milestones: 4.0 RTM, 4.0 RC3 Jan 24, 2017

alpaix added a commit to alpaix/NuGet.Client that referenced this issue Jan 25, 2017

Resolve VS hang on-build
Resolves NuGet/Home#4295.

Share the worker's jtf with restore job and logger to manage access to
the main thread and avoid the deadlock.

mishra14 added a commit to NuGet/NuGet.Client that referenced this issue Jan 25, 2017

Resolve VS hang on-build
Resolves NuGet/Home#4295.

Share the worker's jtf with restore job and logger to manage access to
the main thread and avoid the deadlock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment