Skip to content

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

@jakobbotsch

Description

@jakobbotsch

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.

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runs

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions