Skip to content

[ci-scan] Build break: crossgen2 TypeLoadException — generic type b27077 with explicit layout in ComputeInstanceLayout #133563

Closed as duplicate

Description

@github-actions

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1586689
Build error leg or test failing: runtime-coreclr crossgen2 outerloop R2R_CG2 legs - JIT/Regression (Regression_4, test b27077)

A crossgen2 (ReadyToRun) compilation abort: the compiler throws TypeLoadException for type Gen from assembly b27077 because a generic type declares explicit layout, hitting MetadataFieldLayoutAlgorithm.ComputeInstanceLayout during EnsureLoadableType. Reproduces on the crossgen2 outerloop Regression_4 work items across the source build 1586689 and its follow-up build 1588496.

KBE authoring guidance (ci-failure-scan)
  • Error Details is for readers. Paste the full exception, stack trace, or build error excerpt so the failure is understandable without opening the raw log.
  • Build Analysis parses only the single JSON block under Error Message.
  • ErrorMessage is a case-sensitive ordinal String.Contains substring copied verbatim from the failing log.
  • Set BuildRetry to true only for a clear infrastructure retry case. ExcludeConsoleLog disables Helix console-log scanning.

Error Details

Unhandled exception. Internal.TypeSystem.TypeSystemException+TypeLoadException: Failed to load type 'Gen' from assembly 'b27077' because generic types cannot have explicit layout
   at Internal.TypeSystem.ThrowHelper.ThrowTypeLoadException(ExceptionStringID, String, String) in /_/src/coreclr/tools/Common/TypeSystem/Common/ThrowHelper.cs:line 17
   at Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeInstanceLayout(DefType, InstanceLayoutKind) in /_/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs:line 27
   at Internal.TypeSystem.DefType.ComputeInstanceLayout(InstanceLayoutKind)
   at ILCompiler.CompilerTypeSystemContext.EnsureLoadableTypeUncached(TypeDesc)
   at ILCompiler.CompilerTypeSystemContext.EnsureLoadableMethod(MethodDesc)

Error Message

{
  "ErrorMessage": [
    "Failed to load type 'Gen' from assembly 'b27077' because generic types cannot have explicit layout",
    "Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeInstanceLayout(DefType, InstanceLayoutKind)"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}
Agentic workflow metadata (ci-failure-scan)

Workflow artifact: ci-failure-scan
Artifact kind: kbe-verification
Verified match count: 1 hits in failure.log


Filed by ci-failure-scan (detection only). ci-failure-fix walks open [ci-scan] KBEs and either opens a small fix PR or comments here to loop in owners — it never disables the test.

Note

This issue was generated by an AI agent (GitHub Copilot / ci-failure-scan).

Generated by CI Outer-Loop Failure Scanner · opus48 · 994.7 AIC · ⌖ 16 AIC · ⊞ 19.5K · ◷

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Activity

  1. added
    blocking-clean-ci
    Known Build Error
    on Sep 10, 2026
  2. added
    untriaged
    on Sep 10, 2026
  3. removed
    untriaged
    on Sep 10, 2026
  4. locked and limited conversation to collaborators on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build Erroragentic-workflowsblocking-clean-ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions