Description
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1427615
Build error leg or test failing: iossimulator-arm64 Release AllSubsets_CoreCLR - Microsoft.Extensions.Hosting.Unit.Tests
Error Details
Multiple HostTests tests fail on iossimulator-arm64 with System.IndexOutOfRangeException in Castle.DynamicProxy.Generators.MethodWithInvocationGenerator.BuildProxiedMethodBody. This is a Moq/Castle.DynamicProxy code-generation issue specific to the iOS simulator CoreCLR environment.
Failing tests:
Microsoft.Extensions.Hosting.Internal.HostTests.Dispose_DisposesHostConfigurationProvidersMicrosoft.Extensions.Hosting.Internal.HostTests.HostStopAsyncCanBeCancelledEarlyMicrosoft.Extensions.Hosting.Internal.HostTests.DisposeAsync_DisposesAppConfigurationProvidersMicrosoft.Extensions.Hosting.Internal.HostTests.DisposeAsync_DisposesHostConfigurationProvidersMicrosoft.Extensions.Hosting.Internal.HostTests.HostStopAsyncUsesDefaultTimeoutIfGivenTokenDoesNotFireMicrosoft.Extensions.Hosting.Internal.HostTests.Dispose_DisposesAppConfigurationProvidersMicrosoft.Extensions.Hosting.Internal.HostTests.WebHostStopAsyncUsesDefaultTimeoutIfNoTokenProvided
[FAIL] Microsoft.Extensions.Hosting.Internal.HostTests.Dispose_DisposesHostConfigurationProviders
System.IndexOutOfRangeException : Index was outside the bounds of the array.
at Castle.DynamicProxy.Generators.MethodWithInvocationGenerator.BuildProxiedMethodBody(MethodEmitter emitter, ClassEmitter class, INamingScope namingScope)
at Castle.DynamicProxy.Generators.MethodGenerator.Generate(ClassEmitter class, INamingScope namingScope)
Affected legs:
- runtime-extra-platforms (def 154): iossimulator-arm64 Release AllSubsets_CoreCLR
First build it occurred: 1425947 (2026-05-19). 2 occurrences in scanned window (builds 1425947 and 1427615).
Error Message
{
"ErrorMessage": ["HostTests", "System.IndexOutOfRangeException : Index was outside the bounds of the array."],
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}Note
🔒 Integrity filter blocked 1 item
The following item was blocked because it doesn't meet the GitHub integrity level.
- #125825
search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
To allow these resources, lower min-integrity in your GitHub frontmatter:
tools:
github:
min-integrity: approved # merged | approved | unapproved | noneGenerated by CI Outer-Loop Failure Scanner · ● 22.5M · ◷
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 0 | 0 | 0 |
Activity
dotnet-policy-service commentedon May 20, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.
Skip HostTests Moq tests on iossimulator (refs #128405)
[ci-scan] Skip HostTests Moq tests on iossimulator (refs #128405) (#1…
Skip HostTests Moq tests on iossimulator (refs dotnet#128405)
github-actions commentedon Jun 14, 2026
Workflow artifact: ci-fix
Artifact kind: handoff
Linked KBE: #128405
Note
AI/Copilot-generated triage note.
This Known Build Error has no producible automated code change (reason: JIT/GC codegen — must not be auto-fixed), so I could not open even a best-effort PR. Looping in owners so it can be fixed forward rather than muted.
Root cause (best analysis)
HostTests.Dispose_DisposesHostConfigurationProviders(and several sibling HostTests) fail on iossimulator-arm64 AllSubsets_CoreCLR withSystem.IndexOutOfRangeExceptionoriginating inCastle.DynamicProxy.Generators.MethodWithInvocationGenerator.BuildProxiedMethodBody.The failing log line:
Source location: The crash is in Castle.DynamicProxy (Moq dependency), not in dotnet/runtime product code. Castle.DynamicProxy emits IL at runtime to create mock proxies. The
IndexOutOfRangeExceptioninBuildProxiedMethodBodyindicates that the CoreCLR interpreter on iOS simulator does not handle some aspect of Castle.DynamicProxy's IL generation correctly — likely a metadata token resolution or method signature indexing difference under the interpreter compared to the full JIT.This failure is specific to the CoreCLR interpreter path on iOS simulator (
area-CodeGen-Interpreter-coreclr). No fix can be produced by this automated workflow because it requires understanding and fixing the interpreter's handling of dynamically emitted IL.Evidence
Suggested reviewers / area contacts
area-CodeGen-Interpreter-coreclr):@JulieLeeMSFT,@BrzVlad,@janvorli@dotnet/jit-contribA fix would likely involve investigating how the CoreCLR interpreter handles Castle.DynamicProxy's dynamically emitted IL (specifically the method signature metadata that
BuildProxiedMethodBodyindexes into), or determining whether these Moq-dependent tests should not run under the interpreter configuration.[ci-scan] Skip HostTests Moq tests on iossimulator (refs #128405) (#1…
jeffschwMSFT commentedon Jul 15, 2026
removing blocking-clean-ci as it has not failed in 30 days
github-actions commentedon Jul 28, 2026
Workflow artifact: ci-fix
Artifact kind: handoff
Linked KBE: #128405
Note
AI/Copilot-generated triage note.
This Known Build Error has no producible automated code change (reason: interpreter/codegen bug in the CoreCLR interpreter surfaced through Reflection.Emit — must not be auto-fixed), so I could not open a best-effort PR. Looping in owners to fix forward rather than mute. An earlier automated attempt to skip these tests (PR #128469) was closed without merge, so a mute is not the desired outcome.
Root cause (best analysis)
Microsoft.Extensions.HostingHostTests(which use Moq/Castle.DynamicProxy) fail on iossimulator-arm64 Release AllSubsets_CoreCLR with:The failure is Castle.DynamicProxy emitting IL via Reflection.Emit and hitting an out-of-bounds index only under the iOS-simulator CoreCLR (interpreter) environment. This points at a Reflection.Emit / interpreter-mode code-generation defect on that configuration rather than a bug in the Hosting tests themselves. A safe fix requires interpreter/Reflection.Emit owner investigation, which is outside the automated small-fix bounds.
Evidence
Suggested reviewers / area contacts
area-CodeGen-Interpreter-coreclr):@BrzVlad,@janvorliA fix likely involves diagnosing the Reflection.Emit / interpreter code path that produces the out-of-bounds index when Castle.DynamicProxy generates proxy method bodies on iOS-simulator CoreCLR.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.
Enable Moq HostTests on ios (#131919)
Enable Moq HostTests on ios (dotnet#131919)
Fix agentic workflow markers removed from safe outputs (#132011)