Closed kt3k closed 7 months ago
The error message gives almost no detail as to what failed. All the tests passed. However, 24 fewer tests pass than a CI run that passes. By comparing the test outputs of both failed and passing runs, the tests that aren't run in the failing run, in alphabetical order, are:
./crypto/crypto_test.ts => digest() checks BLAKE2B vectors ...
./crypto/crypto_test.ts => digest() checks BLAKE2B-384 vectors ...
./crypto/crypto_test.ts => digest() checks BLAKE2S vectors ...
./crypto/crypto_test.ts => digest() checks BLAKE3 vectors ...
./crypto/crypto_test.ts => digest() checks KECCAK-224 vectors ...
./crypto/crypto_test.ts => digest() checks KECCAK-256 vectors ...
./crypto/crypto_test.ts => digest() checks KECCAK-384 vectors ...
./crypto/crypto_test.ts => digest() checks KECCAK-512 vectors ...
./crypto/crypto_test.ts => digest() checks MD4 vectors ...
./crypto/crypto_test.ts => digest() checks MD5 vectors ...
./crypto/crypto_test.ts => digest() checks RIPEMD-160 vectors ...
./crypto/crypto_test.ts => digest() checks SHA-1 vectors ...
./crypto/crypto_test.ts => digest() checks SHA-224 vectors ...
./crypto/crypto_test.ts => digest() checks SHA-256 vectors ...
./crypto/crypto_test.ts => digest() checks SHA-384 vectors ...
./crypto/crypto_test.ts => digest() checks SHA-512 vectors ...
./crypto/crypto_test.ts => digest() checks SHA3-224 vectors ...
./crypto/crypto_test.ts => digest() checks SHA3-256 vectors ...
./crypto/crypto_test.ts => digest() checks SHA3-384 vectors ...
./crypto/crypto_test.ts => digest() checks SHA3-512 vectors ...
./crypto/crypto_test.ts => digest() checks SHAKE128 vectors ...
./crypto/crypto_test.ts => digest() checks SHAKE256 vectors ...
./crypto/crypto_test.ts => digest() checks TIGER vectors ...
./crypto/crypto_test.ts => getRandomValues() passes through to native implementation ...
The tests for these algorithms are started asynchronously here, with the order given here.
So, considering the order in which the tests are run and the error given, I think what happens is that these algorithm tests start, and then the runtime momentarily chokes due to the high number of asynchronous operations, then recovers.
I'm not sure if this means anything, but ignoring the getRandomValues()
test, the tests for the crypto algorithms that do pass are BLAKE2B-128
, BLAKE2B-160
, BLAKE2B-224
and BLAKE2B-256
. I'm not sure it's worth suspecting the blake2
crate being the cause.
CC @mmastrac
The tests use SystemTime for elapsed time which is likely causing the problem:
let elapsed = SystemTime::now().duration_since(earlier)?.as_millis();
I think this will be fixed by https://github.com/denoland/deno/pull/22853
ref: https://github.com/denoland/deno_std/actions/runs/8232991752/job/22511555909?pr=4471