Skip to content

[ci-scan] Build break: Crossgen2 TypeLoadException 'Gen' from assembly 'b27077' generic explicit layout #133302

Closed

Description

@github-actions

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1582971
Build error leg or test failing: runtime-coreclr crossgen2 outerloop (definition 134) — R2R_CG2 Regression_4 leg. Crossgen2 aborts compiling test assembly b27077.

Pipeline: runtime-coreclr crossgen2 outerloop (definition 134), branch main. When Crossgen2 lays out the exception-info lookup table for assembly b27077, it throws a TypeLoadException: the type Gen is a generic type declared with explicit layout, which is invalid. Crossgen2 exits -1073740791 and the R2R_CG2 work item fails. This is a compile-time crossgen2 break, distinct from the runtime failures tracked elsewhere. Reproduces across source build 1582971 and follow-up build 1584221.

Error Details

Unhandled exception. Internal.TypeSystem.TypeSystemException+TypeLoadException: Failed to load type 'Gen' from assembly 'b27077' because generic types cannot have explicit layout
   at ILCompiler.DependencyAnalysis.ReadyToRun.ExceptionInfoLookupTableNode.LayoutMethodsWithEHInfo() in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs:line 95
   at ILCompiler.DependencyAnalysis.ReadyToRun.ExceptionInfoLookupTableNode.ShouldSkipEmittingObjectNode(NodeFactory) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs:line 154
Crossgen2 failed with exitcode - -1073740791

Error Message

{
  "ErrorMessage": "Failed to load type 'Gen' from assembly 'b27077' because generic types cannot have explicit layout",
  "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
First build it occurred: 1582971
Related: #133216 (distinct Crossgen2 TypeLoadException on 'Negative002' / 'format is invalid')

Duplicate search

Searched open/closed Known Build Error issues and merged PRs for the Gen/b27077/explicit layout signature. Open #133216 tracks a distinct Crossgen2 TypeLoadException (Negative002, format is invalid); Build Analysis matches on the verbatim substring, so this explicit layout signature is filed separately. No fix PR has merged after the source build.


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

Note

Generated by the CI Outer-Loop Failure Scanner agentic workflow (AI-generated content).

Generated by CI Outer-Loop Failure Scanner · opus48 · 457.6 AIC · ⌖ 13 AIC · ⊞ 20.7K · ◷

Report

Build Repository Test Pull Request
1592131 dotnet/runtime Regression_4.WorkItemExecution
1590362 dotnet/runtime Regression_4.WorkItemExecution

Summary

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

Activity

  1. dotnet-policy-service commented on Sep 8, 2026

    @dotnet-policy-service
    Contributor

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

  2. VincentBu commented on Sep 10, 2026

    @VincentBu
    Contributor

    Failed in: runtime-coreclr outerloop 20260909.9

    Failed tests:

    R2R-CG2 linux x64 Checked no_tiered_compilation @ AzureLinux.3.Amd64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux x64 Checked @ AzureLinux.3.Amd64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 osx x64 Checked no_tiered_compilation @ OSX.15.Amd64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 osx x64 Checked @ OSX.15.Amd64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux x64 Checked @ (Alpine.324.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:alpine-3.24-helix-amd64@sha256:27b4b25f2c1dde8d0349818f8a93adc8e797cd1fb5f0cbac07089c25abdce49d
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux x64 Checked no_tiered_compilation @ (Alpine.324.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:alpine-3.24-helix-amd64@sha256:27b4b25f2c1dde8d0349818f8a93adc8e797cd1fb5f0cbac07089c25abdce49d
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 windows x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 windows x64 Checked @ Windows.Amd64.Open.rt
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 windows x64 Checked no_tiered_compilation @ Windows.Amd64.Open.rt
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 windows x86 Checked @ Windows.10.Amd64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux arm64 Checked no_tiered_compilation @ (Alpine.324.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:alpine-3.24-helix-arm64v8@sha256:7229985457fd1fb60afe60d1550bc9ccf93c5d54d3429aba079f4de6a7ffe7cf
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux arm64 Checked @ (Alpine.324.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:alpine-3.24-helix-arm64v8@sha256:7229985457fd1fb60afe60d1550bc9ccf93c5d54d3429aba079f4de6a7ffe7cf
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux arm64 Checked @ AzureLinux.3.Arm64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 linux arm64 Checked no_tiered_compilation @ AzureLinux.3.Arm64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 windows arm64 Checked @ Windows.11.Arm64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    R2R-CG2 windows arm64 Checked no_tiered_compilation @ Windows.11.Arm64.Open
    - LoaderClassloaderGenerics.WorkItemExecution
    
    

    Error message:

    Unhandled exception. Internal.TypeSystem.TypeSystemException+TypeLoadException: Failed to load type 'Gen`1<System.__Canon>' from assembly 'Negative002' because the format is invalid
       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 78
       at Internal.TypeSystem.DefType.ComputeInstanceLayout(InstanceLayoutKind) in /_/src/coreclr/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs:line 505
       at ILCompiler.CompilerTypeSystemContext.EnsureLoadableTypeUncached(TypeDesc) in /_/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs:line 371
       at ILCompiler.CompilerTypeSystemContext.EnsureLoadableType(TypeDesc) in /_/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs:line 83
       at ILCompiler.CompilerTypeSystemContext.EnsureLoadableMethod(MethodDesc) in /_/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs:line 230
       at ILCompiler.DependencyAnalysis.ReadyToRun.MethodFixupSignature..ctor(ReadyToRunFixupKind, MethodWithToken, Boolean) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodFixupSignature.cs:line 37
       at ILCompiler.DependencyAnalysis.NodeFactory.<>c.<CreateNodeCaches>b__63_15(NodeFactory.MethodFixupKey) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs:line 485
       at ILCompiler.DependencyAnalysis.NodeFactory.CreateMethodEntrypoint(TypeAndMethod) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs:line 673
       at ILCompiler.DependencyAnalysis.NodeFactory.<EnumerateCompiledMethods>d__106.MoveNext() in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs:line 707
       at ILCompiler.DependencyAnalysis.ReadyToRun.ExceptionInfoLookupTableNode.LayoutMethodsWithEHInfo() in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs:line 95
       at ILCompiler.DependencyAnalysis.ReadyToRun.ExceptionInfoLookupTableNode.ShouldSkipEmittingObjectNode(NodeFactory) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ExceptionInfoLookupTableNode.cs:line 154
       at ILCompiler.DependencyAnalysis.ReadyToRun.ReadyToRunHeaderNode.GetData(NodeFactory, Boolean) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ReadyToRunHeaderNode.cs:line 184
       at ILCompiler.ObjectWriter.ObjectWriter.EmitObject(Stream, IReadOnlyCollection`1, IObjectDumper, Logger) in /_/src/coreclr/tools/Common/Compiler/ObjectWriter/ObjectWriter.cs:line 391
       at ILCompiler.DependencyAnalysis.ReadyToRunObjectWriter.EmitReadyToRunObjects(ReadyToRunContainerFormat, Logger) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.cs:line 197
       at ILCompiler.ReadyToRunCodegenCompilation.Compile(String) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 447
       at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 728
       at ILCompiler.Program.Run() in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 343
       at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass228_0.<.ctor>b__0(ParseResult) in /_/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs:line 287
       at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult) in /_/src/command-line-api/src/System.CommandLine/Invocation/InvocationPipeline.cs:line 127
       at ILCompiler.Program.Main(String[] args) in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 1009
    DOTNET_DbgEnableMiniDump is set and the createdump binary does not exist: /root/helix/work/correlation/crossgen2/createdump
    Loader/classloader/generics/LoaderClassloaderGenerics/LoaderClassloaderGenerics.sh: line 258:  1603 Aborted                    (core dumped) $__Command
    02:20:49
    Crossgen2 failed with exitcode: 134
    
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 10, 2026
  4. locked and limited conversation to collaborators on Oct 12, 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

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions