NuGet.exe could hang on a large amount of msbuild error output #3572

Closed
emgarten opened this Issue Oct 3, 2016 · 0 comments

Comments

Projects
None yet
3 participants
@emgarten
Contributor

emgarten commented Oct 3, 2016

NuGet.exe shells out to MSBuild. Standard out goes directly to the console, but error output is redirected to a stream. There are no readers for this stream which means that if the stream hits the buffer size msbuild and nuget.exe will hang until the msbuild timeout is reached.

To fix this NuGet.exe should run a stream reader on another thread to continually drain this stream as needed.

https://github.com/NuGet/NuGet.Client/blob/febea5d326217f14b6f0221fc4dcff81f12d3e5b/src/NuGet.Clients/NuGet.CommandLine/MsBuildUtility.cs#L186

@emgarten emgarten referenced this issue in NuGet/NuGet.Client Oct 3, 2016

Merged

Dev msbuild full merge #907

@rrelyea rrelyea added this to the 3.6 RC milestone Oct 3, 2016

@rrelyea rrelyea modified the milestones: 3.6 RTM, 3.6 RC Oct 19, 2016

@mishra14 mishra14 referenced this issue in NuGet/NuGet.Client Oct 26, 2016

Merged

Fixing potential buffer overflow problem #971

@rrelyea rrelyea modified the milestones: 4.0 RC2, 4.0 RTM Oct 27, 2016

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