Skip to content

Test failure: Interop Work Item throws System.IO.FileNotFoundException #134296

Description

@VincentBu

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1594299

Build error leg or test failing: Interop Work Item

Error Detail:

Unhandled exception. System.IO.FileNotFoundException: Could not find assembly 'TypeMapLib1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.
   at System.Reflection.TypeLoading.Ecma.EcmaResolver.ResolveAssembly(AssemblyReferenceHandle handle, EcmaModule module) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Ecma/EcmaResolver.cs:line 150
   at System.Reflection.TypeLoading.Ecma.EcmaResolver.ComputeTypeRefResolution(TypeReferenceHandle handle, EcmaModule module) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Ecma/EcmaResolver.cs:line 77
   at System.Reflection.TypeLoading.Ecma.EcmaModule.GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, Byte rawTypeKind) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Modules/Ecma/EcmaModule.TypeProvider.cs:line 20
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode) in /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/SignatureDecoder.cs:line 127
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeTypeSequence(BlobReader& blobReader) in /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/SignatureDecoder.cs:line 152
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode) in /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/SignatureDecoder.cs:line 115
   at System.Reflection.TypeLoading.Ecma.EcmaResolver.ResolveTypeDefRefOrSpec(EntityHandle handle, EcmaModule module, TypeContext& typeContext) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Ecma/EcmaResolver.cs:line 19
   at System.Reflection.TypeLoading.Ecma.EcmaCustomAttributeData.ComputeAttributeType() in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/Ecma/EcmaCustomAttributeData.cs:line 54
   at System.Reflection.TypeLoading.RoCustomAttributeData.get_AttributeType() in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/RoCustomAttributeData.cs:line 15
   at AssemblyChecker.AssemblyInspector.IsDebug(String path) in /_/src/coreclr/tools/AssemblyChecker/AssemblyInspector.cs:line 20
   at AssemblyChecker.Program.Main(String[] args) in /_/src/coreclr/tools/AssemblyChecker/Program.cs:line 84
[createdump] Gathering state for process 66735 
[createdump] Crashing thread d63ab signal 6 (0006)
[createdump] Writing crash report to file /cores/coredump.66735.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /cores/coredump.66735.dmp
[createdump] Written 749564024 bytes (182999 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 2674ms
waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Failed test: Interop Work Item",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1594299
Error message validated: [Failed test: Interop Work Item]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 9/20/2026 2:23:57 AM UTC

Report

Build Repository Test Pull Request
1594299 dotnet/runtime Interop.WorkItemExecution

Summary

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

Activity

  1. dotnet-policy-service commented on Sep 20, 2026

    @dotnet-policy-service
    Contributor

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

  2. steveisok commented on Sep 20, 2026

    @steveisok
    Member

    I traced this to a regression introduced by #133202.

    TypeMapLib1.dll is present beside TypeMapApp.dll in the Helix payload. The failure occurs because AssemblyChecker now uses MetadataLoadContext with a resolver that searches only the runtime directory, not the directory containing the inspected assembly. Resolving the TypeMap custom attributes therefore throws FileNotFoundException. This exact side-by-side dependency risk was identified during the review of #133202.

    The exception does not directly fail the test wrapper. Instead, every abort generates a large crash dump. Repeated invocations produce several gigabytes of dumps, eventually exhausting the worker's disk and preventing IL round-trip files and test results from being written. This also explains why some runs appear green despite containing the same exceptions and dump storm: those machines had enough free disk space.

    The fix should create a resolver for each inspected assembly that probes the assembly's directory before the runtime directory. A regression test should cover an assembly-level attribute whose type or generic argument is defined in an adjacent DLL.

    Note

    This analysis was generated with GitHub Copilot.

  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 22, 2026
  4. added this to the 12.0.0 milestone on Sep 22, 2026
  5. VincentBu commented on Sep 28, 2026

    @VincentBu
    ContributorAuthor

    Failed in: runtime-coreclr ilasm 20260926.1

    Failed tests:

    coreclr osx arm64 Checked ilasmroundtrip @ OSX.26.Arm64.Open
    - Interop Work Item
    coreclr osx x64 Checked ilasmroundtrip @ OSX.15.Amd64.Open
    - Interop/TypeMap/TypeMapApp/TypeMapApp.cmd
    

    Error message:

    Unhandled exception. System.IO.FileNotFoundException: Could not find assembly 'TypeMapLib1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.
       at System.Reflection.TypeLoading.Ecma.EcmaResolver.ResolveAssembly(AssemblyReferenceHandle handle, EcmaModule module) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Ecma/EcmaResolver.cs:line 150
       at System.Reflection.TypeLoading.Ecma.EcmaResolver.ComputeTypeRefResolution(TypeReferenceHandle handle, EcmaModule module) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Ecma/EcmaResolver.cs:line 77
       at System.Reflection.TypeLoading.Ecma.EcmaModule.GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, Byte rawTypeKind) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Modules/Ecma/EcmaModule.TypeProvider.cs:line 20
       at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode) in /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/SignatureDecoder.cs:line 127
       at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeTypeSequence(BlobReader& blobReader) in /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/SignatureDecoder.cs:line 152
       at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode) in /_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/SignatureDecoder.cs:line 115
       at System.Reflection.TypeLoading.Ecma.EcmaResolver.ResolveTypeDefRefOrSpec(EntityHandle handle, EcmaModule module, TypeContext& typeContext) in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Ecma/EcmaResolver.cs:line 19
       at System.Reflection.TypeLoading.Ecma.EcmaCustomAttributeData.ComputeAttributeType() in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/Ecma/EcmaCustomAttributeData.cs:line 54
       at System.Reflection.TypeLoading.RoCustomAttributeData.get_AttributeType() in /_/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/RoCustomAttributeData.cs:line 15
       at AssemblyChecker.AssemblyInspector.IsDebug(String path) in /_/src/coreclr/tools/AssemblyChecker/AssemblyInspector.cs:line 20
       at AssemblyChecker.Program.Main(String[] args) in /_/src/coreclr/tools/AssemblyChecker/Program.cs:line 84
    [createdump] Gathering state for process 38288 
    [createdump] Crashing thread be8aa signal 6 (0006)
    [createdump] Writing crash report to file /cores/coredump.38288.dmp.crashreport.json
    [createdump] Crash report successfully written
    [createdump] Writing minidump with heap to file /cores/coredump.38288.dmp
    [createdump] Written 311054456 bytes (18985 pages) to core file
    [createdump] Target process is alive
    [createdump] Dump successfully written in 868ms
    waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions