Skip to content

[ci-scan] Test failure: Loader/classloader/regressions/InvalidFriendAssemblyName under R2R/crossgen2 #130569

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=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

Build Repository Test Pull Request
1512035 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511873 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511844 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511874 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511842 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511615 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511496 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll #129717
1511203 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll #119674
1510989 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1511202 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll #119674
1511200 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll #119674
1509858 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1509620 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1509610 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1509619 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1509609 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1509372 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1508395 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1508388 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1508674 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1507810 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1507628 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1507626 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1507586 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1507585 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1507404 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1506634 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505655 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505531 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505533 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505532 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505421 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505420 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505357 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505304 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505145 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505037 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1504997 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1505001 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1504999 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1504991 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1504989 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1504935 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
1504917 dotnet/runtime Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
11 44 44

Activity

  1. github-actions commented on Jul 12, 2026

    @github-actions
    ContributorAuthor

    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/InvalidFriendAssemblyName fails only on the R2R / crossgen2 legs (R2R_CG2, coreclr outerloop def 108):

    Assert.Throws() Failure: No exception was thrown
    Expected: typeof(System.IO.FileLoadException)
       at InvalidFriendAssemblyName.TestEntryPoint()
    

    The test declares an invalid friend reference (InternalsVisibleTo with both PublicKey and PublicKeyToken) and asserts that loading throws FileLoadException. 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

    Suggested reviewers / area contacts

    • Landed the friend-assembly error change: @elinor-fung.
    • Area owners (area-VM-coreclr): @agocke.

    A fix would likely restore the invalid-friend-assembly error surfacing on the crossgen2/R2R assembly-load path so the FileLoadException is thrown consistently with the JIT path.

    Generated by CI Outer-Loop Failure Fixer · 299.1 AIC · ⊞ 18K · ◷

  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 14, 2026
  3. added this to the 11.0.0 milestone on Jul 14, 2026
  4. added
    Priority:1Work that is critical for the release, but we could probably ship without
    on Jul 14, 2026
  5. VincentBu commented on Jul 15, 2026

    @VincentBu
    Contributor

    Failed in: runtime-coreclr r2r 20260713.1

    Failed tests:

    R2R-CG2 linux arm Checked @ (Debian.13.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-13-helix-arm32v7@sha256:cc5720152b9ddb1df305525253e31936794ffff0d440007bb170ec3bf6a5f7ae
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 linux arm Checked no_tiered_compilation @ (Debian.13.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-13-helix-arm32v7@sha256:cc5720152b9ddb1df305525253e31936794ffff0d440007bb170ec3bf6a5f7ae
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 linux arm64 Checked @ AzureLinux.3.Arm64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 linux arm64 Checked no_tiered_compilation @ AzureLinux.3.Arm64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 linux x64 Checked @ AzureLinux.3.Amd64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 linux x64 Checked no_tiered_compilation @ AzureLinux.3.Amd64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 windows x86 Checked @ Windows.10.Amd64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 windows x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 windows arm64 Checked @ Windows.11.Arm64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 windows arm64 Checked no_tiered_compilation @ Windows.11.Arm64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 windows x64 Checked @ Windows.10.Amd64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 windows x64 Checked no_tiered_compilation @ Windows.10.Amd64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 osx arm64 Checked @ OSX.26.Arm64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    R2R-CG2 osx arm64 Checked no_tiered_compilation @ OSX.26.Arm64.Open
    - Loader/classloader/regressions/InvalidFriendAssemblyName/InvalidFriendAssemblyName/InvalidFriendAssemblyName.dll
    
    

    Error message:

    Assert.Throws() Failure: No exception was thrown
    Expected: typeof(System.IO.FileLoadException)
    

    Stack trace:

       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()
       at Program.<<Main>$>g__TestExecutor86|0_87(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
    
  6. locked and limited conversation to collaborators on Aug 16, 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 ErrorUse this to report build issues in the .NET Helix tabPriority:1Work that is critical for the release, but we could probably ship withoutagentic-workflowsarea-ReadyToRunblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'blocking-clean-ci-optionalBlocking optional rolling runsblocking-outerloopBlocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions