runtime icon indicating copy to clipboard operation
runtime copied to clipboard

MonoTests.System.Runtime.Caching.MemoryCacheTestExpires5.TestCacheExpiryOrdering()

Open lewing opened this issue 1 year ago β€’ 1 comments

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=711372 Build error leg or test failing: MonoTests.System.Runtime.Caching.MemoryCacheTestExpires5.TestCacheExpiryOrdering Pull request: https://github.com/dotnet/runtime/pull/103621

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "at MonoTests.System.Runtime.Caching.MemoryCacheTestExpires5.TestCacheExpiryOrdering() in",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

lewing avatar Jun 19 '24 16:06 lewing

❌ @Jarred-Sumner, your commit has failing tests :(

ο£ΏπŸ’ͺ 2 failing tests Darwin AARCH64

  • test/cli/install/registry/bun-install-registry.test.ts 188 failing
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

ο£ΏπŸ’» 2 failing tests Darwin x64 baseline

  • test/cli/install/registry/bun-install-registry.test.ts 188 failing
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

ο£ΏπŸ’» 2 failing tests Darwin x64

  • test/cli/install/registry/bun-install-registry.test.ts 188 failing
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

🐧πŸ’ͺ 3 failing tests Linux AARCH64

  • test/cli/install/registry/bun-install-registry.test.ts 225 failing
  • test/integration/mysql2/mysql2.test.ts 2 failing
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

🐧πŸ–₯ 2 failing tests Linux x64 baseline

  • test/cli/install/registry/bun-install-registry.test.ts 225 failing
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

🐧πŸ–₯ 2 failing tests Linux x64

  • test/cli/install/registry/bun-install-registry.test.ts 225 failing
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

πŸͺŸπŸ’» 3 failing tests Windows x64 baseline

  • test/cli/install/registry/bun-install-registry.test.ts 187 failing
  • test/cli/install/registry/bun-install-windowsshim.test.ts code 1
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

πŸͺŸπŸ’» 3 failing tests Windows x64

  • test/cli/install/registry/bun-install-registry.test.ts 187 failing
  • test/cli/install/registry/bun-install-windowsshim.test.ts code 1
  • test/js/node/zlib/zlib.kMaxLength.global.test.js SIGKILL

View logs

github-actions[bot] avatar Jun 11 '24 22:06 github-actions[bot]

:x: @nektro, your commit 083fac1e43ab7e29008f30c6dc4988ff5e9ec44b has 12 failures in #3022:

  • test/js/bun/http/serve-body-leak.test.ts - 1 failing on πŸͺŸ x64
  • test/js/bun/http/serve-body-leak.test.ts - 1 failing on πŸͺŸ x64
  • test/integration/expo-app/expo.test.ts - 1 failing on πŸͺŸ x64
  • test/integration/expo-app/expo.test.ts - 1 failing on πŸͺŸ x64
  • test/integration/expo-app/expo.test.ts - 1 failing on πŸͺŸ x64-baseline
  • test/cli/watch/watch.test.ts - timeout on πŸͺŸ x64
  • test/cli/watch/watch.test.ts - timeout on πŸͺŸ x64
  • test/cli/watch/watch.test.ts - timeout on πŸͺŸ x64-baseline
  • test/cli/install/registry/bun-install-registry.test.ts - 3 failing on πŸͺŸ x64
  • test/cli/install/registry/bun-install-registry.test.ts - 3 failing on πŸͺŸ x64
  • test/cli/install/registry/bun-install-registry.test.ts - 3 failing on πŸͺŸ x64-baseline
  • test/cli/install/bun-run.test.ts - 1 failing on πŸͺŸ x64
  • test/js/web/streams/streams.test.js - 1 failing on 🍎 13 x64
  • test/js/web/streams/streams.test.js - 1 failing on 🍎 14 x64
  • test/cli/hot/watch.test.ts - 1 failing on πŸͺŸ x64
  • test/cli/hot/watch.test.ts - 1 failing on πŸͺŸ x64
  • test/cli/hot/watch.test.ts - 1 failing on πŸͺŸ x64-baseline
  • test/cli/hot/hot.test.ts - 2 failing on πŸͺŸ x64
  • test/cli/hot/hot.test.ts - 2 failing on πŸͺŸ x64
  • test/cli/hot/hot.test.ts - 2 failing on πŸͺŸ x64-baseline
  • test/package.json - spawn error on πŸͺŸ x64-baseline
  • package.json - spawn error on πŸͺŸ x64-baseline
  • test/bundler/bun-build-api.test.ts - 1 failing on πŸͺŸ x64
  • test/bundler/bun-build-api.test.ts - 1 failing on πŸͺŸ x64
  • test/bundler/bun-build-api.test.ts - 1 failing on πŸͺŸ x64-baseline
  • test/js/bun/http/bun-serve-static.test.ts - 3 failing on 🍎 13 aarch64
  • robobun avatar Jun 27 '24 09:06 robobun

    :x: @Jarred-Sumner, your commit ee5dda5604ad5bc239d070d19cef8fe96a11a5d6 has 2 failures:

  • buildkite-agent pipeline upload .buildkite/ci.yml - code 1 on :gear:
  • .buildkite/scripts/upload-release.sh - code null on :github:
  • robobun avatar Jun 27 '24 09:06 robobun

    This pull request is stale and may be closed due to inactivity.

    github-actions[bot] avatar Aug 08 '24 20:08 github-actions[bot]

    clang-tidy nits are fixed! Thank you.

    github-actions[bot] avatar Aug 15 '24 06:08 github-actions[bot]

    Currently, this has zero performance impact on Next.js standalone.

    The code using the JS-based pako implementation of zlib needs to be deleted.

    Sampling rate: 100.000000 microseconds. Total samples: 37487
    
    Tier breakdown:
    -----------------------------------
    LLInt:                    35  (0.093366%)
    Baseline:                513  (1.368474%)
    DFG:                    3366  (8.979113%)
    FTL:                   24020  (64.075546%)
    js builtin:            17737  (47.315069%)
    IPInt:                     0  (0.000000%)
    WasmLLInt:                 0  (0.000000%)
    BBQ:                       0  (0.000000%)
    OMG:                       0  (0.000000%)
    Wasm:                      0  (0.000000%)
    Host:                   1797  (4.793662%)
    RegExp:                 1579  (4.212127%)
    C/C++:                     0  (0.000000%)
    Unknown Executable:     6177  (16.477712%)
    
    
    Hottest bytecodes as <numSamples   'functionName#hash:JITType:bytecodeIndex'>
      4055    'longest_match#<nil>:FTL:<nil>'
      2888    'fnv1a52#<nil>:FTL:bc#97'
      1859    'join#<nil>:None:<nil>'
      1801    'deflate_slow#<nil>:FTL:bc#785'
      1719    'crc32#<nil>:FTL:<nil>'
       896    '/<!--[\s\S]*?-->|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g#<nil>:RegExp:<nil>'
       895    'deflate_slow#<nil>:FTL:bc#1231'
       890    'Set#<nil>:None:<nil>'
       825    '_tr_tally#<nil>:FTL:<nil>'
       735    '__resolveFilename#<nil>:None:<nil>'
       667    'send_code#<nil>:FTL:bc#50'
       613    'deflate_slow#<nil>:FTL:bc#486'
       601    'regExpSplitFast#<nil>:None:<nil>'
       568    'lm_init#<nil>:FTL:<nil>'
       555    'arraySet#<nil>:FTL:bc#56'
       498    'send_bits#<nil>:FTL:bc#0'
       481    'base_parse#<nil>:FTL:bc#2016'
       398    'stringConcatSlowPath#<nil>:FTL:bc#46'
       388    'defineProperty#<nil>:None:<nil>'
       326    'send_bits#<nil>:FTL:<nil>'
       304    'Buffer#<nil>:None:<nil>'
       301    'byteLength#<nil>:None:<nil>'
       289    'pqdownheap#<nil>:FTL:<nil>'
       257    '/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi#<nil>:RegExp:<nil>'
       253    '#<nil>:None:<nil>'
       247    'compress_block#<nil>:FTL:bc#467'
       240    '#<nil>:FTL:bc#26'
       226    'URL#<nil>:None:<nil>'
       211    '/\s+/#<nil>:RegExp:<nil>'
       201    'set#<nil>:None:<nil>'
       195    'asyncFunctionResume#<nil>:FTL:bc#43'
       193    'base_parse#<nil>:FTL:bc#875'
       174    'base_parse#<nil>:DFG:bc#2016'
       173    'replace#<nil>:DFG:bc#61'
       169    'get#<nil>:FTL:bc#38'
       155    'includes#<nil>:None:<nil>'
       152    'concatMemcpy#<nil>:None:<nil>'
       152    'stringConcatSlowPath#<nil>:FTL:bc#4'
       150    'longest_match#<nil>:FTL:bc#0'
       147    'resolvePromise#<nil>:FTL:bc#58'
    
    

    Jarred-Sumner avatar Aug 15 '24 07:08 Jarred-Sumner

    I think it's worth figuring out why deflate is slow. This was on linux x64 (which is the most important one to benchmark against)

    Benchmark / MB/s Node v22.5.1 Bun v1.1.26 This PR
    DeflateSync 31.233 10.267 14.785
    InflateSync 74.138 43.702 95.985
    DeflateRawSync 31.572 10.419 14.820
    InflateRawSync 74.906 43.350 94.876
    GzipSync 30.967 10.218 14.719
    GunzipSync 75.088 43.268 99.847
    BrotliCompress 0.769 0.734 0.758
    BrotliDecompress 40.295 46.881 45.712
    DeflateStream 14.766 15.495 32.933
    InflateStream 25.277 51.343 88.897
    DeflateRawStream 18.695 15.794 33.061
    InflateRawStream 31.833 54.147 89.381
    GzipStream 17.648 15.495 33.020
    GunzipStream 29.844 51.343 87.822

    Jarred-Sumner avatar Aug 29 '24 08:08 Jarred-Sumner

    hm i was indeed able to reproduce these results, and updated the chart in the pr description to reflect

    nektro avatar Aug 30 '24 01:08 nektro

    So it doesn’t get lost in discord

    Currently, this does not stream. Instead, it buffers and sends output as a single large chunk. @nektro please add a test for this before merging.

    const zlib = require("node:zlib");
    const { Readable } = require("node:stream");
    
    // Generate 512 KB of random data
    const randomData = Buffer.alloc(512 * 1024);
    for (let i = 0; i < randomData.length; i++) {
      randomData[i] = Math.floor(Math.random() * 256);
    }
    
    console.log("Original data size:", randomData.length, "bytes");
    
    // Compress the data
    const compressed = zlib.deflateSync(randomData);
    console.log("Compressed data size:", compressed.length, "bytes");
    
    // Create a readable stream from the compressed data
    const compressedStream = Readable.from(compressed);
    
    // Decompress the data using a streaming approach
    const decompressor = zlib.createInflate();
    
    let totalReceived = 0;
    
    decompressor.on("data", (chunk) => {
      totalReceived += chunk.length;
      console.count(`Received chunk: ${chunk.length} bytes`);
    });
    
    decompressor.on("end", () => {
      console.log("Decompression complete");
      console.log("Total data received:", totalReceived, "bytes");
    });
    
    // Pipe the compressed data through the decompressor
    compressedStream.pipe(decompressor);
    
    ❯ bun-11770 ~/Desktop/decompressor.js 
    Original data size: 524288 bytes
    Compressed data size: 524456 bytes
    Received chunk: 524288 bytes: 1
    Decompression complete
    Total data received: 524288 bytes
    
    ❯ node ~/Desktop/decompressor.js
    Original data size: 524288 bytes
    Compressed data size: 524454 bytes
    Received chunk: 16384 bytes: 1
    Received chunk: 16384 bytes: 2
    Received chunk: 16384 bytes: 3
    Received chunk: 16384 bytes: 4
    Received chunk: 16384 bytes: 5
    Received chunk: 16384 bytes: 6
    Received chunk: 16384 bytes: 7
    Received chunk: 16384 bytes: 8
    Received chunk: 16384 bytes: 9
    Received chunk: 16384 bytes: 10
    Received chunk: 16384 bytes: 11
    Received chunk: 16384 bytes: 12
    Received chunk: 16384 bytes: 13
    Received chunk: 16384 bytes: 14
    Received chunk: 16384 bytes: 15
    Received chunk: 16384 bytes: 16
    Received chunk: 16384 bytes: 17
    Received chunk: 16384 bytes: 18
    Received chunk: 16384 bytes: 19
    Received chunk: 16384 bytes: 20
    Received chunk: 16384 bytes: 21
    Received chunk: 16384 bytes: 22
    Received chunk: 16384 bytes: 23
    Received chunk: 16384 bytes: 24
    Received chunk: 16384 bytes: 25
    Received chunk: 16384 bytes: 26
    Received chunk: 16384 bytes: 27
    Received chunk: 16384 bytes: 28
    Received chunk: 16384 bytes: 29
    Received chunk: 16384 bytes: 30
    Received chunk: 16384 bytes: 31
    Received chunk: 16384 bytes: 32
    Decompression complete
    Total data received: 524288 bytes
    

    This would explain part of the performance & memory usage gap in deflate

    Jarred-Sumner avatar Sep 01 '24 14:09 Jarred-Sumner