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

JIT: Deep inlining of polymorphic recursion can cause hangs during JIT #90144

Closed
jakobbotsch opened this issue Aug 8, 2023 · 4 comments · Fixed by #90306
Closed

JIT: Deep inlining of polymorphic recursion can cause hangs during JIT #90144

jakobbotsch opened this issue Aug 8, 2023 · 4 comments · Fixed by #90306
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
Milestone

Comments

@jakobbotsch
Copy link
Member

jakobbotsch commented Aug 8, 2023

While investigating #88451 I noticed that another test in that test group fails often in jit_stress_random when the inliner ends up inlining a polymorphic recursive function. The test is this one and already seems to be a problem about hangs during inlining:

https://github.com/dotnet/runtime/blob/main/src/tests/JIT/Methodical/inlining/bug505642/test.cs

https://dev.azure.com/dnceng-public/public/_build/results?buildId=364925&view=ms.vss-test-web.build-test-results-tab is an example test run where this fails on multiple platforms:

set DOTNET_TieredCompilation=0
set DOTNET_JitStress=272
...
19:52:51.828 Running test: JIT/Methodical/inlining/bug505642/test_bug505642/test_bug505642.dll
App Exit Code: 259
Expected: 100
Actual: 259
END EXECUTION - FAILED
FAILED
[XUnitLogChecker]: 21:51:46.54: Could not read the file JIT\Methodical\Methodical_others\Methodical_others.testStats.csv. Retrying...

When I break we are usually inside resolveToken called from fgFindJumpTargets during inlining, printing some name on the EE side.

cc @AndyAyersMS, fallout from #88749? Perhaps we need to disallow recursive inlining if it makes the instantiation more complex.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 8, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 8, 2023
@ghost
Copy link

ghost commented Aug 8, 2023

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

Issue Details

While investigating #88451 I noticed that another test in that test group fails often in jit_stress_random when the inliner ends up inlining a polymorphic recursive function. The test is this one and already seems to be a problem about hangs during inlining:

https://github.com/dotnet/runtime/blob/main/src/tests/JIT/Methodical/inlining/bug505642/test.cs

https://dev.azure.com/dnceng-public/public/_build/results?buildId=364925&view=ms.vss-test-web.build-test-results-tab is an example test run where this fails on multiple platforms:

set DOTNET_TieredCompilation=0
set DOTNET_JitStress=272
...
19:52:51.828 Running test: JIT/Methodical/inlining/bug505642/test_bug505642/test_bug505642.dll
App Exit Code: 259
Expected: 100
Actual: 259
END EXECUTION - FAILED
FAILED
[XUnitLogChecker]: 21:51:46.54: Could not read the file JIT\Methodical\Methodical_others\Methodical_others.testStats.csv. Retrying...

When I break we are usually inside resolveToken called from fgFindJumpTargets during inlining, printing some name on the EE side.

cc @AndyAyersMS, fallout from #88749? Perhaps we need to disallow recursive inlining it makes the instantiation more complex.

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

jakobbotsch commented Aug 8, 2023

I have added some code in fgCheckInlineDepthAndRecursion to print the complexity (number of classes in the instantiation) of each inlinee and I see:

fgInlineAppendStatements: no gc ref inline locals.
Successfully inlined Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`--------------------------------------------------------------------------------------------
INLINER: during 'fgInline' result 'success' reason 'below ALWAYS_INLINE size' for 'M:meth[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]](int,Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]):Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]' calling 'Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]INLINER: during 'fgInline' result 'success' reason 'below ALWAYS_INLINE size'
Expanding INLINE_CANDIDATE in statement STMT00069 in BB27:
STMT00069 ( INL12 @ 0x010[--] ... ??? ) <- INL10 @ 0x010[--] <- INL08 @ 0x010[--] <- INL06 @ 0x010[--] <- INL04 @ 0x010[--] <- INL02 @ 0x010[--] <- INLRT @ 0x010[--]
               [000241] I-C-G------                         ▌  CALL      void   M:meth[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]],Tuple`2[Tuple`2[Tuple`2[int,int],Tuple`2[int,int]],Tuple`2[Tuple`2[int,int],Tuple`2[int,int]]]],Tuple`2[Tuple`2[Tuple`2[Tuple`2[int,int],Tu (exactContextHnd=0x00007FF8148E3CF8)
               [000244] ----------- retbuf                  ├──▌  LCL_ADDR  byref  V35 tmp32        [+0]
               [000233] ----------- arg1                    ├──▌  SUB       int   
               [000231] -----------                           ├──▌  LCL_VAR   int    V32 tmp29        
               [000232] -----------                           └──▌  CNS_INT   int    1
               [000240] ----------- arg2                    └──▌  LCL_VAR   struct<Tuple`2, 16384> V34 tmp31        

Recursive inline. Ancestor complexity: 4095. New complexity: 8191
Recursive inline. Ancestor complexity: 2047. New complexity: 8191
Recursive inline. Ancestor complexity: 1023. New complexity: 8191
Recursive inline. Ancestor complexity: 511. New complexity: 8191
Recursive inline. Ancestor complexity: 255. New complexity: 8191
Recursive inline. Ancestor complexity: 127. New complexity: 8191
Recursive inline. Ancestor complexity: 63. New complexity: 8191

which indicates that the inline candidate already has 7 parents in the inline tree, but it seems to continue trying to inline.

@jakobbotsch
Copy link
Member Author

This example repros the issue without any jit stress:

using System;
using System.Runtime.CompilerServices;

public class Program
{
    [MethodImpl(MethodImplOptions.NoOptimization)]
    public static int Main()
    {
        return Foo(8, 100);
    }

    private static T Foo<T>(int v, T x)
    {
        return (v >= 0) ? Foo(v - 1, (x, x)).Item1 : x;
    }
}

It hangs under DOTNET_TieredCompilation=0 (with checked builds, at least).

@JulieLeeMSFT JulieLeeMSFT added this to the 8.0.0 milestone Aug 8, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Aug 8, 2023
@BruceForstall
Copy link
Member

This is failing all over the jitstress pipeline:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=367750&view=results

@BruceForstall BruceForstall added the blocking-clean-ci-optional Blocking optional rolling runs label Aug 9, 2023
jakobbotsch added a commit to jakobbotsch/runtime that referenced this issue Aug 10, 2023
…ecursive methods

The inliner heuristics do not take into account that inlining methods
causes type/method loading of the generic context. After dotnet#88749 this can
quickly cause significant resources to be consumed as part of inlining
when polymorphic recursion is involved (the blow-up can be exponential,
as we see in the failing test under jitstress).

This PR adds another safe-guard to the recursive inlining check in terms
of a complexity limit on the generic context of the inline candidate.

Fix dotnet#90144
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 10, 2023
jakobbotsch added a commit that referenced this issue Aug 12, 2023
…ecursive methods (#90306)

The inliner heuristics do not take into account that inlining methods
causes type/method loading of the generic context. After #88749 this can
quickly cause significant resources to be consumed as part of inlining
when polymorphic recursion is involved (the blow-up can be exponential,
as we see in the failing test under jitstress).

This PR adds another safe-guard to the recursive inlining check in terms
of a complexity limit on the generic context of the inline candidate.

Fix #90144
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 12, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 11, 2023
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
Projects
None yet
3 participants