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] Failures in System.Numerics.Vectors and System.Runtime.Intrinsics tests #83792

Closed
radekdoulik opened this issue Mar 22, 2023 · 3 comments

Comments

@radekdoulik
Copy link
Member

radekdoulik commented Mar 22, 2023

These are happening in AOT only. Bisecting the issue revealed 3fec686 to be 1st commit with that problem. It was not catched by CI as these tests are only part of runtime-wasm pipeline.

It can be replicated with (some of the props might not be needed)

./dotnet build -bl -c Release -p:TargetOS=browser /t:Test -p:Scenario=WasmTestOnBrowser -p:EnableAggressiveTrimming=true -p:RunAOTCompilation=true -p:WasmNativeDebugSymbos=true -p:WasmNativeStrip=false  .\src\libraries\System.Numerics.Vectors\tests

System.Numerics.Vectors

[15:14:15] info: Running /home/helixbot/.jsvu/bin/v8 --expose_wasm --stack-trace-limit=1000 test-main.js -- --run WasmTestRunner.dll System.Numerics.Vectors.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
                 
[15:14:15] info: Incoming arguments: --run WasmTestRunner.dll System.Numerics.Vectors.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:14:15] info: Application arguments: --run WasmTestRunner.dll System.Numerics.Vectors.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:14:15] info: console.info: Initializing dotnet version 8.0.0-ci commit hash a26a82b34683fe1c785721968e0b3e05826c39e8
[15:14:16] info: Discovering: System.Numerics.Vectors.Tests.dll (method display = ClassAndMethod, method display options = None)
[15:14:16] info: Discovered:  System.Numerics.Vectors.Tests.dll (found 1478 of 1479 test cases)
[15:14:16] info: Using random seed for test cases: 844135963
[15:14:16] info: Using random seed for collections: 844135963
[15:14:16] info: Starting:    System.Numerics.Vectors.Tests.dll
[15:14:18] fail: [FAIL] System.Numerics.Tests.GenericVectorTests.VectorSingleEqualsNaNTest
[15:14:18] info: Assert.True() Failure
[15:14:18] info: Expected: True
[15:14:18] info: Actual:   False
[15:14:18] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:14:20] info: Finished:    System.Numerics.Vectors.Tests.dll
[15:14:20] info: 
[15:14:20] info: === TEST EXECUTION SUMMARY ===
[15:14:20] info: Total: 1514, Errors: 0, Failed: 1, Skipped: 0, Time: 3.843145s
[15:14:20] info: 
[15:14:20] info: Process v8 exited with 1

System.Runtime.Intrinsics

                 
[15:20:39] info: Incoming arguments: --run WasmTestRunner.dll System.Runtime.Intrinsics.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:20:39] info: Application arguments: --run WasmTestRunner.dll System.Runtime.Intrinsics.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:20:39] info: console.info: Initializing dotnet version 8.0.0-ci commit hash a26a82b34683fe1c785721968e0b3e05826c39e8
[15:20:39] info: Discovering: System.Runtime.Intrinsics.Tests.dll (method display = ClassAndMethod, method display options = None)
[15:20:40] info: Discovered:  System.Runtime.Intrinsics.Tests.dll (found 1022 of 1023 test cases)
[15:20:40] info: Using random seed for test cases: 218341267
[15:20:40] info: Using random seed for collections: 218341267
[15:20:40] info: Starting:    System.Runtime.Intrinsics.Tests.dll
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector512Tests.Vector512DoubleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector512Tests.Vector512SingleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector256Tests.Vector256SingleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector256Tests.Vector256DoubleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector128Tests.Vector128DoubleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector128Tests.Vector128SingleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:42] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector64Tests.Vector64DoubleEqualsNaNTest
[15:20:42] info: Assert.True() Failure
[15:20:42] info: Expected: True
[15:20:42] info: Actual:   False
[15:20:42] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:42] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector64Tests.Vector64SingleEqualsNaNTest
[15:20:42] info: Assert.True() Failure
[15:20:42] info: Expected: True
[15:20:42] info: Actual:   False
[15:20:42] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:42] info: Finished:    System.Runtime.Intrinsics.Tests.dll
[15:20:42] info: 
[15:20:42] info: === TEST EXECUTION SUMMARY ===
[15:20:42] info: Total: 1048, Errors: 0, Failed: 8, Skipped: 0, Time: 1.561094s
[15:20:42] info: 
[15:20:42] info: Received expected 262990 of /root/helix/work/workitem/uploads/xharness-output/testResults.xml
[15:20:42] info: Finished writing 262990 bytes of RESULTXML
[15:20:42] info: Xml file was written to the provided writer.
[15:20:42] info: Tests run: 1048 Passed: 1040 Inconclusive: 0 Failed: 8 Ignored: 0 Skipped: 0
[15:20:42] info: Process v8 exited with 1

