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

Test failure: System.Text.RegularExpressions.Tests.RegexMatchTests.Match_InstanceMethods_DefaultTimeout_SourceGenerated_Throws #109903

Closed
v-wenyuxu opened this issue Nov 18, 2024 · 3 comments · Fixed by #109835
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs in-pr There is an active PR which will close this issue when it is merged JitStress CLR JIT issues involving JIT internal stress modes
Milestone

Comments

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress-random 20241116.1

Failed tests:

net10.0-windows-Release-x86-jitstress_random_2-Windows.10.Amd64.Open
    - System.Text.RegularExpressions.Tests.RegexMatchTests.Match_InstanceMethods_DefaultTimeout_SourceGenerated_Throws

Error message:

 Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Exit code was -1073740286 but it should have been 42

Stack trace:

   at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose(Boolean disposing) in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs:line 242
   at System.Text.RegularExpressions.Tests.RegexMatchTests.Match_InstanceMethods_DefaultTimeout_SourceGenerated_Throws() in /_/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs:line 1341
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57
@v-wenyuxu v-wenyuxu added arch-x86 blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows labels Nov 18, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 18, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

@amanasifkhalid
Copy link
Member

The underlying failure is this JIT assert:

Assert failure(PID 6108 [0x000017dc], Thread: 4136 [0x1028]): Assertion failed 'newLayoutCost < currLayoutCost' in 'System.Text.RegularExpressions.Generated.<RegexGenerator_g>F7FE40FA59AA1B7AFBC0EA06BE5331F65B39D6ED9591F04C6A948E9E38B7D35CD__Match_InstanceMethods_DefaultTimeout_SourceGenerated_ThrowsImpl_0+RunnerFactory+Runner:TryMatchAtCurrentPosition(System.ReadOnlySpan`1[ushort]):ubyte:this' during 'Optimize layout' (IL size 1638; hash 0x797ecfd0; FullOpts)

Duplicate of #109831.

@amanasifkhalid amanasifkhalid added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed arch-x86 area-System.Text.RegularExpressions os-windows untriaged New issue has not been triaged by the area owner labels Nov 18, 2024
@amanasifkhalid amanasifkhalid self-assigned this Nov 18, 2024
@amanasifkhalid amanasifkhalid added this to the 10.0.0 milestone Nov 18, 2024
Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Nov 18, 2024
mikelle-rogers pushed a commit to mikelle-rogers/runtime that referenced this issue Dec 10, 2024
Follow-up to dotnet#109741. Fixes dotnet#109831. Fixes dotnet#109905. Fixes dotnet#109903.

Tolerate some floating-point imprecision when comparing the cost of a new layout produced by 3-opt to the previous layout's cost. The JitStress failures I looked all stressed JitOptRepeat, which can produce absurdly large loop block weights by rerunning optSetBlockWeights. Manually inspecting the layout decisions made for these methods shows 3-opt making reasonable transformations, but the assertion newLayoutCost < currLayoutCost fails due to imprecision from summing large block weights. Having a backup check that the layout costs are within some epsilon seems like a reasonable fix.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs in-pr There is an active PR which will close this issue when it is merged JitStress CLR JIT issues involving JIT internal stress modes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants