runtime: Test failures in hashing on Browser
[08:20:42] info: Starting: System.Security.Cryptography.Tests.dll
[08:20:46] fail: [FAIL] System.Security.Cryptography.Tests.Sha1ManagedTests.Sha1_Rfc3174_3_Async
[08:20:46] info: Showing first 10 differences
[08:20:46] info: Position 0: Expected: 52, Actual: 217
[08:20:46] info: Position 1: Expected: 170, Actual: 73
[08:20:46] info: Position 2: Expected: 151, Actual: 231
[08:20:46] info: Position 3: Expected: 60, Actual: 108
[08:20:46] info: Position 4: Expected: 212, Actual: 115
[08:20:46] info: Position 5: Expected: 196, Actual: 7
[08:20:46] info: Position 6: Expected: 218, Actual: 236
[08:20:46] info: Position 7: Expected: 164, Actual: 195
[08:20:46] info: Position 8: Expected: 246, Actual: 62
[08:20:46] info: Position 9: Expected: 30, Actual: 42
[08:20:46] info: Total number of differences: 20 out of 20
[08:20:46] info: at System.AssertExtensions.SequenceEqual[Byte](ReadOnlySpan`1 expected, ReadOnlySpan`1 actual)
[08:20:46] info: at System.AssertExtensions.SequenceEqual[Byte](Span`1 expected, Span`1 actual)
[08:20:46] info: at System.Security.Cryptography.Tests.HashAlgorithmTestDriver.VerifyOneShotStreamAsync(Stream input, String output)
[08:20:46] info: at System.Security.Cryptography.Tests.HashAlgorithmTestDriver.VerifyRepeatingAsync(String input, Int32 repeatCount, String output)
[08:20:46] info: at System.Security.Cryptography.Tests.Sha1Tests.Sha1_Rfc3174_3_Async()
[08:20:46] info: --- End of stack trace from previous location ---
[08:21:07] info: Finished: System.Security.Cryptography.Tests.dll
[08:21:07] info:
[08:21:07] info: === TEST EXECUTION SUMMARY ===
[08:21:07] info: Total: 1163, Errors: 0, Failed: 1, Skipped: 1, Time: 24.820985s
[10:47:51] info: Starting: System.Security.Cryptography.Tests.dll
[10:47:55] fail: [FAIL] System.Security.Cryptography.Tests.Sha256Tests.Sha256_Fips180_3
[10:47:55] info: Assert.Equal() Failure
[10:47:55] info: ↓ (pos 0)
[10:47:55] info: Expected: [205, 199, 110, 92, 153, ...]
[10:47:55] info: Actual: [156, 156, 59, 215, 224, ...]
[10:47:55] info: ↑ (pos 0)
[10:47:55] info: at System.Security.Cryptography.Tests.HashAlgorithmTestDriver.VerifyOneShotAllocatingStream(Stream input, String output)
[10:47:55] info: at System.Security.Cryptography.Tests.HashAlgorithmTestDriver.VerifyRepeating(String input, Int32 repeatCount, String output)
[10:47:55] info: at System.Security.Cryptography.Tests.Sha256Tests.Sha256_Fips180_3()
[10:47:55] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
[10:48:00] fail: [out of order message from the browser]: http://127.0.0.1:35197/dotnet.js 2:70309 Uncaught
[11:02:46] fail: Application has finished with exit code TIMED_OUT but 0 was expected
XHarness exit code: 71 (GENERAL_FAILURE)
/datadisks/disk1/work/A6E90937/w/A157086B/e /datadisks/disk1/work/A6E90937/w/A157086B/e
----- end Wed May 25 11:02:46 UTC 2022 ----- exit code 71 ----------------------------------------------------------
Both of these tests are testing the hash of one million ASCII lowercase a characters.
Having run through hashes of {}, {'a'}, {'a', 'a'}, all the way up to 5 million, for both SHA-1 and SHA-2-256, I can’t reproduce either of these error values.
It seems like, somehow, bad data got into the pipeline… it’s not a case of too much, or too little.
Also noteworthy is that each of these failed in the allocating one-shots over streams (public static byte[] HashData(Stream), and the async variant), after successfully doing it via other methods.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- WIP: Solve race condition in WASM crypto worker Fix #69806 — committed to eerhardt/runtime by eerhardt 2 years ago
- Fix race condition in WASM crypto worker When sending a message between LibraryChannel and ChannelWorker, there is a race condition where both threads are reading/writing to shared memory at the same... — committed to eerhardt/runtime by eerhardt 2 years ago
- Fix race condition in WASM crypto worker (#70185) When sending a message between LibraryChannel and ChannelWorker, there is a race condition where both threads are reading/writing to shared memory at... — committed to dotnet/runtime by eerhardt 2 years ago
@radical can you also keep an eye on any failures in the hashing tests to make sure we know the status here