Skip to content

Disable Crossgen2 Json CG2 composite job#2177

Merged
LoopedBard3 merged 1 commit into
aspnet:mainfrom
LoopedBard3:loopedbard3/disable-crossgen-cg2-composite
Jun 4, 2026
Merged

Disable Crossgen2 Json CG2 composite job#2177
LoopedBard3 merged 1 commit into
aspnet:mainfrom
LoopedBard3:loopedbard3/disable-crossgen-cg2-composite

Conversation

@LoopedBard3

Copy link
Copy Markdown
Contributor

Disables the CG2 composite profile in build/crossgen2-scenarios.yml (used by both benchmarks-ci-01 and benchmarks-ci-02) by flipping its condition to 'false', matching the pattern already used for the CG2 composite avx2 profile.

Why

The Json CG2 composite job has been consistently failing during the crossgen2 composite publish step with:

error : Unhandled exception. ILCompiler.CodeGenerationFailedException: Code generation failed for method
        'Async variant: [Microsoft.AspNetCore.Components.Server]
         Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSDataStream.CompletePipeAndDisposeStream(Exception)'
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at Internal.IL.Stubs.ILStubMethodIL.GetObject(...)
    at Internal.JitInterface.CorInfoImpl.HandleToModuleToken(...)
    at Internal.JitInterface.CorInfoImpl.ComputeMethodWithToken(...)
    at Internal.JitInterface.CorInfoImpl.getCallInfo(...)
    ...
error NETSDK1096: Optimizing assemblies for performance failed. ...

On the Windows leg this has additionally caused crank to hang/get stuck, which then prevents all of the remaining jobs in the pipeline from running. Disabling the profile keeps the rest of the crossgen2 scenarios (Default, CG2 non-composite) running while we wait for the underlying crossgen2 issue to be resolved.

Scope

  • Only the CG2 composite profile entry under the shared crossgen2-scenarios.yml template is changed; both benchmarks-ci-01.yml and benchmarks-ci-02.yml consume this template, so the job is disabled in both pipelines with a single change.
  • Default, CG2 non-composite, and the already-disabled CG2 composite avx2 profiles are unchanged.

Marking as draft for review.

The CG2 composite profile for the Json crossgen2 scenario consistently hits ILCompiler.CodeGenerationFailedException (IndexOutOfRangeException in CorInfoImpl.HandleToModuleToken) during publish, and on Windows runs has caused crank to hang, blocking the rest of the jobs in benchmarks-ci-01 and benchmarks-ci-02. Disable it via its condition until the underlying crossgen2 issue is resolved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR disables the CG2 composite crossgen2 profile in the shared build/crossgen2-scenarios.yml template to prevent recurring crossgen2 composite publish failures (and associated Windows crank hangs) from blocking the rest of the CI pipeline.

Changes:

  • Disabled the CG2 composite profile by setting its condition to 'false'.
  • Added inline documentation explaining why the profile is disabled (failure + pipeline impact).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +38
# Disabled: consistently fails with ILCompiler.CodeGenerationFailedException (IndexOutOfRangeException
# in CorInfoImpl.HandleToModuleToken) during the crossgen2 composite publish, and on Windows runs has
# caused crank to hang, blocking the rest of the jobs in the pipeline.
@LoopedBard3 LoopedBard3 merged commit 1b82250 into aspnet:main Jun 4, 2026
2 checks passed
@LoopedBard3 LoopedBard3 deleted the loopedbard3/disable-crossgen-cg2-composite branch June 4, 2026 19:56
DrewScoggins added a commit to DrewScoggins/Benchmarks that referenced this pull request Jun 9, 2026
These scenarios all hang/crash in crossgen2 with IndexOutOfRangeException on
.NET 11 preview SDKs that predate dotnet/runtime#129053 ("Fix composite R2R
token corruption for devirtualized async-variant callees", merged 2026-06-06).
The repro hits Kestrel's Http1ChunkedEncodingMessageBody.PumpAsync during
composite R2R compilation; crossgen2 then fails to terminate, causing the
crank-agent 10-minute build timeout we saw on 2026-06-08.

build/singlefile-scenarios.yml: add per-mode `condition` field (threaded
  into the crank job condition) and set 'false' for Single-file, Trimmed,
  R2RComposite-Windows, R2RComposite-Linux.
build/crossgen2-scenarios.yml: enrich the existing disable note on
  "CG2 composite" / "CG2 composite avx2" (already disabled by aspnet#2177) with
  a pointer to the upstream runtime fix.
build/nativeaot-scenarios.yml: set condition to 'false' on the three
  Goldilocks "Trim R2R SingleFile" jobs (Stage1, Stage2, gRPC Stage1).

Self-contained, AOT, non-composite R2R, and all NativeAOT scenarios remain
enabled - the bug is composite-R2R-specific.

Re-enable once the runtime fix flows into the .NET 11 SDK consumed by the
benchmark agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DrewScoggins added a commit that referenced this pull request Jun 9, 2026
These scenarios all hang/crash in crossgen2 with IndexOutOfRangeException on
.NET 11 preview SDKs that predate dotnet/runtime#129053 ("Fix composite R2R
token corruption for devirtualized async-variant callees", merged 2026-06-06).
The repro hits Kestrel's Http1ChunkedEncodingMessageBody.PumpAsync during
composite R2R compilation; crossgen2 then fails to terminate, causing the
crank-agent 10-minute build timeout we saw on 2026-06-08.

build/singlefile-scenarios.yml: add per-mode `condition` field (threaded
  into the crank job condition) and set 'false' for Single-file, Trimmed,
  R2RComposite-Windows, R2RComposite-Linux.
build/crossgen2-scenarios.yml: enrich the existing disable note on
  "CG2 composite" / "CG2 composite avx2" (already disabled by #2177) with
  a pointer to the upstream runtime fix.
build/nativeaot-scenarios.yml: set condition to 'false' on the three
  Goldilocks "Trim R2R SingleFile" jobs (Stage1, Stage2, gRPC Stage1).

Self-contained, AOT, non-composite R2R, and all NativeAOT scenarios remain
enabled - the bug is composite-R2R-specific.

Re-enable once the runtime fix flows into the .NET 11 SDK consumed by the
benchmark agents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants