-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=456551 Error MessageFill 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
|
This might be a related failure too - #87672 (comment) . |
Tagging subscribers to this area: @mangod9 Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=456551 Error MessageFill 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 validationBuild: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=456551
|
I can't reproduce the same error. When we run
|
Can you share how exactly you are running the tests?
|
Running this on macos with v8
.. with a fresh build of e4fbdb9 . |
Building with
|
You also need |
The issue goes away if you remove Same as
|
Also, I tried to catch/print the exception in SimpleWasmTestRunner, and got:
Update: .. which is the same error as seen in #94212 . |
System.Globalization.Calendars.Hybrid.WASM.Tests
getting terminatedSystem.Globalization.Calendars.Hybrid.WASM.Tests
and System.Globalization.Hybrid.WASM.Tests
getting terminated
@lambdageek any idea what might be happening here? |
Smallest repro:
|
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. |
I couldn't reproduce with trimming and no aot. |
I think that NRE might be the main issue. |
runtime/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Unix.cs Lines 8 to 34 in 1d8077e
This seems to be
Update: got here from |
trace:
It seems that an exception is being thrown, then
|
The issue seems to be that
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;
}
} |
Cc @vargaz |
I can reproduce. |
@vargaz are you looking into this one? |
What probably happens is AOT invokes cctors in a slighly different order. |
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:
will try to fix. |
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. |
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? |
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.
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
runtime/src/mono/mono/metadata/icall.c
Lines 6176 to 6180 in ba65769
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
Summary
The text was updated successfully, but these errors were encountered: