Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpStress.csproj fails to build again #51117

Closed
antonfirsov opened this issue Apr 12, 2021 · 10 comments
Closed

HttpStress.csproj fails to build again #51117

antonfirsov opened this issue Apr 12, 2021 · 10 comments

Comments

@antonfirsov
Copy link
Member

antonfirsov commented Apr 12, 2021

According to the log a change between #50265 and #50244 broke the HttpStress builds:
https://dev.azure.com/dnceng/public/_build/results?buildId=1078046&view=logs&j=2d2b3007-3c5c-5840-9bb0-2b1ea49925f3&t=8ca65746-3bfa-57bf-9141-d805b5d39db5

Call stack:

C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at System.IO.Strategies.SyncWindowsFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/SyncWindowsFileStreamStrategy.cs:line 64
   at System.IO.Strategies.BufferedFileStreamStrategy.Flush(Boolean flushToDisk) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs:line 778
   at System.IO.Strategies.BufferedFileStreamStrategy.Dispose(Boolean disposing) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs:line 167
   at System.IO.Stream.Close() in /_/src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs:line 165
   at System.IO.BinaryWriter.Dispose(Boolean disposing) in /_/src/libraries/System.Private.CoreLib/src/System/IO/BinaryWriter.cs:line 75
   at System.IO.BinaryWriter.Dispose() in /_/src/libraries/System.Private.CoreLib/src/System/IO/BinaryWriter.cs:line 81
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter.WriteToCacheFile()
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\app\HttpStress.csproj]

@ViktorHofer any hints?

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 12, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Apr 12, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

According to the log a change between #50265 and #50244 broke the HttpStress builds:
https://dev.azure.com/dnceng/public/_build/results?buildId=1078046&view=logs&j=2d2b3007-3c5c-5840-9bb0-2b1ea49925f3&t=8ca65746-3bfa-57bf-9141-d805b5d39db5

The error we see is the following:

C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. [C:\app\HttpStress.csproj]
C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error MSB4018: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. [C:\app\HttpStress.csproj]

@ViktorHofer any hints?

Author: antonfirsov
Assignees: -
Labels:

area-System.Net.Http, untriaged

Milestone: -

@ViktorHofer
Copy link
Member

Taking a look now

@ViktorHofer
Copy link
Member

Without a binlog (which isn't produced nor uploaded) this is really hard to diagnose.

@antonfirsov
Copy link
Member Author

I have a local repro. How can I get the binlog(s) that can help diagnosing this?

Here is the PR history between the last successful and the first failing CI run, in case any of them is obviously suspicious:

@ViktorHofer
Copy link
Member

Add /bl to the build command and send me the binlog (name by default is msbuild.binlog) via Teams please (a binlog contains env vars).

@antonfirsov
Copy link
Member Author

I managed to track this to #50166 with git bisect. Setting DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM=1 fixes the issue.

#50166 might be concerning regarding the ability of using .NET 6 with dotnet build from within a Windows docker container.

/cc @adamsitnik

@antonfirsov
Copy link
Member Author

I see it has been addressed in #51151, trying again with fresh main.

@antonfirsov
Copy link
Member Author

antonfirsov commented Apr 14, 2021

#51151 fixed this, looks like an exceptional case (a library bug broke the SDK). @ViktorHofer thanks for your support!

@adamsitnik
Copy link
Member

#51151 fixed this

@antonfirsov thank you for the confirmation!

@ghost ghost locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants