Skip to content

TypeLoadException in Verify_Clone_Hash (IncrementalHashTests) on tvos_arm64 - missing SwiftSelf #126557

Closed

Description

@MatousBot

Suggested labels: Known Build Error, test-failure, os-tvos, arch-arm64, untriaged

Note: This issue was automatically generated by AI-Test-Triage. Please review and triage accordingly.

Build Information

Build: 20260401.5, 20260402.2

Build error leg or test failing: System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash, System.Security.Cryptography.Tests.WorkItemExecution

Affected CI jobs: build_tvos_arm64_Release_AllSubsets_CoreCLR

Causing Commit Range Information

Commit range: {TODO: Insert commit range or link to changes}

Summary

  • TypeLoadException thrown: Could not load 'System.Runtime.InteropServices.Swift.SwiftSelf' from System.Private.CoreLib during IncrementalHash.Clone
  • On tvos_arm64 (build_tvos_arm64_Release_AllSubsets_CoreCLR) running System.Security.Cryptography.Tests; test run fails with XHarness exit code 1 (TESTS_FAILED)
  • Failure originates in native interop: Interop.AppleCrypto.DigestClone -> LiteHash.Clone -> AppleDigestProvider.Clone -> IncrementalHash.Clone
  • Missing type reported from System.Private.CoreLib, Version=11.0.0.0 — suggests a runtime/assembly mismatch or absent Swift interop surface on this build

Failure Statistics

Note: These statistics are based on the configured time range and might not reflect the full history of the failure.

  • Occurrence Count: 6
  • First Failure: 2026-04-02 08:47:52 UTC
  • Last Failure: 2026-04-03 15:06:06 UTC

Work Items

