runtime: [wasm] AOT: `System.Globalization.Calendars.Hybrid.WASM.Tests` and `System.Globalization.Hybrid.WASM.Tests` getting terminated

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=456551 Build error leg or test failing: normal-System.Globalization.Calendars.Hybrid.WASM.Tests.WorkItemExecution Pull request: https://github.com/dotnet/runtime/pull/94217

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "MONO.*src/mono/mono/metadata/icall.c:618. <disabled>",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

This is failing on rolling builds too, and is unrelated to the linked PR. Changes since the last passing rolling build - 8d59c90e…920cd6e2 which includes https://github.com/dotnet/runtime/pull/87672 .

The assertion is https://github.com/dotnet/runtime/blob/ba65769e093f8cc0d319701d16bbc85d70655c6d/src/mono/mono/metadata/icall.c#L6176-L6180

cc @kouvel

Known issue validation

Build: šŸ”Ž https://dev.azure.com/dnceng-public/public/_build/results?buildId=456551 Error message validated: MONO.*src/mono/mono/metadata/icall.c:618. <disabled> Result validation: āœ… Known issue matched with the provided build. Validation performed at: 10/31/2023 4:57:48 PM UTC

Report

Build Definition Test Pull Request
504118 dotnet/runtime WasmTestOnBrowser-Invariant.Tests.WorkItemExecution dotnet/runtime#95910
501644 dotnet/runtime normal-System.Text.Json.Tests.WorkItemExecution dotnet/runtime#95292
501422 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.IcuTests.WorkItemExecution dotnet/runtime#95610
488625 dotnet/runtime Workloads-Wasm.Build.Tests.IcuTests.WorkItemExecution dotnet/runtime#95610
487764 dotnet/runtime normal-Microsoft.Extensions.FileProviders.Physical.Tests.WorkItemExecution dotnet/runtime#95324
486016 dotnet/runtime normal-System.ComponentModel.Tests.WorkItemExecution dotnet/runtime#95324

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 3 6

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 28 (28 by maintainers)

Most upvoted comments

So what happens is that a call is made to String.Equals(…, StringComparison.Ordinal), but the aot runtime executes class ctors too eagerly, so it executes the CompareInfo cctor because of this line:

                case StringComparison.InvariantCulture:
                case StringComparison.InvariantCultureIgnoreCase:
                    return CompareInfo.Invariant.Compare(this, value, GetCaseCompareOfComparisonCulture(comparisonType)) == 0;

will try to fix.

I think that NRE might be the main issue.

The issue goes away if you remove HybridGlobalization=true from System.Globalization.Hybrid.WASM.Tests.csproj. And if you add the same property to System.Buffers.Tests (randomly picked test project), then you get the same error with that.

Same as System.Globalization.Hybrid.WASM.Tests.csproj:

  • With UseSystemResourceKeys=false you get Encountered infinite recursion while looking up resource 'Arg_NullReferenceException' in System.Private.CoreLib
  • With UseSystemResourceKeys=true you get Error: TypeInitialization_Type, Microsoft.DotNet.XHarness.TestRunners.Common.ApplicationOptions (The type initializer for 'Microsoft.DotNet.XHarness.TestRunners.Common.ApplicationOptions' threw an exception.)