Closed
Description
This test has been failing off and on for a while with random PGO (and possibly other modes)
One common failure mode is
set COMPlus_TieredCompilation=1
set COMPlus_ReadyToRun=0
set COMPlus_TC_QuickJitForLoops=1
set COMPlus_TieredPGO=1
set COMPlus_JitRandomEdgeCounts=1
System.Tests.DoubleTests.ParsePatterns [FAIL]
Assert.Equal() Failure
↓ (pos 6)
Expected: 00000062
Actual: 00000000
↑ (pos 6)
Stack Trace:
C:\repos\runtime0\src\libraries\System.Runtime\tests\System\DoubleTests.cs(433,0): at System.Tests.DoubleTests.ParsePatterns()
at InvokeStub_DoubleTests.ParsePatterns(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Though I have also seen
Starting: System.Runtime.Tests (parallel test collections = off, max threads = 8)
System.Tests.DoubleTests.ParsePatterns [FAIL]
System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack Trace:
C:\repos\runtime0\src\libraries\System.Private.CoreLib\src\System\BitConverter.cs(678,0): at System.BitConverter.<>c.<ToString>b__43_0(Span`1 dst, ValueTuple`3 state)
C:\repos\runtime0\src\libraries\System.Runtime\tests\System\DoubleTests.cs(433,0): at System.Tests.DoubleTests.ParsePatterns()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
C:\repos\runtime0\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs(69,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
and gc heap corruption.
Repros fairly readily with just this test enabled (add -parallel none -method System.Tests.DoubleTests.ParsePatterns
to xunit args).
Binary search via COMPlus_JitEnablePgoRange
indicates the problematic method is
Compiling 7228 System.Tests.DoubleTests::ParsePatterns, IL size = 287, hash=0xb7003f40 Tier1-OSR @0x102