Work Item Console Log Build Job Name
System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash
View Extract
[03:12:56.8352780] 	2026-04-02 00:12:56.914 System.Security.Cryptography.Tests[801:323467] 	[PASS] System.Security.Cryptography.Tests.IncrementalHashTests.AppendDataAfterHashClose
[03:12:56.8499710] 2026-04-02 00:12:56.928 System.Security.Cryptography.Tests[801:323467] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: Implementation { CanReuseTransform = True, CanTransformMultipleBlocks = True, Hash = null, HashSize = 128, InputBlockSize = 1, ··· }, hashAlgorithmName: MD5)
[03:12:56.8500250] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[03:12:56.8500550] 2026-04-02 00:12:56.928 System.Security.Cryptography.Tests[801:323467] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
[03:12:56.8500660] at System.Security.Cryptography.LiteHash.Clone()
[03:12:56.8500770] at System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
[03:12:56.8500880] at System.Security.Cryptography.IncrementalHash.Clone()
[03:12:56.8523480] 2026-04-02 00:12:56.928 System.Security.Cryptography.Tests[801:323467] at System.Security.Cryptography.Tests.IncrementalHashTests.VerifyCloneResult(HashAlgorithm reference, Func`1 originalFactory)
[03:12:56.8524040] at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[03:12:56.8545570] 2026-04-02 00:12:56.933 System.Security.Cryptography.Tests[801:323467] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: Implementation { CanReuseTransform = True, CanTransformMultipleBlocks = True, Hash = null, HashSize = 160, InputBlockSize = 1, ··· }, hashAlgorithmName: SHA1)
[03:12:56.8545820] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
Full Log
20260401.5 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.Security.Cryptography.Tests Work Item
View Extract
[03:22:53] dbug: [03:12:56.8352780] 	2026-04-02 00:12:56.914 System.Security.Cryptography.Tests[801:323467] 	[PASS] System.Security.Cryptography.Tests.IncrementalHashTests.AppendDataAfterHashClose
[03:22:53] dbug: [03:12:56.8499710] 2026-04-02 00:12:56.928 System.Security.Cryptography.Tests[801:323467] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: Implementation { CanReuseTransform = True, CanTransformMultipleBlocks = True, Hash = null, HashSize = 128, InputBlockSize = 1, ··· }, hashAlgorithmName: MD5)
[03:22:53] dbug: [03:12:56.8500250] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[03:22:53] dbug: [03:12:56.8500550] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
[03:22:53] dbug: [03:12:56.8500660] at System.Security.Cryptography.LiteHash.Clone()
[03:22:53] dbug: [03:12:56.8500770] at System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
[03:22:53] dbug: [03:12:56.8500880] at System.Security.Cryptography.IncrementalHash.Clone()
...
[03:22:53] dbug: Test run failed
[03:22:53] dbug: Found 1 new crash report(s)
[03:22:55] info: Application 'net.dot.System.Security.Cryptography.Tests' was uninstalled successfully
XHarness exit code: 1 (TESTS_FAILED)
[03:22:37] dbug: Process mlaunch exited with 137
Full Log
20260401.5 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash
View Extract
[07:09:53.9678780] 	Test collection for System.Security.Cryptography.Tests.IncrementalHashTests
[07:09:54.0036210] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: Implementation { ... }, hashAlgorithmName: MD5)
[07:09:54.0036890] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[07:09:54.0037030] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
[07:09:54.0037120] at System.Security.Cryptography.LiteHash.Clone()
[07:09:54.0037220] at System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
[07:09:54.0037310] at System.Security.Cryptography.IncrementalHash.Clone()
[07:09:54.0056400] at System.Security.Cryptography.Tests.IncrementalHashTests.VerifyCloneResult(HashAlgorithm reference, Func`1 originalFactory)
...
[07:09:54.0113530] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(..., hashAlgorithmName: SHA1)
[07:09:54.0114240] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[07:09:54.0152620] [FAIL] ... hashAlgorithmName: SHA256
[07:09:54.0195890] [FAIL] ... hashAlgorithmName: SHA384
[07:09:54.0239910] [FAIL] ... hashAlgorithmName: SHA512
Full Log
20260402.2 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.Security.Cryptography.Tests Work Item
View Extract
[07:19:54] dbug: [07:09:54.0036210] 	2026-04-03 04:09:54.038 System.Security.Cryptography.Tests[1122:562451] 	[FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: Implementation { CanReuseTransform = True, CanTransformMultipleBlocks = True, Hash = null, HashSize = 128, InputBlockSize = 1, ··· }, hashAlgorithmName: MD5)
[07:19:54] dbug: [07:09:54.0036890] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[07:19:54] dbug: [07:09:54.0037030] 2026-04-03 04:09:54.038 System.Security.Cryptography.Tests[1122:562451] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
[07:19:54] dbug: [07:09:54.0037120] at System.Security.Cryptography.LiteHash.Clone()
[07:19:54] dbug: [07:09:54.0037220] at System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
[07:19:54] dbug: [07:09:54.0037310] at System.Security.Cryptography.IncrementalHash.Clone()
...
XHarness exit code: 1 (TESTS_FAILED)
Full Log
20260402.2 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash
View Extract
[01:05:06] dbug: [00:56:18.5499990] 	2026-04-02 21:56:18.693 System.Security.Cryptography.Tests[3982:2757948] 	[FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: ..., hashAlgorithmName: MD5)
[01:05:06] dbug: [00:56:18.5500520] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[01:05:06] dbug: [00:56:18.5500770] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
[01:05:06] dbug: [00:56:18.5500880] at System.Security.Cryptography.LiteHash.Clone()
[01:05:06] dbug: [00:56:18.5500970] at System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
[01:05:06] dbug: [00:56:18.5501050] at System.Security.Cryptography.IncrementalHash.Clone()
[01:05:06] dbug: [00:56:18.5520460] 2026-04-02 21:56:18.693 System.Security.Cryptography.Tests[3982:2757948] at System.Security.Cryptography.Tests.IncrementalHashTests.VerifyCloneResult(HashAlgorithm reference, Func`1 originalFactory)
[01:05:06] dbug: [00:56:18.5520950] at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[01:05:06] dbug: [00:56:18.5542210] 2026-04-02 21:56:18.697 System.Security.Cryptography.Tests[3982:2757948] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(..., hashAlgorithmName: SHA1)
[01:05:06] dbug: [00:56:18.5542570] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[01:05:06] dbug: [00:56:18.5542700] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
Full Log
20260402.2 build_tvos_arm64_Release_AllSubsets_CoreCLR
System.Security.Cryptography.Tests Work Item
View Extract
[00:56:18.5266610] 	2026-04-02 21:56:18.669 System.Security.Cryptography.Tests[3982:2757948] 	[PASS] System.Security.Cryptography.X509Certificates.Tests.RevocationTests.AiaTests.EmptyAiaResponseIsIgnored
[00:56:18.5380570] 2026-04-02 21:56:18.681 System.Security.Cryptography.Tests[3982:2757948] [PASS] System.Security.Cryptography.Tests.IncrementalHashTests.AppendDataAfterHashClose
[00:56:18.5499990] 2026-04-02 21:56:18.693 System.Security.Cryptography.Tests[3982:2757948] [FAIL] System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash(referenceAlgorithm: Implementation { CanReuseTransform = True, CanTransformMultipleBlocks = True, Hash = null, HashSize = 128, InputBlockSize = 1, ··· }, hashAlgorithmName: MD5)
[00:56:18.5500520] System.TypeLoadException : Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf' from assembly 'System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
[00:56:18.5500770] at Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle ctx)
[00:56:18.5500880] at System.Security.Cryptography.LiteHash.Clone()
[00:56:18.5500970] at System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
[00:56:18.5501050] at System.Security.Cryptography.IncrementalHash.Clone()
...
[00:54:52.0000000] Detected test end tag in application's output
[01:04:52] dbug: Process mlaunch exited with 137
[01:04:59] dbug: Test run completed
XHarness exit code: 1 (TESTS_FAILED)
Full Log
20260402.2 build_tvos_arm64_Release_AllSubsets_CoreCLR

Error Message

{
  "ErrorMessage": "System.TypeLoadException : Could not load type \u0027System.Runtime.InteropServices.Swift.SwiftSelf\u0027 from assembly \u0027System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e\u0027.",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Build Definition Test Pull Request
1369438 dotnet/runtime System.Security.Cryptography.Tests.IncrementalHashTests.Verify_Clone_Hash

Summary

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

Activity

  1. added
    untriaged
    on Apr 5, 2026
  2. dotnet-policy-service commented on Apr 5, 2026

    @dotnet-policy-service
    Contributor

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

  3. added
    os-tvos
    Known Build Error
    on Apr 5, 2026
  4. dotnet-policy-service commented on Apr 5, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'os-tvos': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger
    See info in area-owners.md if you want to be subscribed.

  5. jkotas commented on Apr 6, 2026

    @jkotas
    Member

    "Could not load 'System.Runtime.InteropServices.Swift.SwiftSelf' from System.Private.CoreLib" suggests a problem with interop

  6. dotnet-policy-service commented on Apr 6, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/interop-contrib
    See info in area-owners.md if you want to be subscribed.

  7. vitek-karas commented on Apr 8, 2026

    @vitek-karas
    Member

    I dug through the preserved Helix data for this one and here is the current picture.

    Platform impact / where it fails vs passes

    • Fails on the physical-device tvOS CoreCLR leg: tvos-arm64 Release AllSubsets_CoreCLR
    • Passes on nearby Apple legs in the same time frame:
      • tvossimulator-arm64 Release AllSubsets_CoreCLR
      • iossimulator-arm64 Release AllSubsets_CoreCLR
      • tvos-arm64 Release AllSubsets_Mono

    The failing path is consistently:

    Interop.AppleCrypto.DigestClone(SafeDigestCtxHandle)
    -> System.Security.Cryptography.LiteHash.Clone()
    -> System.Security.Cryptography.HashProviderDispenser.AppleDigestProvider.Clone()
    -> System.Security.Cryptography.IncrementalHash.Clone()
    

    with:

    System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.Swift.SwiftSelf'
    from assembly 'System.Private.CoreLib'
    

    So this looks much more like a runtime/CoreCLR Apple interop regression than a test bug.

    Timeframe / first known occurrence

    • The AI-generated issue says first failure was seen on 20260401.5, but the same signature is already present in preserved data for 20260327.5 / build 1356164.
    • That build ran against main commit a416018d3be3ef4d1ce5465d4f218eb561e0a67c.
    • The nearby prior main build 20260326.2 / 1354325 does not show this tvOS CoreCLR System.Security.Cryptography.Tests failure.

    That gives a practical regression window of:

    • after 67495bce3f413302a4f47820c03d81b67897da7c
    • by a416018d3be3ef4d1ce5465d4f218eb561e0a67c

    Most likely culprit
    The strongest suspect in that window is:

    Reason: it touched CoreCLR's Swift type registration in src/coreclr/vm/corelib.h, specifically wrapping the SwiftSelf / SwiftError / SwiftIndirectResult class definitions in #ifdef TARGET_APPLE, which lines up unusually well with the exact runtime failure here (Could not load ... Swift.SwiftSelf).

    One caveat: 4c9414212e522a5e167068f55ab978a7049fb6f6 / #125950 (Revert "Disable iOS and tvOS jobs until infra issue is fixed") also landed in the same window and likely re-exposed the problem in CI by turning the Apple jobs back on. My current read is:

    1. [browser][coreCLR] no COM, no swift #125083 likely introduced the regression
    2. Revert "Disable iOS and tvOS jobs until infra issue is fixed" #125950 made it visible again in CI
  8. removed
    untriaged
    on Apr 9, 2026
  9. locked and limited conversation to collaborators on May 9, 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 Errorarch-arm64area-System.Runtime.InteropServicesos-tvostest-failure

Type

No type

Projects

  • Status
    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions