Skip to content

Investigate JIT assert 'block->HasFlag(BBF_RECURSIVE_TAILCALL)' during Morph - Inlining under PGO stress (no fix applied) - #133357

Draft
AndyAyersMS with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-jit-assert-failure
Draft

Investigate JIT assert 'block->HasFlag(BBF_RECURSIVE_TAILCALL)' during Morph - Inlining under PGO stress (no fix applied)#133357
AndyAyersMS with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-jit-assert-failure

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

CI reported a Checked-JIT assert (block->HasFlag(BBF_RECURSIVE_TAILCALL)) firing during "Morph - Inlining" under PGO stress, across multiple libraries-pgo work items with differing inlinee methods.

Investigation

  • Reproduced/analyzed the assert and traced both flag-setting call sites (impTransformDevirtualizedCall and the direct-call recursive-tailcall check in impImportCall) plus the IndirectCallTransformer GDV-expansion code.
  • Implemented an initial hypothesis (stale compCurBB/block after multi-block inlining splits in fgInline/fgInsertInlineeBlocks), then disproved it via a full Checked CoreCLR build + crossgen2-corelib compile: it introduced new, unrelated asserts. Fully reverted.
  • Confirmed JIT: Fix Crossgen2 assertion for non-inlineable tail-call GDV #133014 (merged before this issue's CI run) already fixed one variant of this bug, yet the failing build already includes that fix — there's a distinct, still-unfixed gap for the inlineable GDV-candidate case that PR's author flagged as needing further work.
  • Built and ran several targeted repros (self-recursive virtual calls, polymorphic base/derived recursion, interface-based devirtualization-to-recursive-target scenarios) against a real Checked JIT with DOTNET_JitRandomGuardedDevirtualization stress and full tiered PGO — none reproduced the assert against the unmodified baseline JIT.

Status

Root cause not conclusively identified within this session. No code change is included — the tree matches upstream main — since landing an unverified fix risks repeating the regression already caught and reverted during this investigation. Recommend obtaining a SuperPMI MC/mch replay of one of the actual failing inlinee methods (e.g. MethodSymbol:get_HasSetsRequiredMembers()) to get a deterministic, minimal repro before attempting another fix.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
16 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI changed the title [WIP] Fix JIT assert failure during Morph - Inlining under PGO stress Investigate JIT assert 'block->HasFlag(BBF_RECURSIVE_TAILCALL)' during Morph - Inlining under PGO stress (no fix applied) Sep 7, 2026
Copilot AI requested a review from AndyAyersMS September 7, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[ci-scan] Test failure: JIT assert 'block->HasFlag(BBF_RECURSIVE_TAILCALL)' during Morph - Inlining under PGO stress

2 participants