Skip to content

Fix test failures found in dotnet/sdk when opting-into the new FileStream strategy mode #51141

Closed

Description

@carlossanlop

After turning on the new FileStream rewrite changes as the default, dotnet/sdk hit multiple test failures when attempting to merge the latest runtime changes.

We are going to revert the change that made the compat flag enabled by default, to continue using Net5CompatFileStrategy, and we can unblock dotnet/sdk while we investigate the root cause.

Repro steps:

git clone https://github.com/dotnet/sdk 
cd sdk
git checkout darc-main-0fd96bf7-148d-4cf6-97b0-d3934c67609e
.\build.cmd -c Debug
.\.dotnet\dotnet.exe test -c Debug src\Tests\Microsoft.NET.Build.Tests\Microsoft.NET.Build.Tests.csproj --filter Microsoft.NET.Build.Tests.GivenThatWeWantToBuildASelfContainedApp.It_builds_the_project_successfully_when_RAR_finds_all_references
 Microsoft.NET.Build.Tests.GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.It_builds_the_project_successfully_when_RAR_finds_all_references [FAIL]
      The "ResolvePackageAssets" task failed unexpectedly. [C:\h\w\A224091D\t\dotnetSdkTests\btnehx1n.s1g\It_builds_the---6B3FC006\3\3.csproj]
      System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
         at System.IO.Strategies.SyncWindowsFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
         at System.IO.Strategies.BufferedFileStreamStrategy.Flush(Boolean flushToDisk)
         at System.IO.Strategies.BufferedFileStreamStrategy.Dispose(Boolean disposing)
         at System.IO.Strategies.BufferedFileStreamStrategy.DisposeInternal(Boolean disposing)
         at System.IO.FileStream.Dispose(Boolean disposing)
         at System.IO.Stream.Close()
         at System.IO.BinaryWriter.Dispose(Boolean disposing)
         at System.IO.BinaryWriter.Dispose()
         at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter.WriteToCacheFile() in /_/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs:line 704
         at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash) in /_/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs:line 520
         at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task) in /_/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs:line 468
         at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups() in /_/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs:line 300
         at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore() in /_/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs:line 292
         at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 38
         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)

Activity

  1. added this to the 6.0.0 milestone on Apr 12, 2021
  2. self-assigned this
    on Apr 12, 2021
  3. ghost added
    untriaged
    on Apr 12, 2021
  4. changed the title [-]Revert FileStream rewrite compat flag value[/-] [+]Fix test failures found in dotnet/sdk when opting-into the new FileStream strategy mode[/+] on Apr 12, 2021
  5. ghost added
    in-pr
    on Apr 13, 2021
  6. ghost removed
    in-pr
    on Apr 13, 2021
  7. removed
    untriaged
    on Apr 13, 2021
  8. ghost locked as resolved and limited conversation to collaborators on May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions