dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.27k stars 4.73k forks source link

Failed test System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey_2048 #61905

Closed VincentBu closed 2 years ago

VincentBu commented 2 years ago

Run: runtime-coreclr libraries-jitstressregs 20211121.1

Failed test:

net7.0-windows-Release-x86-CoreCLR_checked-jitstressregs0x10-Windows.10.Amd64.Open

- System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey_2048

Error message:

Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : An internal consistency check failed.

Stack trace
   at System.Security.Cryptography.CngKeyLite.GenerateNewExportableKey(String algorithm, Int32 keySize) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKeyLite.cs:line 411
   at System.Security.Cryptography.RSAImplementation.RSACng.GetDuplicatedKeyHandle() in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.cs:line 44
   at System.Security.Cryptography.RSAImplementation.RSACng.ExportKeyBlob(Boolean includePrivateParameters) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.cs:line 58
   at System.Security.Cryptography.RSAImplementation.RSACng.ExportParameters(Boolean includePrivateParameters) in /_/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs:line 292
   at System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey(Func`2 getSize) in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs:line 61
   at System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey(Int32 size) in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs:line 43
   at System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey_2048() in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs:line 32
ghost commented 2 years ago

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchForks See info in area-owners.md if you want to be subscribed.

Issue Details
Run: [runtime-coreclr libraries-jitstressregs 20211121.1](https://dev.azure.com/dnceng/public/_build/results?buildId=1479927&view=ms.vss-test-web.build-test-results-tab&runId=42379724&paneView=debug&resultId=148051) Failed test: ``` net7.0-windows-Release-x86-CoreCLR_checked-jitstressregs0x10-Windows.10.Amd64.Open - System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey_2048 ``` **Error message:** ``` Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : An internal consistency check failed. Stack trace at System.Security.Cryptography.CngKeyLite.GenerateNewExportableKey(String algorithm, Int32 keySize) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKeyLite.cs:line 411 at System.Security.Cryptography.RSAImplementation.RSACng.GetDuplicatedKeyHandle() in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.cs:line 44 at System.Security.Cryptography.RSAImplementation.RSACng.ExportKeyBlob(Boolean includePrivateParameters) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.cs:line 58 at System.Security.Cryptography.RSAImplementation.RSACng.ExportParameters(Boolean includePrivateParameters) in /_/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs:line 292 at System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey(Func`2 getSize) in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs:line 61 at System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey(Int32 size) in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs:line 43 at System.Security.Cryptography.Rsa.Tests.KeyGeneration.GenerateKey_2048() in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/KeyGeneration.cs:line 32 ```
Author: VincentBu
Assignees: -
Labels: `arch-x86`, `area-System.Security`, `os-windows`, `JitStress`
Milestone: -
bartonjs commented 2 years ago

CNG internal failure. Duplicate of #29683.