dotnet / runtime

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

Cryptograph.Csp tests are failing intermittently #34045

Closed jaredpar closed 4 years ago

jaredpar commented 4 years ago

Console Log Summary

  System.Security.Cryptography.Dsa.Tests.DsaArrayOffsetSignatureFormatTests.SignDataVerifyData_SHA1(signatureFormat: Rfc3279DerSequence) [FAIL]
      Assert.True() Failure
      Expected: True
      Actual:   False
      Stack Trace:
        /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DsaFamilySignatureFormatTests.cs(152,0): at System.Security.Cryptography.Algorithms.Tests.DsaFamilySignatureFormatTests.SignDataVerifyData_SHA1(DSASignatureFormat signatureFormat)

Builds

Build Pull Request Test Failure Count
#569968 #33175 1
#570519 #33420 1
#570525 #33990 1
#570636 Rolling 1
#570708 #32592 1
#570791 #33970 1
#570811 #33953 1
#571061 #33984 1
#571274 #34027 1
#571286 Rolling 1
#571338 #33942 1
#571351 #33881 2
#571369 #33831 1

Configurations

jaredpar commented 4 years ago

@bartonjs ETA for when this will be addressed / disabled? It's continuing to impact our CI reliability.

bartonjs commented 4 years ago

I don't doubt that they're failing, but I've run over two million iterations locally (Win8.1 Server) at this point without encountering a fault. Time to boot up a mac, I guess.

bartonjs commented 4 years ago

When an excess of 10 million iterations succeeds... think laterally.

The DSA Array, DSA Array+Offset, and DSA Span classes are all sharing key objects (similarly for the ECDSA ones, but a different triplet of sharing), so this is race conditions from parallel use on a type that isn't thread-safe.

So I'll have a fix today.