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

[wasm] AOT: System.Globalization.Calendars.Hybrid.WASM.Tests and System.Globalization.Hybrid.WASM.Tests getting terminated #94225

Closed
radical opened this issue Oct 31, 2023 · 28 comments · Fixed by #95910
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono area-System.Globalization area-System.Threading disabled-test The test is disabled in source code against the issue Known Build Error Use this to report build issues in the .NET Helix tab

Comments

@radical
Copy link
Member

radical commented Oct 31, 2023

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: #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 - 8d59c90...920cd6e which includes #87672 .

The assertion is

void
ves_icall_System_Environment_FailFast (MonoStringHandle message, MonoExceptionHandle exception, MonoStringHandle errorSource, MonoError *error)
{
if (MONO_HANDLE_IS_NULL (errorSource)) {
g_warning ("Process terminated.");

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 #95910
501644 dotnet/runtime normal-System.Text.Json.Tests.WorkItemExecution #95292
501422 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.IcuTests.WorkItemExecution #95610
488625 dotnet/runtime Workloads-Wasm.Build.Tests.IcuTests.WorkItemExecution #95610
487764 dotnet/runtime normal-Microsoft.Extensions.FileProviders.Physical.Tests.WorkItemExecution #95324
486016 dotnet/runtime normal-System.ComponentModel.Tests.WorkItemExecution #95324

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 3 6
@radical radical added arch-wasm WebAssembly architecture blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Oct 31, 2023
@ghost
Copy link

ghost commented Oct 31, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

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: #94217

Error Message

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

{
  "ErrorMessage": "",
  "ErrorPattern": "MONO.*src/mono/mono/metadata/icall.c:6180 <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 - 8d59c90...920cd6e which includes #87672 .

cc @kouvel

Author: radical
Assignees: -
Labels:

arch-wasm, blocking-clean-ci, Known Build Error

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 31, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 31, 2023
@radical
Copy link
Member Author

radical commented Oct 31, 2023

This might be a related failure too - #87672 (comment) .

@ghost
Copy link

ghost commented Oct 31, 2023

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

Issue Details

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: #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 - 8d59c90...920cd6e which includes #87672 .

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:6180 <disabled>
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/31/2023 4:38:57 PM UTC

Author: radical
Assignees: -
Labels:

arch-wasm, area-System.Threading, blocking-clean-ci, untriaged, Known Build Error, needs-area-label

Milestone: -

@radical radical removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 31, 2023
@radical
Copy link
Member Author

radical commented Oct 31, 2023

cc @pavelsavara @maraf

@ilonatommy
Copy link
Member

I can't reproduce the same error. When we run wasm-library-aot-tests we add /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true. When reproducing this gives us an error AOT is not supported without IL trimming (PublishTrimmed=true required), so I added it. Am I missing something else? Log of such a run differs a lot:

/workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : Precompiling failed for /workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/wasm_build/obj/wasm/for-build/aot-in/Microsoft.CSharp.dll with exit code 1. [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]
  /workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : Failed to load method 0x600005d from '/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/wasm_build/obj/wasm/for-build/aot-in/Microsoft.CSharp.dll' due to Could not resolve type with token 01000015 from typeref (expected class 'System.Collections.Generic.IEqualityComparer`1' in assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') assembly:System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Collections.Generic.IEqualityComparer`1 member:(null). [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]
  /workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : Run with MONO_LOG_LEVEL=debug for more information. [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]
....
 /workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : Could not load signature of Microsoft.DotNet.XHarness.TestRunners.Common.TestRunner:WriteResultsToFile due to: Could not resolve type with token 01000019 from typeref (expected class 'System.IO.TextWriter' in assembly 'System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e') assembly:System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e type:System.IO.TextWriter member:(null) [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]
  /workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : Can't find custom attr constructor image: /workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/wasm_build/obj/wasm/for-build/aot-in/Microsoft.DotNet.XHarness.TestRunners.Common.dll mtoken: 0x0a00000a due to: Could not resolve type with token 01000011 from typeref (expected class 'System.Runtime.CompilerServices.AsyncStateMachineAttribute' in assembly 'System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e') assembly:System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e type:System.Runtime.CompilerServices.AsyncStateMachineAttribute member:(null) [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]
  /workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : Failed to load custom attributes from method System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<string>> Microsoft.DotNet.XHarness.TestRunners.Common.ApplicationEntryPoint:GetIgnoredCategories () due to Could not resolve type with token 01000011 from typeref (expected class 'System.Runtime.CompilerServices.AsyncStateMachineAttribute' in assembly 'System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e') assembly:System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e type:System.Runtime.CompilerServices.AsyncStateMachineAttribute member:(null) [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]
  /workspaces/runtime/src/mono/wasm/build/WasmApp.Native.targets(689,5): error : FullAOT cannot continue if there are loader errors. [/workspaces/runtime/artifacts/bin/System.Globalization.Calendars.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/publish/ProxyProjectForAOTOnHelix.proj]

@radical
Copy link
Member Author

radical commented Nov 1, 2023

Can you share how exactly you are running the tests?

  • /p:BuildAOTTestsOnHelix=true - this isn't required. Use it if you are not able to reproduce without it. Essentially, it uses the same proxy project that we use on helix, for your local run too.

@radical
Copy link
Member Author

radical commented Nov 1, 2023

Running this on macos with v8 11.6.6, I get:

  info: console.info: Initializing dotnet version 9.0.0-dev commit hash e4fbdb907bb187d7b5ba0668a84347c1058e3219
  info: [MONO] Process terminated.
  info: [MONO] Encountered infinite recursion while looking up resource 'Arg_NullReferenceException' in System.Private.CoreLib. Verify the installation of .NET is complete and does not need repairing, and that the state of the process has not become corrupted.
  info: Process v8 exited with 1

.. with a fresh build of e4fbdb9 .

@radical
Copy link
Member Author

radical commented Nov 1, 2023

Building with /p:UseSystemResourceKeys=true, I get:

  info: console.info: Initializing dotnet version 9.0.0-dev commit hash e4fbdb907bb187d7b5ba0668a84347c1058e3219
  info: MONO_WASM:    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<RunAsync>d__4](<RunAsync>d__4& )
  info:    at Microsoft.DotNet.XHarness.TestRunners.Xunit.WasmApplicationEntryPoint.Run()
  info:    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<RunAsync>d__4](<RunAsync>d__4& )
  info:    at SimpleWasmTestRunner.Main(String[] args)
  info: Error: TypeInitialization_Type, Microsoft.DotNet.XHarness.TestRunners.Common.ApplicationOptions
  info:     at Qn (/Users/ankj/dev/runtime/artifacts/bin/System.Globalization.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/_framework/dotnet.runtime.js:3:32681)
  info:     at Zn (/Users/ankj/dev/runtime/artifacts/bin/System.Globalization.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/_framework/dotnet.runtime.js:3:31798)
  info:     at p.javaScriptExports.call_entry_point (/Users/ankj/dev/runtime/artifacts/bin/System.Globalization.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/_framework/dotnet.runtime.js:3:210195)
  info:     at Object.ol [as runMain] (/Users/ankj/dev/runtime/artifacts/bin/System.Globalization.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/_framework/dotnet.runtime.js:3:141624)
  info:     at run (/Users/ankj/dev/runtime/artifacts/bin/System.Globalization.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/test-main.js:410:50)
  info:     at async /Users/ankj/dev/runtime/artifacts/bin/System.Globalization.Hybrid.WASM.Tests/Release/net9.0-browser/browser-wasm/AppBundle/test-main.js:426:1

@radical
Copy link
Member Author

radical commented Nov 1, 2023

I can't reproduce the same error. When we run wasm-library-aot-tests we add /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true. When reproducing this gives us an error AOT is not supported without IL trimming (PublishTrimmed=true required), so I added it. Am I missing something else? Log of such a run differs a lot:

You also need /p:EnableAggressiveTrimming=true.

@radical
Copy link
Member Author

radical commented Nov 1, 2023

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.)

@ghost
Copy link

ghost commented Nov 1, 2023

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

Issue Details

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: #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 - 8d59c90...920cd6e which includes #87672 .

The assertion is

void
ves_icall_System_Environment_FailFast (MonoStringHandle message, MonoExceptionHandle exception, MonoStringHandle errorSource, MonoError *error)
{
if (MONO_HANDLE_IS_NULL (errorSource)) {
g_warning ("Process terminated.");

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
457736 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #93920
457734 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94204
457616 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94204
457621 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94214
457590 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #93472
457356 dotnet/runtime normal-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94214
457319 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution
457289 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94204
456975 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution
456723 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94214
456719 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #93472
456713 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94217
456551 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94217
456493 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94204
456461 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #93472
456278 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution #94204
456177 dotnet/runtime WasmTestOnBrowser-System.Globalization.Hybrid.WASM.Tests.WorkItemExecution
456060 dotnet/runtime Wasm.Build.Tests.IcuTests.FullIcuFromRuntimePackWithCustomIcu #93756

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
9 18 18
Author: radical
Assignees: -
Labels:

arch-wasm, area-System.Globalization, area-System.Threading, blocking-clean-ci, untriaged, area-Codegen-AOT-mono, Known Build Error

Milestone: -

@radical radical removed the untriaged New issue has not been triaged by the area owner label Nov 1, 2023
@radical
Copy link
Member Author

radical commented Nov 1, 2023

Also, I tried to catch/print the exception in SimpleWasmTestRunner, and got:

  info: ex: System.TypeInitializationException: TypeInitialization_Type, Microsoft.DotNet.XHarness.TestRunners.Common.ApplicationOptions
  info:  ---> System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CultureInfo
  info:  ---> System.TypeInitializationException: TypeInitialization_Type, Settings
  info:  ---> System.TypeInitializationException: TypeInitialization_Type, System.Globalization.CompareInfo
  info:  ---> System.NullReferenceException: Arg_NullReferenceException
  info:    Exception_EndOfInnerExceptionStack
  info:    Exception_EndOfInnerExceptionStack
  info:    Exception_EndOfInnerExceptionStack
  info:    at Microsoft.DotNet.XHarness.TestRunners.Common.ApplicationOptions..ctor()
  info:    Exception_EndOfInnerExceptionStack
  info:    at SimpleWasmTestRunner.Main()

Update: .. which is the same error as seen in #94212 .

@ilonatommy ilonatommy changed the title [wasm] AOT: System.Globalization.Calendars.Hybrid.WASM.Tests getting terminated [wasm] AOT: System.Globalization.Calendars.Hybrid.WASM.Tests and System.Globalization.Hybrid.WASM.Tests getting terminated Nov 2, 2023
@lewing
Copy link
Member

lewing commented Nov 2, 2023

@lambdageek any idea what might be happening here?

@ilonatommy
Copy link
Member

Smallest repro:

  • take browser sample
  • add line e.g. var ci = new CultureInfo("pl-PL"); to Main + add using System.Globalization;
  • run with ./dotnet.cmd build -bl /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:RunAOTCompilation=true /p:UseSystemResourceKeys=true /p:EnableAggressiveTrimming=true /p:HybridGlobalization=true /t:RunSample ./src/mono/sample/wasm/browser
  • it throws with our error

@lambdageek
Copy link
Member

lambdageek commented Nov 2, 2023

It only happens if you enable trimming and AOT? what if you use trimming and interpreter?

it seems like trimming is removing too much. although the type initialization exception loop might be unrelated: something else is failing and then we get into a type init loop while we try to print out a stack trace or something.

@radical
Copy link
Member Author

radical commented Nov 2, 2023

I couldn't reproduce with trimming and no aot.

@radical
Copy link
Member Author

radical commented Nov 2, 2023

I think that NRE might be the main issue.

@ilonatommy
Copy link
Member

ilonatommy commented Nov 2, 2023

NRE

When we remove all the code from inside of the CultureInfo constructor, removing also an opportunity for NRE, the exception is still there.
image

@radical
Copy link
Member Author

radical commented Nov 2, 2023

private static partial class Settings
{
/// <summary>
/// Load ICU (when not in Invariant mode) in a static cctor to ensure it is loaded as side-effect of
/// the GlobalizationMode.Invariant check. Globalization P/Invokes, e.g. in CompareInfo.GetSortKey,
/// rely on ICU already being loaded before they are called.
/// </summary>
static Settings()
{
// Use GlobalizationMode.Invariant to allow ICU initialization to be trimmed when Invariant=true
// and PredefinedCulturesOnly is unspecified.
if (!GlobalizationMode.Invariant)
{
if (TryGetAppLocalIcuSwitchValue(out string? icuSuffixAndVersion))
{
LoadAppLocalIcu(icuSuffixAndVersion);
}
else
{
int loaded = LoadICU();
if (loaded == 0)
{
Environment.FailFast(GetIcuLoadFailureMessage());
}
}
}
}

This seems to be Settings from the trace. It has a comment about CompareInfo:

            /// Load ICU (when not in Invariant mode) in a static cctor to ensure it is loaded as side-effect of
            /// the GlobalizationMode.Invariant check. Globalization P/Invokes, e.g. in CompareInfo.GetSortKey,
            /// rely on ICU already being loaded before they are called.

Update: got here from CultureInfo.Invariant

@radical
Copy link
Member Author

radical commented Nov 2, 2023

trace:

Jl @ logging.ts:122
wasm_trace_logger ($func29069) @ dotnet.native.wasm:0x4b6c80
eglib_log_adapter ($func17261) @ dotnet.native.wasm:0x2dbeef
monoeg_g_logv_nofree ($func17164) @ dotnet.native.wasm:0x2d9a28
monoeg_g_log ($func17166) @ dotnet.native.wasm:0x2d9af3
ves_icall_System_Environment_FailFast ($func18928) @ dotnet.native.wasm:0x34180c
ves_icall_System_Environment_FailFast_raw ($func18963) @ dotnet.native.wasm:0x342a6c
aot_wrapper_corlib_System_System_dot_Environment__FailFast_pinvoke_void_cl6_string_cls9_Exception_cl6_string_void_cl6_string_cls9_Exception_cl6_string_ ($func571) @ dotnet.native.wasm:0x2b221
corlib_System_Environment_FailFast_string ($func570) @ dotnet.native.wasm:0x2b1e5
aot_instances_aot_wrapper_gsharedvt_out_sig_void_obj ($func11862) @ dotnet.native.wasm:0x1d2b01
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_entry ($func16550) @ dotnet.native.wasm:0x2b80eb
interp_entry_static_ret_1 ($func16582) @ dotnet.native.wasm:0x2b96e3
aot_instances_aot_wrapper_gsharedvt_in_sig_obj_obj ($func12793) @ dotnet.native.wasm:0x1f84e8
corlib_System_SR_InternalGetResourceString_string ($func3096) @ dotnet.native.wasm:0x7b6cb
corlib_System_SR_GetResourceString_string ($func3098) @ dotnet.native.wasm:0x7b7d2
corlib_System_SR_get_Arg_NullReferenceException ($func2691) @ dotnet.native.wasm:0x6c677
corlib_System_NullReferenceException__ctor ($func2690) @ dotnet.native.wasm:0x6c5ec
aot_instances_aot_wrapper_gsharedvt_out_sig_void_this_ ($func15695) @ dotnet.native.wasm:0x27f342
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_object_init_handle ($func19745) @ dotnet.native.wasm:0x367a00
mono_exception_from_token ($func18784) @ dotnet.native.wasm:0x33a784
mini_llvmonly_throw_corlib_exception ($func21071) @ dotnet.native.wasm:0x3ae808
mini_llvmonly_throw_nullref_exception ($func21259) @ dotnet.native.wasm:0x3b7859
corlib_System_Resources_ResourceManager_GetFirstResourceSet_System_Globalization_CultureInfo ($func6657) @ dotnet.native.wasm:0xf84ba
corlib_System_Resources_ResourceManager_GetString_string_System_Globalization_CultureInfo ($func6664) @ dotnet.native.wasm:0xf96bf
aot_instances_aot_wrapper_gsharedvt_out_sig_obj_this_objobj ($func11164) @ dotnet.native.wasm:0x1b4f66
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b87a9
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a923f
interp_entry ($func16550) @ dotnet.native.wasm:0x2b80eb
interp_entry_static_ret_1 ($func16582) @ dotnet.native.wasm:0x2b96e3
aot_instances_aot_wrapper_gsharedvt_in_sig_obj_obj ($func12793) @ dotnet.native.wasm:0x1f84e8
corlib_System_SR_InternalGetResourceString_string ($func3096) @ dotnet.native.wasm:0x7b6cb
corlib_System_SR_GetResourceString_string ($func3098) @ dotnet.native.wasm:0x7b7d2
corlib_System_SR_get_Arg_NullReferenceException ($func2691) @ dotnet.native.wasm:0x6c677
corlib_System_NullReferenceException__ctor ($func2690) @ dotnet.native.wasm:0x6c5ec
aot_instances_aot_wrapper_gsharedvt_out_sig_void_this_ ($func15695) @ dotnet.native.wasm:0x27f342
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_object_init_handle ($func19745) @ dotnet.native.wasm:0x367a00
mono_exception_from_token ($func18784) @ dotnet.native.wasm:0x33a784
mini_llvmonly_throw_corlib_exception ($func21071) @ dotnet.native.wasm:0x3ae808
mini_llvmonly_throw_nullref_exception ($func21259) @ dotnet.native.wasm:0x3b7859
corlib_System_Globalization_CompareInfo__cctor ($func4770) @ dotnet.native.wasm:0xb4a3a
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_class_init_full ($func19752) @ dotnet.native.wasm:0x367eb0
mono_resolve_patch_target_ext ($func20757) @ dotnet.native.wasm:0x397316
mono_resolve_patch_target ($func20758) @ dotnet.native.wasm:0x397739
init_method ($func20971) @ dotnet.native.wasm:0x3a785e
mono_aot_init_llvm_method ($func20970) @ dotnet.native.wasm:0x3a7621
mini_llvm_init_method ($func21258) @ dotnet.native.wasm:0x3b77d4
mono_aot_corlib_init_method ($func182) @ dotnet.native.wasm:0x17bd0
corlib_string_Equals_string_System_StringComparison ($func1018) @ dotnet.native.wasm:0x3e1ce
corlib_System_AppContextConfigHelper_GetBooleanConfig_string_string_bool ($func1309) @ dotnet.native.wasm:0x4c022
corlib_System_Globalization_GlobalizationMode_Settings__cctor ($func4969) @ dotnet.native.wasm:0xbeda9
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_class_init_full ($func19752) @ dotnet.native.wasm:0x367eb0
init_method ($func20971) @ dotnet.native.wasm:0x3a7a42
mono_aot_init_llvm_method ($func20970) @ dotnet.native.wasm:0x3a7621
mini_llvm_init_method ($func21258) @ dotnet.native.wasm:0x3b77d4
mono_aot_corlib_init_method ($func182) @ dotnet.native.wasm:0x17bd0
corlib_System_Globalization_GlobalizationMode_Settings_get_Invariant ($func4958) @ dotnet.native.wasm:0xbe3e5
corlib_System_Globalization_GlobalizationMode_get_Invariant ($func3626) @ dotnet.native.wasm:0x8ac03
corlib_System_Globalization_CultureData_CreateCultureWithInvariantData ($func4773) @ dotnet.native.wasm:0xb561d
corlib_System_Globalization_CultureData_get_Invariant ($func4775) @ dotnet.native.wasm:0xb57ac
corlib_System_Globalization_CultureInfo__cctor ($func4904) @ dotnet.native.wasm:0xbc11d
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_class_init_full ($func19752) @ dotnet.native.wasm:0x367eb0
mono_resolve_patch_target_ext ($func20757) @ dotnet.native.wasm:0x397316
mono_resolve_patch_target ($func20758) @ dotnet.native.wasm:0x397739
init_method ($func20971) @ dotnet.native.wasm:0x3a785e
mono_aot_init_llvm_method ($func20970) @ dotnet.native.wasm:0x3a7621
mini_llvm_init_method ($func21258) @ dotnet.native.wasm:0x3b77d4
mono_aot_corlib_init_method ($func182) @ dotnet.native.wasm:0x17bd0
corlib_System_Globalization_CultureInfo_get_InvariantCulture ($func4880) @ dotnet.native.wasm:0xba68b
Wasm_Browser_Sample_Test_Main ($func9634) @ dotnet.native.wasm:0x1704de
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_try_invoke_byrefs ($func19843) @ dotnet.native.wasm:0x36d3cb
ves_icall_InternalInvoke ($func18901) @ dotnet.native.wasm:0x340062
ves_icall_InternalInvoke_raw ($func18992) @ dotnet.native.wasm:0x343c73
aot_wrapper_corlib_System_dot_Reflection_System_dot_Reflection_dot_RuntimeMethodInfo__InternalInvoke_pinvoke_obj_this_objcl9_intptr_2a_bclsc_Exception_26__attrs_2obj_cls1d_Reflection_dRuntimeMethodInfo_objcl9_intptr_2a_bclsc_Exception_26__attrs_2 ($func6868) @ dotnet.native.wasm:0x107cff
corlib_System_Reflection_MethodBaseInvoker_InterpretedInvoke_Method_object_intptr_ ($func6867) @ dotnet.native.wasm:0x107c7f
corlib_wrapper_delegate_invoke__Module_invoke_object_object_intptr__object_intptr_ ($func9026) @ dotnet.native.wasm:0x15be71
corlib_System_Reflection_MethodBaseInvoker_InvokeWithNoArgs_object_System_Reflection_BindingFlags ($func828) @ dotnet.native.wasm:0x36ac4
corlib_System_Reflection_RuntimeMethodInfo_Invoke_object_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo ($func7010) @ dotnet.native.wasm:0x10e9f0
corlib_System_Reflection_MethodBase_Invoke_object_object__ ($func6851) @ dotnet.native.wasm:0x106b7b
System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint_System_Runtime_InteropServices_JavaScript_JSMarshalerArgument_ ($func9398) @ dotnet.native.wasm:0x16461a
aot_instances_aot_wrapper_gsharedvt_out_sig_void_obj ($func11862) @ dotnet.native.wasm:0x1d2b01
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_invoke ($func19792) @ dotnet.native.wasm:0x36a9e5
$mono_wasm_invoke_method_bound @ dotnet.native.wasm:0x4b664e
Module._mono_wasm_invoke_method_bound @ dotnet.native.js:6300
uo @ invoke-cs.ts:273
p.javaScriptExports.call_entry_point @ managed-exports.ts:58
ol @ run.ts:59
rl @ run.ts:17
run @ run.ts:386
(anonymous) @ main.js:23
dotnet.native.js:1348 message from 6189: Encountered infinite recursion while looking up resource 'Arg_NullReferenceException' in System.Private.CoreLib. Verify the installation of .NET is complete and does not need repairing, and that the state of the process has not become corrupted. _infinitelyRecursingCount: 1, _currentlyLoading: 1, l: 'Arg_NullReferenceException'
logging.ts:122 [MONO] Encountered infinite recursion while looking up resource 'Arg_NullReferenceException' in System.Private.CoreLib. Verify the installation of .NET is complete and does not need repairing, and that the state of the process has not become corrupted. _infinitelyRecursingCount: 1, _currentlyLoading: 1, l: 'Arg_NullReferenceException'
Jl @ logging.ts:122
wasm_trace_logger ($func29069) @ dotnet.native.wasm:0x4b6c80
eglib_log_adapter ($func17261) @ dotnet.native.wasm:0x2dbeef
monoeg_g_logv_nofree ($func17164) @ dotnet.native.wasm:0x2d9a28
monoeg_g_log ($func17166) @ dotnet.native.wasm:0x2d9af3
ves_icall_System_Environment_FailFast ($func18928) @ dotnet.native.wasm:0x341886
ves_icall_System_Environment_FailFast_raw ($func18963) @ dotnet.native.wasm:0x342a6c
aot_wrapper_corlib_System_System_dot_Environment__FailFast_pinvoke_void_cl6_string_cls9_Exception_cl6_string_void_cl6_string_cls9_Exception_cl6_string_ ($func571) @ dotnet.native.wasm:0x2b221
corlib_System_Environment_FailFast_string ($func570) @ dotnet.native.wasm:0x2b1e5
aot_instances_aot_wrapper_gsharedvt_out_sig_void_obj ($func11862) @ dotnet.native.wasm:0x1d2b01
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_entry ($func16550) @ dotnet.native.wasm:0x2b80eb
interp_entry_static_ret_1 ($func16582) @ dotnet.native.wasm:0x2b96e3
aot_instances_aot_wrapper_gsharedvt_in_sig_obj_obj ($func12793) @ dotnet.native.wasm:0x1f84e8
corlib_System_SR_InternalGetResourceString_string ($func3096) @ dotnet.native.wasm:0x7b6cb
corlib_System_SR_GetResourceString_string ($func3098) @ dotnet.native.wasm:0x7b7d2
corlib_System_SR_get_Arg_NullReferenceException ($func2691) @ dotnet.native.wasm:0x6c677
corlib_System_NullReferenceException__ctor ($func2690) @ dotnet.native.wasm:0x6c5ec
aot_instances_aot_wrapper_gsharedvt_out_sig_void_this_ ($func15695) @ dotnet.native.wasm:0x27f342
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_object_init_handle ($func19745) @ dotnet.native.wasm:0x367a00
mono_exception_from_token ($func18784) @ dotnet.native.wasm:0x33a784
mini_llvmonly_throw_corlib_exception ($func21071) @ dotnet.native.wasm:0x3ae808
mini_llvmonly_throw_nullref_exception ($func21259) @ dotnet.native.wasm:0x3b7859
corlib_System_Resources_ResourceManager_GetFirstResourceSet_System_Globalization_CultureInfo ($func6657) @ dotnet.native.wasm:0xf84ba
corlib_System_Resources_ResourceManager_GetString_string_System_Globalization_CultureInfo ($func6664) @ dotnet.native.wasm:0xf96bf
aot_instances_aot_wrapper_gsharedvt_out_sig_obj_this_objobj ($func11164) @ dotnet.native.wasm:0x1b4f66
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b87a9
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a923f
interp_entry ($func16550) @ dotnet.native.wasm:0x2b80eb
interp_entry_static_ret_1 ($func16582) @ dotnet.native.wasm:0x2b96e3
aot_instances_aot_wrapper_gsharedvt_in_sig_obj_obj ($func12793) @ dotnet.native.wasm:0x1f84e8
corlib_System_SR_InternalGetResourceString_string ($func3096) @ dotnet.native.wasm:0x7b6cb
corlib_System_SR_GetResourceString_string ($func3098) @ dotnet.native.wasm:0x7b7d2
corlib_System_SR_get_Arg_NullReferenceException ($func2691) @ dotnet.native.wasm:0x6c677
corlib_System_NullReferenceException__ctor ($func2690) @ dotnet.native.wasm:0x6c5ec
aot_instances_aot_wrapper_gsharedvt_out_sig_void_this_ ($func15695) @ dotnet.native.wasm:0x27f342
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_object_init_handle ($func19745) @ dotnet.native.wasm:0x367a00
mono_exception_from_token ($func18784) @ dotnet.native.wasm:0x33a784
mini_llvmonly_throw_corlib_exception ($func21071) @ dotnet.native.wasm:0x3ae808
mini_llvmonly_throw_nullref_exception ($func21259) @ dotnet.native.wasm:0x3b7859
corlib_System_Globalization_CompareInfo__cctor ($func4770) @ dotnet.native.wasm:0xb4a3a
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_class_init_full ($func19752) @ dotnet.native.wasm:0x367eb0
mono_resolve_patch_target_ext ($func20757) @ dotnet.native.wasm:0x397316
mono_resolve_patch_target ($func20758) @ dotnet.native.wasm:0x397739
init_method ($func20971) @ dotnet.native.wasm:0x3a785e
mono_aot_init_llvm_method ($func20970) @ dotnet.native.wasm:0x3a7621
mini_llvm_init_method ($func21258) @ dotnet.native.wasm:0x3b77d4
mono_aot_corlib_init_method ($func182) @ dotnet.native.wasm:0x17bd0
corlib_string_Equals_string_System_StringComparison ($func1018) @ dotnet.native.wasm:0x3e1ce
corlib_System_AppContextConfigHelper_GetBooleanConfig_string_string_bool ($func1309) @ dotnet.native.wasm:0x4c022
corlib_System_Globalization_GlobalizationMode_Settings__cctor ($func4969) @ dotnet.native.wasm:0xbeda9
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_class_init_full ($func19752) @ dotnet.native.wasm:0x367eb0
init_method ($func20971) @ dotnet.native.wasm:0x3a7a42
mono_aot_init_llvm_method ($func20970) @ dotnet.native.wasm:0x3a7621
mini_llvm_init_method ($func21258) @ dotnet.native.wasm:0x3b77d4
mono_aot_corlib_init_method ($func182) @ dotnet.native.wasm:0x17bd0
corlib_System_Globalization_GlobalizationMode_Settings_get_Invariant ($func4958) @ dotnet.native.wasm:0xbe3e5
corlib_System_Globalization_GlobalizationMode_get_Invariant ($func3626) @ dotnet.native.wasm:0x8ac03
corlib_System_Globalization_CultureData_CreateCultureWithInvariantData ($func4773) @ dotnet.native.wasm:0xb561d
corlib_System_Globalization_CultureData_get_Invariant ($func4775) @ dotnet.native.wasm:0xb57ac
corlib_System_Globalization_CultureInfo__cctor ($func4904) @ dotnet.native.wasm:0xbc11d
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_class_init_full ($func19752) @ dotnet.native.wasm:0x367eb0
mono_resolve_patch_target_ext ($func20757) @ dotnet.native.wasm:0x397316
mono_resolve_patch_target ($func20758) @ dotnet.native.wasm:0x397739
init_method ($func20971) @ dotnet.native.wasm:0x3a785e
mono_aot_init_llvm_method ($func20970) @ dotnet.native.wasm:0x3a7621
mini_llvm_init_method ($func21258) @ dotnet.native.wasm:0x3b77d4
mono_aot_corlib_init_method ($func182) @ dotnet.native.wasm:0x17bd0
corlib_System_Globalization_CultureInfo_get_InvariantCulture ($func4880) @ dotnet.native.wasm:0xba68b
Wasm_Browser_Sample_Test_Main ($func9634) @ dotnet.native.wasm:0x1704de
aot_instances_aot_wrapper_gsharedvt_out_sig_void_ ($func15268) @ dotnet.native.wasm:0x263f3e
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b895b
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_try_invoke_byrefs ($func19843) @ dotnet.native.wasm:0x36d3cb
ves_icall_InternalInvoke ($func18901) @ dotnet.native.wasm:0x340062
ves_icall_InternalInvoke_raw ($func18992) @ dotnet.native.wasm:0x343c73
aot_wrapper_corlib_System_dot_Reflection_System_dot_Reflection_dot_RuntimeMethodInfo__InternalInvoke_pinvoke_obj_this_objcl9_intptr_2a_bclsc_Exception_26__attrs_2obj_cls1d_Reflection_dRuntimeMethodInfo_objcl9_intptr_2a_bclsc_Exception_26__attrs_2 ($func6868) @ dotnet.native.wasm:0x107cff
corlib_System_Reflection_MethodBaseInvoker_InterpretedInvoke_Method_object_intptr_ ($func6867) @ dotnet.native.wasm:0x107c7f
corlib_wrapper_delegate_invoke__Module_invoke_object_object_intptr__object_intptr_ ($func9026) @ dotnet.native.wasm:0x15be71
corlib_System_Reflection_MethodBaseInvoker_InvokeWithNoArgs_object_System_Reflection_BindingFlags ($func828) @ dotnet.native.wasm:0x36ac4
corlib_System_Reflection_RuntimeMethodInfo_Invoke_object_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo ($func7010) @ dotnet.native.wasm:0x10e9f0
corlib_System_Reflection_MethodBase_Invoke_object_object__ ($func6851) @ dotnet.native.wasm:0x106b7b
System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint_System_Runtime_InteropServices_JavaScript_JSMarshalerArgument_ ($func9398) @ dotnet.native.wasm:0x16461a
aot_instances_aot_wrapper_gsharedvt_out_sig_void_obj ($func11862) @ dotnet.native.wasm:0x1d2b01
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_try_invoke ($func19756) @ dotnet.native.wasm:0x3683ff
mono_runtime_invoke ($func19792) @ dotnet.native.wasm:0x36a9e5
$mono_wasm_invoke_method_bound @ dotnet.native.wasm:0x4b664e
Module._mono_wasm_invoke_method_bound @ dotnet.native.js:6300
uo @ invoke-cs.ts:273
p.javaScriptExports.call_entry_point @ managed-exports.ts:58
ol @ run.ts:59
rl @ run.ts:17
run @ run.ts:386
(anonymous) @ main.js:23

It seems that an exception is being thrown, then System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint_System_Runtime_InteropServices_JavaScript_JSMarshalerArgument_ .. and then more exceptions.

...
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
interp_runtime_invoke ($func16514) @ dotnet.native.wasm:0x2b6865
mono_jit_runtime_invoke ($func20796) @ dotnet.native.wasm:0x39afaf
do_runtime_invoke ($func19747) @ dotnet.native.wasm:0x367b5c
mono_runtime_invoke_checked ($func19746) @ dotnet.native.wasm:0x367b0d
mono_runtime_try_invoke_byrefs ($func19843) @ dotnet.native.wasm:0x36d3cb
ves_icall_InternalInvoke ($func18901) @ dotnet.native.wasm:0x340062
ves_icall_InternalInvoke_raw ($func18992) @ dotnet.native.wasm:0x343c73
aot_wrapper_corlib_System_dot_Reflection_System_dot_Reflection_dot_RuntimeMethodInfo__InternalInvoke_pinvoke_obj_this_objcl9_intptr_2a_bclsc_Exception_26__attrs_2obj_cls1d_Reflection_dRuntimeMethodInfo_objcl9_intptr_2a_bclsc_Exception_26__attrs_2 ($func6868) @ dotnet.native.wasm:0x107cff
corlib_System_Reflection_MethodBaseInvoker_InterpretedInvoke_Method_object_intptr_ ($func6867) @ dotnet.native.wasm:0x107c7f
corlib_wrapper_delegate_invoke__Module_invoke_object_object_intptr__object_intptr_ ($func9026) @ dotnet.native.wasm:0x15be71
corlib_System_Reflection_MethodBaseInvoker_InvokeWithNoArgs_object_System_Reflection_BindingFlags ($func828) @ dotnet.native.wasm:0x36ac4
corlib_System_Reflection_RuntimeMethodInfo_Invoke_object_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo ($func7010) @ dotnet.native.wasm:0x10e9f0
corlib_System_Reflection_MethodBase_Invoke_object_object__ ($func6851) @ dotnet.native.wasm:0x106b7b
System_Runtime_InteropServices_JavaScript_System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint_System_Runtime_InteropServices_JavaScript_JSMarshalerArgument_ ($func9398) @ dotnet.native.wasm:0x16461a
aot_instances_aot_wrapper_gsharedvt_out_sig_void_obj ($func11862) @ dotnet.native.wasm:0x1d2b01
jit_call_cb ($func16559) @ dotnet.native.wasm:0x2b8761
$mono_llvm_cpp_catch_exception @ dotnet.native.wasm:0x2d65f5
do_jit_call ($func16481) @ dotnet.native.wasm:0x2b5785
mono_interp_exec_method ($func16471) @ dotnet.native.wasm:0x2a931a
...

@radical
Copy link
Member Author

radical commented Nov 4, 2023

The issue seems to be that CultureInfo..cctor indirectly calls CompareInfo..cctor, which then tries to access a static field from CultureInfo (s_InvariantCultureInfo), but that is null because it's cctor hasn't completed yet!

CultureInfo..cctor
    -> CultureData..cctor
    -> interp_runtime_invoke: >> method: System.Globalization.CalendarData:.cctor ()
    -> interp_runtime_invoke: >> method: System.Globalization.GlobalizationMode/Settings:.cctor ()
       -> Environment..cctor
       -> Marshal..cctor
       -> CompareInfo..cctor
            - tries to use CultureInfo.s_invariant .. which hasn't been initialized yet!

This patch works around the issue causing the tests to pass:

diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
index 31b17f3c4f5..c87c290a3fa 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
@@ -102,7 +102,7 @@ public partial class CultureInfo : IFormatProvider, ICloneable
         private static volatile CultureInfo? s_userDefaultUICulture;

         // The Invariant culture;
-        private static readonly CultureInfo s_InvariantCultureInfo = new CultureInfo(CultureData.Invariant, isReadOnly: true);
+        private static CultureInfo? s_InvariantCultureInfo;

         // These are defaults that we use if a thread has not opted into having an explicit culture
         private static volatile CultureInfo? s_DefaultThreadCurrentUICulture;
@@ -462,7 +462,7 @@ public static CultureInfo InvariantCulture
         {
             get
             {
-                Debug.Assert(s_InvariantCultureInfo != null);
+                s_InvariantCultureInfo ??= new CultureInfo(CultureData.Invariant, isReadOnly: true);
                 return s_InvariantCultureInfo;
             }
         }

@radical
Copy link
Member Author

radical commented Nov 4, 2023

Cc @vargaz

@vargaz
Copy link
Contributor

vargaz commented Nov 4, 2023

I can reproduce.

@lewing
Copy link
Member

lewing commented Nov 7, 2023

@vargaz are you looking into this one?

@vargaz
Copy link
Contributor

vargaz commented Nov 7, 2023

What probably happens is AOT invokes cctors in a slighly different order.

@vargaz vargaz self-assigned this Nov 7, 2023
@radical radical added disabled-test The test is disabled in source code against the issue and removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Nov 7, 2023
@vargaz
Copy link
Contributor

vargaz commented Nov 8, 2023

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.

@vargaz
Copy link
Contributor

vargaz commented Nov 8, 2023

CompareInfo is a beforefieldinit class, which means the runtime is supposed to be able to execute its cctor at any time before the moment of first access to its static members. So what mono is currently doing is correct. Its possible to change this, but it would mean that more type init checks would be done by the generated code, so it would be somewhat bigger/slower.

@ilonatommy
Copy link
Member

If the mono's behavior is correct then I believe the change in libs, similar to what Ankit proposed in #94225 (comment) will be needed to fix it. @tarekgh, are you fine with moving the initialization to the getter?

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 12, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono area-System.Globalization area-System.Threading disabled-test The test is disabled in source code against the issue Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants