Skip to content

[ci-scan] Build break: ILLink IL1012 crash (RemoveSecurity ArgumentOutOfRangeException) trimming System.Text.Json.SourceGenerati [Content truncated due to length] #131122

Closed

Description

@github-actions

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

The threat detection results could not be parsed.

Review the workflow run logs for details.

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1515988
Build error leg or test failing: runtime-extra-platforms (def 154) — Build product on the mobile / NativeAOT legs (android-arm64 NativeAOT, iossimulator-x64 AllSubsets_NativeAOT, maccatalyst, tvos-arm64) — System.Text.Json.SourceGeneration.Roslyn4.4.Tests

Error Details

The ILLink trimming step crashes with an unhandled System.ArgumentOutOfRangeException inside Mono.Linker.Steps.RemoveSecurity.ProcessType while optimizing System.Text.Json.SourceGeneration.Roslyn4.4.Tests for size, failing the Build product task across every affected mobile / NativeAOT leg. The failure reproduces in source build 1515988 and its follow-up build 1516995, so it is a stable build break rather than infra noise. No existing Known Build Error or area-team tracker was found for this signature.

ILLink : error IL1012: IL Trimmer has encountered an unexpected error. Please report the issue at (aka.ms/redacted) [.../System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj::TargetFramework=net11.0]
  Fatal error in IL Linker
  Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
     at Mono.Collections.Generic.Collection`1..ctor(Int32 capacity)
     at Mono.Cecil.MemberDefinitionCollection`1..ctor(TypeDefinition container, Int32 capacity)
     at Mono.Cecil.MetadataReader.ReadFields(TypeDefinition type)
     at Mono.Cecil.TypeDefinition.get_Fields()
     at Mono.Linker.Steps.RemoveSecurity.ProcessType(TypeDefinition type) in /_/src/tools/illink/src/linker/Linker.Steps/RemoveSecurityStep.cs:line 31
     at Mono.Linker.Steps.RemoveSecurity.ProcessAssembly(AssemblyDefinition assembly, LinkContext context) in /_/src/tools/illink/src/linker/Linker.Steps/RemoveSecurityStep.cs:line 20
     at Mono.Linker.Steps.MarkStep.MarkAssembly(...) in /_/src/tools/illink/src/linker/Linker.Steps/MarkStep.cs:line 1500
     ...
error NETSDK1144: Optimizing assemblies for size failed.

Error Message

{
  "ErrorMessage": [
    "error IL1012: IL Trimmer has encountered an unexpected error",
    "Mono.Linker.Steps.RemoveSecurity.ProcessType(TypeDefinition type) in /_/src/tools/illink/src/linker/Linker.Steps/RemoveSecurityStep.cs"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

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

This issue was generated by the automated ci-failure-scan GitHub Copilot workflow.

Generated by CI Outer-Loop Failure Scanner · 537.2 AIC · ⊞ 19.5K · ◷

Report

Build Repository Step Name Console log Pull Request
1519091 dotnet/runtime Build product Log
1518977 dotnet/runtime Build product Log #124721

Summary

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

Activity

  1. added
    blocking-clean-ci
    Known Build Error
    on Jul 21, 2026
  2. added
    untriaged
    on Jul 21, 2026
  3. added
    area-Tools-ILLink
    on Jul 21, 2026
  4. dotnet-policy-service commented on Jul 21, 2026

    @dotnet-policy-service
    Contributor

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

  5. added this to the 11.0.0 milestone on Jul 21, 2026
  6. removed
    untriaged
    on Jul 22, 2026
  7. self-assigned this
    on Jul 22, 2026
  8. sbomer commented on Jul 22, 2026

    @sbomer
    Member

    This is caused by #94892 - the generated source for this test suite happens to have 65535 fields, with a fieldless final type, hitting the known ambiguity/gap in the spec. We can fix this in cecil, but need to reach agreement on how this should be represented by SRM first. Since the test failure is fixed in #131071 we can close this.

  9. locked and limited conversation to collaborators on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build Erroragentic-workflowsarea-Tools-ILLinkblocking-clean-ci

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions