Repository navigation
Closed
Labels
JitUntriagedCLR JIT issues needing additional triagearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItest-bugProblem in test source code (most likely)
Milestone
Description
----- start 19:14:03.62 =============== To repro directly: =====================================================
pushd C:\Users\robox\j\workspace\arm64_cross_c---f75df612\_\fx\bin\tests\System.Text.RegularExpressions.Tests\netcoreapp-Windows_NT-Release-arm64\
set COMPlus_TieredCompilation=0
call C:\Users\robox\j\workspace\arm64_cross_c---f75df612\_\fx\bin\testhost\netcoreapp-Windows_NT-Release-arm64\dotnet.exe xunit.console.netcore.exe System.Text.RegularExpressions.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
popd
===========================================================================================================
C:\Users\robox\j\workspace\arm64_cross_c---f75df612\_\fx\bin\tests\System.Text.RegularExpressions.Tests\netcoreapp-Windows_NT-Release-arm64>set COMPlus_TieredCompilation=0
C:\Users\robox\j\workspace\arm64_cross_c---f75df612\_\fx\bin\tests\System.Text.RegularExpressions.Tests\netcoreapp-Windows_NT-Release-arm64>set COMPlus_JITMinOpts=1
C:\Users\robox\j\workspace\arm64_cross_c---f75df612\_\fx\bin\tests\System.Text.RegularExpressions.Tests\netcoreapp-Windows_NT-Release-arm64>call C:\Users\robox\j\workspace\arm64_cross_c---f75df612\_\fx\bin\testhost\netcoreapp-Windows_NT-Release-arm64\dotnet.exe xunit.console.netcore.exe System.Text.RegularExpressions.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
xUnit.net console test runner (64-bit .NET Core)
Copyright (C) 2014 Outercurve Foundation.
Discovering: System.Text.RegularExpressions.Tests
Discovered: System.Text.RegularExpressions.Tests
Starting: System.Text.RegularExpressions.Tests
System.Text.RegularExpressions.Tests.RegexMatchTests.Match_ExcessPrefix [FAIL]
Timed out after 60000ms waiting for remote process 5512
Expected: True
Actual: False
Stack Trace:
D:\j\workspace\arm64_cross_c---101bec61\_\fx\src\CoreFx.Private.TestUtilities\src\System\Diagnostics\RemoteExecutorTestBase.cs(308,0): at System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle.Dispose(Boolean disposing)
D:\j\workspace\arm64_cross_c---101bec61\_\fx\src\CoreFx.Private.TestUtilities\src\System\Diagnostics\RemoteExecutorTestBase.cs(295,0): at System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle.Dispose()
D:\j\workspace\arm64_cross_c---101bec61\_\fx\src\System.Text.RegularExpressions\tests\Regex.Match.Tests.cs(795,0): at System.Text.RegularExpressions.Tests.RegexMatchTests.Match_ExcessPrefix()
Finished: System.Text.RegularExpressions.Tests
=== TEST EXECUTION SUMMARY ===
System.Text.RegularExpressions.Tests Total: 1498, Errors: 0, Failed: 1, Skipped: 0, Time: 197.040s
----- end 19:17:36.82 ----- exit code 1 ----------------------------------------------------------
category:testing
theme:minopts
skill-level:intermediate
cost:medium
Metadata
Metadata
Assignees
Labels
JitUntriagedCLR JIT issues needing additional triagearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItest-bugProblem in test source code (most likely)
Activity
kouvel commentedon Jul 31, 2018
This is also failing on x64 on several OSes in the coreclr repo's corefx test runs when tiering is enabled (equivalent to minopts for this test). Not sure if it's related to the arm64 failure, but it's not clear to me what the problem is on x64. Rough numbers from my machine:
corefx repo all regex tests -
just the Match_ExcessPrefix test (times in ms for each regex in test) -
I don't see any numbers close to 60 seconds and yet it's timing out. I noticed that if I add RegexOptions.Compiled, the last regex in the test is taking ~60000 ms to complete with release coreclr and release corefx (and 1000 ms with debug coreclr and debug corefx), but that option is not specified in the test.
[-][arm64] System.Text.RegularExpressions.Tests JitMinOpts only timeout[/-][+]System.Text.RegularExpressions.Tests JitMinOpts only timeout[/+]kouvel commentedon Jul 31, 2018
PR to temporarily disable test: dotnet/corefx#31500
echesakov commentedon Aug 1, 2018
I investigated this timeout failure and I believe this is due to the fact that under debug and minopts JIT does not expand
CORINFO_INTRINSIC_StringGetCharand instead emit call toCOMString::GetCharAthelper inSystem.Text.RegularExpressions.RegexBoyerMoore:.ctor(ref,bool,bool,ref):this.I did simple experiment and for optimized code I disabled ONLY expansion of
CORINFO_INTRINSIC_StringGetCharin importer which brings up running time forSystem.Text.RegularExpressions.Tests.RegexMatchTests.Match_ExcessPrefixfrom 2s up to 550s (which is roughly the same time needed for the test to finish under JITMinOpts).Another experiment showed that setting
JitMinOptsName=System.Text.RegularExpressions.RegexBoyerMoore:.ctor(ref,bool,bool,ref):thisis enough for this test to fail due to timeout out.@dotnet/jit-contrib Is this supposed to be this way? This call to
COMString::GetCharAthappens in a loop and according to PerfView takes 99.4 Inc %I also attached JitDisasm in case if someone is interested to see what's going on.
optimized code dasm.txt
optimized code - forbid CORINFO_INTRINSIC_StringGetChar expansion dasm.txt
minopts dasm.txt
BruceForstall commentedon Aug 7, 2018
The JIT wants to leave calls as calls, and not do the intrinsic optimization, during MinOpts. This seems completely reasonable. The test does pass, it's just super slow. That would be expected. Seems like we just need a way to bump the timeout of this test, significantly, under Minopts/debuggable code.
AndyAyersMS commentedon Aug 7, 2018
This is perhaps and example where Tier0 should diverge from minopts?
kouvel commentedon Aug 14, 2018
Is that an issue even when RegexOptions.Compiled is not specified? The test doesn't specify RegexOptions.Compiled and locally the test was running fairly quickly with debug coreclr and debug corefx. Only when I change the test to use RegexOptions.Compiled it was very slow, any idea why it would be failing in the CI?
Disable a regex test that is failing with minopts (#19488)
kouvel commentedon Aug 16, 2018
The test was disabled for the coreclr repo's "CoreFX Tests" job in dotnet/coreclr#19488, once this is fixed please re-enable the test.
danmoseley commentedon Aug 21, 2018
@ViktorHofer fyi.
stephentoub commentedon Feb 8, 2020
FYI, this test has been changed since this issue was opened.
am11 commentedon Sep 23, 2021
With engine
SourceGenerated, same test has started to fail:windows x64 - https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1846899be12742d186/System.Text.RegularExpressions.Tests/1/console.a2979f90.log
linux musl arm64 - https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-ae9baf50200a4cdebf/System.Text.RegularExpressions.Tests/1/console.28be79eb.log
stephentoub commentedon Sep 23, 2021
I'd expect this to behave similarly to RegexOptions.Compiled, but with even more expense, as it's also running Roslyn to compile C#.
You're seeing this failure only in JitMinOpts, or in general?
VincentBu commentedon Sep 23, 2021
Failed again in: runtime 20210922.59
Failed test:
Error message:
am11 commentedon Sep 23, 2021
In general. I noticed this in a few recent outerloop runs on main, also failing in some PRs.
stephentoub commentedon Sep 23, 2021
Yeah, it looks like running Roslyn on a checked runtime is just too slow.
stephentoub commentedon Sep 23, 2021
Actually, this test is already disabled against both checked and min opts:
runtime/src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs
Lines 1091 to 1094 in 00aa651
But clearly from the output above, it's running on checked.
@safern, any known issue here?
am11 commentedon Sep 23, 2021
Ah, perhaps
SkipOnTargetFrameworkfollowed bySkipOnCoreClris not being handled properly?Looks like it also failed a few times on arm64-musl release (e.g. https://github.com/dotnet/runtime/runs/3683859860) and windows x64 debug.
am11 commentedon Sep 24, 2021
Ops, I missed that RuntimeConfiguration == checked, LibrariesConfiguration == Release.
Double checked in runfo results: #59541, they are all failing on
checked.am11 commentedon Sep 24, 2021
In SkipOnCoreClrDiscoverer, we use
stressMode && runtimeConfiguration: https://github.com/dotnet/arcade/blob/8f58bb36250772fc0a4a0305daf307292a75a735/src/Microsoft.DotNet.XUnitExtensions/src/Discoverers/SkipOnCoreClrDiscoverer.cs#L50. However, in this case we expect it to performstressMode || runtimeConfiguration, but I can see why we would need to keep&&in other cases.I have tested locally on macOS, it does not skip this test with RuntimeConfiguration=checked, and commenting
/* , RuntimeTestModes.JitMinOpts */part does skip it.stephentoub commentedon Nov 29, 2021
This was fixed.