You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arm32 Libraries tests failures with full PGO #53549
fullpgo arm32 failures in a number of array enumerator tests:
System.Tests.ArrayEnumeratorTests_int.IEnumerable_Generic_Enumerator_Reset_BeforeIteration_Support(count: 0) [FAIL]
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
/_/src/libraries/System.Runtime/tests/System/ArraySegmentTests.cs(44,0): at System.Tests.ArraySegment_Tests`1.Factory(Int32 count, Int32 offset, Int32 length)
/_/src/libraries/System.Runtime/tests/System/ArraySegmentTests.cs(24,0): at System.Tests.ArraySegment_Tests`1.GenericIListFactory(Int32 count)
/_/src/libraries/Common/tests/System/Collections/IList.Generic.Tests.cs(93,0): at System.Collections.Tests.IList_Generic_Tests`1.GenericICollectionFactory(Int32 count)
/_/src/libraries/Common/tests/System/Collections/ICollection.Generic.Tests.cs(67,0): at System.Collections.Tests.ICollection_Generic_Tests`1.GenericIEnumerableFactory(Int32 count)
/_/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs(663,0): at System.Collections.Tests.IEnumerable_Generic_Tests`1.IEnumerable_Generic_Enumerator_Reset_BeforeIteration_Support(Int32 count)
Also whenever I run on arm via a checked corerun I get a slew of unwanted output from the runtime, some sort of directory probing :
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//.
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//..
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//crossgen2
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//IL
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//R2RDump
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//xunit
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//R2RTest
The specified managed assembly is not a file: /mnt/laptop/repos/runtime/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root//PDB
I can't repro the issues and from the test history it looks like these tests are not always failing. So will wait for this weekend's runs to see if any clearer pattern emerges.
Looking at the last weekend runs the sets of failures seem to fluctuate, but there's a common failure mode where an object is unexpectedly null. This seems to happen across all architectures (though more commonly for arm/arm64) so likely is some high level transformation.
Not sure if it's the same issue but I can get libraries tests to fail with PGO enabled if I add -verbose to the xunit args... the initial tests run fine but eventually you get a whole raft of failures, eg:
set COMPlus_TC_QuickJitForLoops=1
set COMPlus_TieredPGO=1
C:\repos\runtime0\artifacts\bin\testhost\net6.0-windows-Release-x64\dotnet.exe exec --runtimeconfig System.Data.Common.Tests.runtimeconfig.json --depsfile System.Data.Common.Tests.deps.json xunit.console.dll System.Data.Common.Tests.dll -xml testResults.xml -nologo -notrait category=OuterLoop -notrait category=failing -verbose
Discovering: System.Data.Common.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Data.Common.Tests (found 1811 of 1813 test cases)
Starting: System.Data.Common.Tests (parallel test collections = on, max threads = 12)
...
System.Data.Tests.DataColumnExpressionTest.BinaryOperator(operandType1: typeof(uint), operandType2: typeof(sbyte), resultType: typeof(byte), expression: "Operand1 + Operand2", operand1: 10, operand2: , result: ) [STARTING]
[FATAL ERROR] System.NullReferenceException
System.NullReferenceException : Object reference not set to an instance of an object.
System.Data.Tests.DataColumnExpressionTest.BinaryOperator(operandType1: typeof(uint), operandType2: typeof(sbyte), resultType: typeof(byte), expression: "Operand1 - Operand2", operand1: 10, operand2: 2, result: 8) [STARTING]
[FATAL ERROR] System.NullReferenceException
System.NullReferenceException : Object reference not set to an instance of an object.
System.Data.Tests.DataColumnExpressionTest.BinaryOperator(operandType1: typeof(uint), operandType2: typeof(sbyte), resultType: typeof(byte), expression: "Operand1 - Operand2", operand1: 10, operand2: , result: ) [STARTING]
[FATAL ERROR] System.NullReferenceException
System.NullReferenceException : Object reference not set to an instance of an object.
System.Data.Tests.DataColumnExpressionTest.BinaryOperator(operandType1: typeof(uint), operandType2: typeof(sbyte), resultType: typeof(byte), expression: "Operand1 * Operand2", operand1: 10, operand2: 2, result: 20) [STARTING]
[FATAL ERROR] System.NullReferenceException
System.NullReferenceException : Object reference not set to an instance of an object.
System.Data.Tests.DataColumnExpressionTest.BinaryOperator(operandType1: typeof(uint), operandType2: typeof(sbyte), resultType: typeof(byte), expression: "Operand1 * Operand2", operand1: 10, operand2: , result: ) [STARTING]
For the -verbose issue, when we jit VerboseReporterMessageHandler:<.ctor>b__0_1(MessageHandlerArgs`1):this (MethodHash=e788d62d) with PGO, we end up producing:
IN0016: 000091vmovupd xmmword ptr [0000H],xmm0
and not surprisingly this leads to an NRE at runtime.
Looks like this is a bug in the GDV expansion for a call returning a struct value that is the payload of a box. Normally we'd allocate the box object and then make the call, but with GDV we can end up making the call first.
When H is recompiled at Tier1, GDV kicks in, and we end up with bad code:
48B8D0A2141AF97F0000 movrax,0x7FF91A14A2D0 // gdv test for i483901cmp qword ptr [rcx],rax 0F85BD000000 jne G_M22385_IG13 C5F9104108 vmovupdxmm0, xmmword ptr [rcx+8] // blown box init C5F911042500000000 vmovupd xmmword ptr [0000H],xmm0
and hence an exception
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at X.H(I i) in repro.exe:token 0x6000004+0x0
at X.Main() in repro.exe:token 0x6000005+0x17
Activity
AndyAyersMS commentedon Jun 2, 2021
Also whenever I run on arm via a checked corerun I get a slew of unwanted output from the runtime, some sort of directory probing :
AndyAyersMS commentedon Jun 2, 2021
Trying to repro but getting other random-looking failures, currently.
AndyAyersMS commentedon Jun 4, 2021
I can't repro the issues and from the test history it looks like these tests are not always failing. So will wait for this weekend's runs to see if any clearer pattern emerges.
AndyAyersMS commentedon Jun 8, 2021
Looking at the last weekend runs the sets of failures seem to fluctuate, but there's a common failure mode where an object is unexpectedly null. This seems to happen across all architectures (though more commonly for arm/arm64) so likely is some high level transformation.
See eg https://dev.azure.com/dnceng/public/_build/results?buildId=1173163&view=ms.vss-test-web.build-test-results-tab
AndyAyersMS commentedon Jul 12, 2021
More than arm32 failing, need to investigate
https://dev.azure.com/dnceng/public/_build/results?buildId=1231810&view=ms.vss-test-web.build-test-results-tab
AndyAyersMS commentedon Jul 20, 2021
Not sure if it's the same issue but I can get libraries tests to fail with PGO enabled if I add
-verboseto the xunit args... the initial tests run fine but eventually you get a whole raft of failures, eg:AndyAyersMS commentedon Jul 20, 2021
For the
-verboseissue, when we jitVerboseReporterMessageHandler:<.ctor>b__0_1(MessageHandlerArgs`1):this (MethodHash=e788d62d)with PGO, we end up producing:and not surprisingly this leads to an NRE at runtime.
AndyAyersMS commentedon Jul 20, 2021
Looks like this is a bug in the GDV expansion for a call returning a struct value that is the payload of a box. Normally we'd allocate the box object and then make the call, but with GDV we can end up making the call first.
More details forthcoming...
AndyAyersMS commentedon Jul 21, 2021
Here's a simple repro.
When H is recompiled at Tier1, GDV kicks in, and we end up with bad code:
and hence an exception
AndyAyersMS commentedon Jul 21, 2021
cc @EgorBo in case you're interested or have run across this ... still looking for a fix that does not require losing some GDV.
JIT: work around issue with GDV and Bboxing
JIT: work around issue with GDV and Bboxing (#56126)