Repository navigation
Test failures in hashing on Browser #69806
Copy link
Copy link
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Securityblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Milestone
Description
[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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Securityblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Activity
ericstj commentedon May 25, 2022
@bartonjs were you testing in the exact same environment as the test? Ubuntu, amd64, WasmTestOnNodeJs?
vcsjones commentedon May 25, 2022
Any chance it's concurrency related? Concurrent test execution?
lewing commentedon May 25, 2022
@radical can you also keep an eye on any failures in the hashing tests to make sure we know the status here
bartonjs commentedon May 26, 2022
No. Windows/amd64/Console, as an attempt to reproduce the values reported as 'actual' by the failures. (Crack the hash... crypto mining for flyweights)
bartonjs commentedon May 26, 2022
I didn't think wasm had concurrency...
radical commentedon May 26, 2022
The test is running on chrome, and not nodejs.
buyaa-n commentedon May 26, 2022
https://github.com/dotnet/runtime/pull/69815/checks?check_run_id=6615945253 probably related to this
Log: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-69815-merge-5dc2e2518ad14b9dbc/WasmTestOnBrowser-System.Security.Cryptography.Tests/1/console.6a6c9876.log?helixlogtype=result
radical commentedon May 26, 2022
this is very odd:
[19:57:15] fail: [out of order message from the browser]: http://127.0.0.1:37699/dotnet.js 2:70388 UncaughtWasmXHarnessArgs=--no-headless, and check the js console.2 remaining items
maraf commentedon May 31, 2022
Another hit on today's rolling build #20220531.2.
agocke commentedon Jun 1, 2022
This is failing regularly in CI -- can we add test retries or disable the test, assuming there's no fix at the moment?
buyaa-n commentedon Jun 2, 2022
Another failure on: https://github.com/dotnet/runtime/pull/70065/checks?check_run_id=6699909171
https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-70065-merge-98fea3a4daa64d8eac/WasmTestOnBrowser-System.Security.Cryptography.Tests/1/console.a690da3d.log?helixlogtype=result
Fix race condition in WASM crypto worker
maraf commentedon Jun 7, 2022
Another hit on #20220606.48
Fix race condition in WASM crypto worker (#70185)