Discussed it with @kg on discord. @kg and @BrzVlad come with an idea how to fix it.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Mar 22, 2023
@radekdoulik radekdoulik added this to the 8.0.0 milestone Mar 22, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Mar 22, 2023
@radekdoulik radekdoulik added untriaged New issue has not been triaged by the area owner area-Codegen-Interpreter-mono and removed untriaged New issue has not been triaged by the area owner area-Codegen-AOT-mono labels Mar 22, 2023
@ghost
Copy link

ghost commented Mar 22, 2023

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

Issue Details

These are happening in AOT only. Bisecting the issue revealed 3fec686 to be 1rst commit with that problem. It was not catched by CI as these tests are only part of runtime-wasm pipeline.

It can be replicated with (some of the props might not be needed)

./dotnet build -bl -c Release -p:TargetOS=browser /t:Test -p:Scenario=WasmTestOnBrowser -p:EnableAggressiveTrimming=true -p:RunAOTCompilation=true -p:WasmNativeDebugSymbos=true -p:WasmNativeStrip=false  .\src\libraries\System.Numerics.Vectors\tests

System.Numerics.Vectors

[15:14:15] info: Running /home/helixbot/.jsvu/bin/v8 --expose_wasm --stack-trace-limit=1000 test-main.js -- --run WasmTestRunner.dll System.Numerics.Vectors.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
                 
[15:14:15] info: Incoming arguments: --run WasmTestRunner.dll System.Numerics.Vectors.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:14:15] info: Application arguments: --run WasmTestRunner.dll System.Numerics.Vectors.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:14:15] info: console.info: Initializing dotnet version 8.0.0-ci commit hash a26a82b34683fe1c785721968e0b3e05826c39e8
[15:14:16] info: Discovering: System.Numerics.Vectors.Tests.dll (method display = ClassAndMethod, method display options = None)
[15:14:16] info: Discovered:  System.Numerics.Vectors.Tests.dll (found 1478 of 1479 test cases)
[15:14:16] info: Using random seed for test cases: 844135963
[15:14:16] info: Using random seed for collections: 844135963
[15:14:16] info: Starting:    System.Numerics.Vectors.Tests.dll
[15:14:18] fail: [FAIL] System.Numerics.Tests.GenericVectorTests.VectorSingleEqualsNaNTest
[15:14:18] info: Assert.True() Failure
[15:14:18] info: Expected: True
[15:14:18] info: Actual:   False
[15:14:18] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:14:20] info: Finished:    System.Numerics.Vectors.Tests.dll
[15:14:20] info: 
[15:14:20] info: === TEST EXECUTION SUMMARY ===
[15:14:20] info: Total: 1514, Errors: 0, Failed: 1, Skipped: 0, Time: 3.843145s
[15:14:20] info: 
[15:14:20] info: Process v8 exited with 1

