Building soon after starting NuGet operation (install, update, restore), can cause VS to Hang #4420

Closed
diverdan92 opened this Issue Jan 28, 2017 · 13 comments

Comments

Projects
None yet
4 participants
@diverdan92

diverdan92 commented Jan 28, 2017

  1. File -> New C# Console App (.NET Framework)
  2. Right click References -> Manage NuGet Packages...
  3. Add Reference to Newtonsoft.Json using Packages.config
  4. VS Hangs

Not 100% repro, but ping dajaco@microsoft.com for crash dump.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Jan 28, 2017

Contributor

@diverdan92 what version of Visual Studio are you seeing this with?

Contributor

emgarten commented Jan 28, 2017

@diverdan92 what version of Visual Studio are you seeing this with?

@diverdan92

This comment has been minimized.

Show comment
Hide comment
@diverdan92

diverdan92 Jan 30, 2017

@emgarten D15prerel 26127.00 with a patch from @jainaashish

@emgarten D15prerel 26127.00 with a patch from @jainaashish

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Jan 30, 2017

Contributor

Crash dump doesn't reflect the above scenario, rather it says it crashed some where in auto-restore.

Contributor

jainaashish commented Jan 30, 2017

Crash dump doesn't reflect the above scenario, rather it says it crashed some where in auto-restore.

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Feb 2, 2017

Contributor

After analyzing the crash dump, I can see there are 3 different call stacks which is hard to understand as in how a user can create such a behavior. Also We're not able to repro it again so I really don't understand what would have happened at that time and how it came into this situation.

  1. First call stack indicates that on build restore was in progress and Main thread was also waiting in there inside some JTF
  2. Second call stack indicates that auto restore was also in progress and it was trying to write restore summary to output console and waiting in some JTF to get on the UI thread.
  3. Third call stack shows that install package (newtonsoft.json) was also in progress for packages.config based project and it tried to execute install script which failed and it was trying to write error message on output console by trying to get on the UI thread.
Contributor

jainaashish commented Feb 2, 2017

After analyzing the crash dump, I can see there are 3 different call stacks which is hard to understand as in how a user can create such a behavior. Also We're not able to repro it again so I really don't understand what would have happened at that time and how it came into this situation.

  1. First call stack indicates that on build restore was in progress and Main thread was also waiting in there inside some JTF
  2. Second call stack indicates that auto restore was also in progress and it was trying to write restore summary to output console and waiting in some JTF to get on the UI thread.
  3. Third call stack shows that install package (newtonsoft.json) was also in progress for packages.config based project and it tried to execute install script which failed and it was trying to write error message on output console by trying to get on the UI thread.
@diverdan92

This comment has been minimized.

Show comment
Hide comment
@diverdan92

diverdan92 Feb 2, 2017

Thanks @jainaashish - seem like reasonable conclusion to me. What do you propose for next steps? See if it reproduces in the future?

Thanks @jainaashish - seem like reasonable conclusion to me. What do you propose for next steps? See if it reproduces in the future?

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Feb 2, 2017

Contributor

@diverdan92 after digging little more into crash dump, and analyzing it, I finally understood what were you doing 😄 and repro this issue locally. Scenario is you start a package install (newtonsoft.json) with packages.config based projects and immediately do F5 to build it as well which will make it hang.

Contributor

jainaashish commented Feb 2, 2017

@diverdan92 after digging little more into crash dump, and analyzing it, I finally understood what were you doing 😄 and repro this issue locally. Scenario is you start a package install (newtonsoft.json) with packages.config based projects and immediately do F5 to build it as well which will make it hang.

@diverdan92

This comment has been minimized.

Show comment
Hide comment
@diverdan92

diverdan92 Feb 2, 2017

@jainaashish that's great news 👍 you can get a consistent repro? Is the fix achievable then?

@jainaashish that's great news 👍 you can get a consistent repro? Is the fix achievable then?

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Feb 3, 2017

Contributor

yeah i can get a consistent repro, not sure about the fix though

Contributor

jainaashish commented Feb 3, 2017

yeah i can get a consistent repro, not sure about the fix though

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Feb 3, 2017

Contributor

@jainaashish are you able to tell why the UI thread is waiting?

Contributor

emgarten commented Feb 3, 2017

@jainaashish are you able to tell why the UI thread is waiting?

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Feb 3, 2017

Contributor

@jainaashish - please brainstorm with @emgarten and @dtivel on possible fixes asap

Contributor

rrelyea commented Feb 3, 2017

@jainaashish - please brainstorm with @emgarten and @dtivel on possible fixes asap

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Feb 3, 2017

Contributor

also...perhaps @emgarten can help see how many watson hits we've seen of this, to understand customer impact.

Contributor

rrelyea commented Feb 3, 2017

also...perhaps @emgarten can help see how many watson hits we've seen of this, to understand customer impact.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Feb 3, 2017

Contributor

Also, why doesn't this occur in VS2015? Do we show a dialog in that case? Etc...

Contributor

rrelyea commented Feb 3, 2017

Also, why doesn't this occur in VS2015? Do we show a dialog in that case? Etc...

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Feb 4, 2017

Contributor

@jainaashish & @emgarten - update on this? what do you know? how likely is fix?

Contributor

rrelyea commented Feb 4, 2017

@jainaashish & @emgarten - update on this? what do you know? how likely is fix?

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