dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
266 stars 132 forks source link

ArgumentOutOfRangeException in OmniSharp test for 6.0 #3339

Closed mthalman closed 1 year ago

mthalman commented 1 year ago

Test failure from the internal/release/6.0.1xx branch.

Test Name:

Microsoft.DotNet.SourceBuild.SmokeTests.OmniSharpTests.VerifyScenario(template: BlazorServer)

Error message:

System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'chunkLength')

Stack Trace:

System.Text.StringBuilder.ToString()
Microsoft.DotNet.SourceBuild.SmokeTests.ExecuteHelper.ExecuteProcess(String fileName, String args, ITestOutputHelper outputHelper, Boolean logOutput, Action`1 configure, Int32 millisecondTimeout)
Microsoft.DotNet.SourceBuild.SmokeTests.OmniSharpTests.VerifyScenario(DotNetTemplate template)
System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)

Build link (internal only)

mthalman commented 1 year ago

From everything I can find, it sounds like this error is due to lack of thread-safety with StringBuilder. But the code seems to be doing the proper locking from the changes in https://github.com/dotnet/installer/pull/13643: https://github.com/dotnet/installer/blob/094894ab53fa5f555ad812a51d89b0a85c964fa5/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs#L50

MichaelSimons commented 1 year ago

[Triage] Closing as this has not been an issue since being logged.