System.Runtime.Intrinsics

                 
[15:20:39] info: Incoming arguments: --run WasmTestRunner.dll System.Runtime.Intrinsics.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:20:39] info: Application arguments: --run WasmTestRunner.dll System.Runtime.Intrinsics.Tests.dll -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
[15:20:39] info: console.info: Initializing dotnet version 8.0.0-ci commit hash a26a82b34683fe1c785721968e0b3e05826c39e8
[15:20:39] info: Discovering: System.Runtime.Intrinsics.Tests.dll (method display = ClassAndMethod, method display options = None)
[15:20:40] info: Discovered:  System.Runtime.Intrinsics.Tests.dll (found 1022 of 1023 test cases)
[15:20:40] info: Using random seed for test cases: 218341267
[15:20:40] info: Using random seed for collections: 218341267
[15:20:40] info: Starting:    System.Runtime.Intrinsics.Tests.dll
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector512Tests.Vector512DoubleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector512Tests.Vector512SingleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector256Tests.Vector256SingleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector256Tests.Vector256DoubleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector128Tests.Vector128DoubleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:41] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector128Tests.Vector128SingleEqualsNaNTest
[15:20:41] info: Assert.True() Failure
[15:20:41] info: Expected: True
[15:20:41] info: Actual:   False
[15:20:41] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:42] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector64Tests.Vector64DoubleEqualsNaNTest
[15:20:42] info: Assert.True() Failure
[15:20:42] info: Expected: True
[15:20:42] info: Actual:   False
[15:20:42] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:42] fail: [FAIL] System.Runtime.Intrinsics.Tests.Vectors.Vector64Tests.Vector64SingleEqualsNaNTest
[15:20:42] info: Assert.True() Failure
[15:20:42] info: Expected: True
[15:20:42] info: Actual:   False
[15:20:42] info:    at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )
[15:20:42] info: Finished:    System.Runtime.Intrinsics.Tests.dll
[15:20:42] info: 
[15:20:42] info: === TEST EXECUTION SUMMARY ===
[15:20:42] info: Total: 1048, Errors: 0, Failed: 8, Skipped: 0, Time: 1.561094s
[15:20:42] info: 
[15:20:42] info: Received expected 262990 of /root/helix/work/workitem/uploads/xharness-output/testResults.xml
[15:20:42] info: Finished writing 262990 bytes of RESULTXML
[15:20:42] info: Xml file was written to the provided writer.
[15:20:42] info: Tests run: 1048 Passed: 1040 Inconclusive: 0 Failed: 8 Ignored: 0 Skipped: 0
[15:20:42] info: Process v8 exited with 1

Discussed it with @kg on discord. @kg and @BrzVlad come with an idea how to fix it.

Author: radekdoulik
Assignees: kg
Labels:

untriaged, area-Codegen-AOT-mono, area-Codegen-Interpreter-mono

Milestone: 8.0.0

kg added a commit to kg/runtime that referenced this issue Mar 22, 2023
kg added a commit that referenced this issue Mar 23, 2023
The inlining changes have caused us to run some stuff in the interpreter in AOT configuration that used to run in AOT, which is somehow causing some floating point tests to fail that pass in interp-only mode. This workaround makes the tests work again.
@vargaz
Copy link
Contributor

vargaz commented Mar 23, 2023

Reverting 3fec686 does seem to fix the problem.

@vargaz
Copy link
Contributor

vargaz commented Mar 23, 2023

This seems to fix the problem for me:

diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c
index 91c6852ea6f..fb416e9ff08 100644
--- a/src/mono/mono/mini/interp/transform.c
+++ b/src/mono/mono/mini/interp/transform.c
@@ -3492,6 +3492,8 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target
 			if (td->verbose_level > 1)
 				g_print("Prohibiting second inlined call in %s (target %s)\n", td->method->name, target_method->name);
 			return FALSE;
+		} else if (td->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE) {
+			return FALSE;
 		} else {
 			if (td->verbose_level > 2)
 				g_print("Allowing single inlined call in %s (target %s)\n", td->method->name, target_method->name);

kg added a commit to kg/runtime that referenced this issue Mar 23, 2023
vargaz pushed a commit that referenced this issue Mar 24, 2023
@kg kg closed this as completed Jun 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants