Repository navigation
[ci-scan] Test failure: Loader/classloader/regressions/InvalidFriendAssemblyName under R2R/crossgen2 #130569
Description
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1504535
Build error leg or test failing: coreclr Pri1 Runtime Tests Run R2R_CG2 (linux x64 / linux arm64 / linux_musl x64 / windows x64 / x86 / arm64) checked - Loader/classloader/regressions/InvalidFriendAssemblyName
The InvalidFriendAssemblyName loader regression test fails in the R2R / crossgen2 legs of runtime-coreclr outerloop (definition 108). The test expects a System.IO.FileLoadException to be thrown when an assembly declares an invalid friend reference, but under R2R/crossgen2 no exception is thrown, so Assert.Throws<FileLoadException> fails.
This began reproducing after PR #127180 ("Preserve invalid friend assembly error", merged 2026-07-10T21:13Z) changed the invalid-friend-assembly error behavior. Both the source build (finished 2026-07-11T14:31Z) and the follow-up build 1504742 (finished 2026-07-11T21:43Z) failed with this signature across multiple queues, so the failure reproduces well after that merge. Related: #127180.
Error Details
Running test: Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
Xunit.Sdk.ThrowsException: Assert.Throws() Failure: No exception was thrown
Expected: typeof(System.IO.FileLoadException)
at Xunit.Assert.ThrowsImpl(Type exceptionType, Exception exception, Func`2 inspector) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/ExceptionAsserts.cs:line 506
at Xunit.Assert.Throws[T](Func`1 testCode) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/ExceptionAsserts.cs:line 153
at InvalidFriendAssemblyName.TestEntryPoint()
Failed test: Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
Error Message
{
"ErrorMessage": [
"Assert.Throws() Failure: No exception was thrown",
"Expected: typeof(System.IO.FileLoadException)",
"at InvalidFriendAssemblyName.TestEntryPoint()"
],
"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 here to loop in owners — it never disables the test.
Note
This issue was generated by an AI/Copilot CI triage workflow.
Generated by CI Outer-Loop Failure Scanner · 529.2 AIC · ⊞ 19.5K · ◷
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 11 | 44 | 44 |
Activity
github-actions commentedon Jul 12, 2026
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.
Workflow artifact: ci-fix
Artifact kind: handoff
Linked KBE: #130569
Note
AI/Copilot-generated triage note (
ci-failure-fix). No automated code change was produced: this is a ReadyToRun/crossgen2 product behavior regression in the loader, which is outside small-fix bounds, so I am looping in owners rather than editing the test (updating the test to not expect the exception would mask a real behavior gap).Root cause (read-only analysis)
Loader/classloader/regressions/InvalidFriendAssemblyNamefails only on the R2R / crossgen2 legs (R2R_CG2, coreclr outerloop def 108):The test declares an invalid friend reference (
InternalsVisibleTowith both PublicKey and PublicKeyToken) and asserts that loading throwsFileLoadException. Under the JIT legs it throws as expected; under R2R/crossgen2 no exception is thrown, so the assert fails.This started reproducing right after #127180 ("Preserve invalid friend assembly error",
area-VM-coreclr, merged 2026-07-10T21:13Z) changed the invalid-friend-assembly error path to propagate the parse failure as an inner exception. The failure first appears on the source build finished 2026-07-11T14:31Z and repeats on follow-up build 1504742 across multiple R2R queues, so it reproduces stably after that merge. Two independent evidence points support the attribution: (a) first failure strictly follows that merge, and (b) the change touches exactly the invalid-friend-assembly error path this test exercises. The likely gap is that the new error-propagation path is not exercised the same way when the assembly is precompiled by crossgen2 (the friend-visibility check / error surfacing differs on the R2R load path).Evidence
src/tests/Loader/classloader/regressions/InvalidFriendAssemblyName.Suggested reviewers / area contacts
@elinor-fung.area-VM-coreclr):@agocke.A fix would likely restore the invalid-friend-assembly error surfacing on the crossgen2/R2R assembly-load path so the
FileLoadExceptionis thrown consistently with the JIT path.JulieLeeMSFT commentedon Jul 14, 2026
@jtschuster, PTAL. NEW mass failure across all crossgen2/r2r pipelines (esp. r2r-extra). (227 test(s) failed in 7 pipeline(s))
Failed in (7):
VincentBu commentedon Jul 15, 2026
Failed in: runtime-coreclr r2r 20260713.1
Failed tests:
Error message:
Stack trace:
Run InvalidFriendAssemblyName outside merged runner and disable in R2R (