Skip to content

System.Security.Cryptography.Tests crashing with "Fatal error." #119313

@MichalStrehovsky

Description

@MichalStrehovsky
C:\h\w\B9000A04\w\AEE70994\e>"C:\h\w\B9000A04\p\dotnet.exe" exec --runtimeconfig System.Security.Cryptography.Tests.runtimeconfig.json --depsfile System.Security.Cryptography.Tests.deps.json xunit.console.dll System.Security.Cryptography.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Security.Cryptography.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Security.Cryptography.Tests (found 5054 of 5622 test cases)
  Starting:    System.Security.Cryptography.Tests (parallel test collections = on [4 threads], stop on fail = off)
    System.Security.Cryptography.X509Certificates.Tests.CertTests.PrivateKey_FromCertificate_CanExportPrivate_SlhDsa [SKIP]
      Condition(s) not met: "IsSupported"
    System.Security.Cryptography.EcDsa.Tests.ECDsaTests_TrySpan.ValidateNistP521Sha3_512 [SKIP]
      Condition(s) not met: "SupportsSha3"
    System.Security.Cryptography.EcDsa.Tests.ECDsaTests_TrySpan.ValidateNistP256Sha3_256 [SKIP]
      Condition(s) not met: "SupportsSha3"
    System.Security.Cryptography.EcDsa.Tests.ECDsaTests_TrySpan.ValidateNistP384Sha3_384 [SKIP]
      Condition(s) not met: "SupportsSha3"
Fatal error.
0xC0000005
   at Interop+Crypt32.<CertGetCertificateContextProperty>g____PInvoke|33_0(IntPtr, CertContextPropId, Byte*, Int32*)
   at Interop+Crypt32.CertGetCertificateContextProperty(Microsoft.Win32.SafeHandles.SafeCertContextHandle, CertContextPropId, Byte[], Int32 ByRef)
   at Microsoft.Win32.SafeHandles.SafeCertContextHandle.CertHasProperty(CertContextPropId)
   at Microsoft.Win32.SafeHandles.SafeCertContextHandle.get_HasPersistedPrivateKey()
   at System.Security.Cryptography.X509Certificates.CertificateHelpers.TryAcquireCngPrivateKey(Microsoft.Win32.SafeHandles.SafeCertContextHandle, System.Security.Cryptography.CngKeyHandleOpenOptions ByRef)
   at System.Security.Cryptography.X509Certificates.CertificateHelpers.GetPrivateKey[[System.__Canon, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Security.Cryptography.X509Certificates.CertificatePal, System.Func`2<System.Security.Cryptography.CspParameters,System.__Canon>, System.Func`2<System.Security.Cryptography.CngKey,System.__Canon>)
   at System.Security.Cryptography.X509Certificates.CertificatePal.GetPrivateKey[[System.__Canon, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Func`2<System.Security.Cryptography.CspParameters,System.__Canon>, System.Func`2<System.Security.Cryptography.CngKey,System.__Canon>)
   at System.Security.Cryptography.X509Certificates.CertificatePal.GetRSAPrivateKey()
   at System.Security.Cryptography.X509Certificates.CertificateExtensionsCommon.GetPrivateKey[[System.__Canon, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Security.Cryptography.X509Certificates.X509Certificate2, System.Predicate`1<System.Security.Cryptography.X509Certificates.X509Certificate2>)
   at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.GetRSAPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2)
   at System.Security.Cryptography.X509Certificates.Tests.CertTests+<>c.<RaceDisposeAndKeyAccess>b__15_1(System.Object)
   at System.Threading.Thread.StartCallback()
----- end Wed 09/03/2025  6:44:38.17 ----- exit code -1073741819 ----------------------------------------------------------

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1137919
Build error leg or test failing: System.Security.Cryptography.Tests.WorkItemExecution
Pull request: #119267

Error Message

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

{
  "ErrorMessage": ["System.Security.Cryptography.Tests", "Fatal error."],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1137919
Error message validated: [System.Security.Cryptography.Tests Fatal error.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 9/3/2025 1:11:42 PM UTC

Report

Build Definition Test Pull Request
1138422 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution
1137919 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution #119267

Summary

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions