Visual Studio deadlocks if you attempt to close a project before NuGet restore has finished #4257

Closed
rrelyea opened this Issue Jan 11, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@rrelyea
Contributor

rrelyea commented Jan 11, 2017

Ported from: dotnet/project-system#1104 (filed by @davkean)

26107.1.d15prel
Create new Empty Web Application
Close Solution and VS
Open Solution
File -> Close Solution before NuGet restore has started/finish
--Deadlock--
If I did this quickly, was I able to deadlock VS 100% of the time.
Dump: [internalMLshare]\public\davkean\project-system\1104

@davkean

This comment has been minimized.

Show comment
Hide comment
@davkean

davkean Jan 16, 2017

@AArnott also ran into this, here's another dump: \\andarno1\public\dumps\roslyn-project-system#1172.

davkean commented Jan 16, 2017

@AArnott also ran into this, here's another dump: \\andarno1\public\dumps\roslyn-project-system#1172.

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott Jan 21, 2017

Contributor

Just hit this again. A new dump uploaded to the same location as listed above.

Contributor

AArnott commented Jan 21, 2017

Just hit this again. A new dump uploaded to the same location as listed above.

@davkean

This comment has been minimized.

Show comment
Hide comment
@davkean

davkean Jan 24, 2017

Here's another one: dotnet/project-system#1188, in particular hang on shutdown in [internal file share]\public\nicholg\roslyn-project-system_1189.

davkean commented Jan 24, 2017

Here's another one: dotnet/project-system#1188, in particular hang on shutdown in [internal file share]\public\nicholg\roslyn-project-system_1189.

@davkean

This comment has been minimized.

Show comment
Hide comment
@davkean

davkean Jan 24, 2017

Make note I noticed that sometimes NuGet restore never happens, meaning that you will hit this regardless of how long you wait.

davkean commented Jan 24, 2017

Make note I noticed that sometimes NuGet restore never happens, meaning that you will hit this regardless of how long you wait.

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

Resolve VS hang on solution close
Resolves NuGet/Home#4257.

This change drastucally improves solution close experience when
auto-restore is running in the background.

By implementing following cancellation strategy:
- unblock cps
- cancel background restore worker early
- pass cancellation token via `RestoreRunner` to downstream core
algorithms.

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

Resolve VS hang on solution close
Resolves NuGet/Home#4257.

This change drastucally improves solution close experience when
auto-restore is running in the background.

By implementing following cancellation strategy:
- unblock cps
- cancel background restore worker early
- pass cancellation token via `RestoreRunner` to downstream core
algorithms.

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

Resolve VS hang on solution close
Resolves NuGet/Home#4257.

This change drastically improves solution close experience when
auto-restore is running in the background.

By implementing following cancellation strategy:
- Unblock the caller (Roslyn) upon cancellation request via provided token
- Cancel background restore operation on solution `BeforeClosing`
- Pass cancellation token via `RestoreRunner` downstream to core
algorithms.

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

Merged

Resolve VS hang on solution close #1154

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

Resolve VS hang on solution close (#1154)
* Resolve VS hang on solution close

Resolves NuGet/Home#4257.

This change drastically improves solution close experience when
auto-restore is running in the background.

By implementing following cancellation strategy:
- Unblock the caller (Roslyn) upon cancellation request via provided token
- Cancel background restore operation on solution `BeforeClosing`
- Pass cancellation token via `RestoreRunner` downstream to core
algorithms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment