Skip to content

Conversation

@lpinca
Copy link
Member

Use the error message as another condition to skip the test when the buffer allocation fails.

Refs: 795dd8eb7988ae38553e
Refs: e9c6004a2d580008082b

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 17, 2025
@lpinca
Copy link
MemberAuthor

This should fix

https://ci.nodejs.org/job/node-test-binary-windows-js-suites/34803/RUN_SUBSET=3,nodes=win11-COMPILED_BY-vs2022_clang/testReport/junit/(root)/pummel/test_buffer_large_size_buffer_write/

--- duration_ms: 128.011 exitcode: 1 severity: fail stack: |- c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-write.js:19 throw e; ^ RangeError: Array buffer allocation failed at new ArrayBuffer (<anonymous>) at new Uint8Array (<anonymous>) at new FastBuffer (node:internal/buffer:968:5) at Buffer.alloc (node:buffer:399:10) at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-write.js:14:22) at Module._compile (node:internal/modules/cjs/loader:1691:14) at Object..js (node:internal/modules/cjs/loader:1823:10) at Module.load (node:internal/modules/cjs/loader:1426:32) at Module._load (node:internal/modules/cjs/loader:1249:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) Node.js v25.0.0-pre ... 

https://ci.nodejs.org/job/node-test-binary-windows-js-suites/34840/RUN_SUBSET=2,nodes=win11-COMPILED_BY-vs2022_clang/testReport/junit/(root)/pummel/test_buffer_large_size_buffer_alloc_unsafe_slow/

--- duration_ms: 161.012 exitcode: 1 severity: fail stack: |- c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc-unsafe-slow.js:15 throw e; ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected + Comparison{} - Comparison{- code: 'ERR_STRING_TOO_LONG' - } at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc-unsafe-slow.js:12:10) at Module._compile (node:internal/modules/cjs/loader:1691:14) at Object..js (node:internal/modules/cjs/loader:1823:10) at Module.load (node:internal/modules/cjs/loader:1426:32) at Module._load (node:internal/modules/cjs/loader:1249:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:152:5) at node:internal/main/run_main_module:33:47{generatedMessage: true, code: 'ERR_ASSERTION', actual: RangeError: Array buffer allocation failed at new ArrayBuffer (<anonymous>) at new Uint8Array (<anonymous>) at new FastBuffer (node:internal/buffer:968:5) at createUnsafeBuffer (node:internal/buffer:1114:12) at Buffer.allocUnsafeSlow (node:buffer:418:10) at assert.throws.code (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc-unsafe-slow.js:12:30) at getActual (node:assert:505:5) at ok.throws (node:assert:651:24) at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc-unsafe-slow.js:12:10) at Module._compile (node:internal/modules/cjs/loader:1691:14), expected:{code: 'ERR_STRING_TOO_LONG' }, operator: 'throws' } Node.js v25.0.0-pre ... 

https://ci.nodejs.org/job/node-test-binary-windows-js-suites/34840/RUN_SUBSET=2,nodes=win11-COMPILED_BY-vs2022_clang/testReport/junit/(root)/pummel/test_buffer_large_size_slowbuffer/

--- duration_ms: 168.372 exitcode: 1 severity: fail stack: |- c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-slowbuffer.js:19 throw e; ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected + Comparison{} - Comparison{- code: 'ERR_STRING_TOO_LONG' - } at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-slowbuffer.js:14:10) at Module._compile (node:internal/modules/cjs/loader:1691:14) at Object..js (node:internal/modules/cjs/loader:1823:10) at Module.load (node:internal/modules/cjs/loader:1426:32) at Module._load (node:internal/modules/cjs/loader:1249:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:152:5) at node:internal/main/run_main_module:33:47{generatedMessage: true, code: 'ERR_ASSERTION', actual: RangeError: Array buffer allocation failed at new ArrayBuffer (<anonymous>) at new Uint8Array (<anonymous>) at new FastBuffer (node:internal/buffer:968:5) at createUnsafeBuffer (node:internal/buffer:1114:12) at Buffer.allocUnsafeSlow (node:buffer:418:10) at assert.throws.code (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-slowbuffer.js:14:30) at getActual (node:assert:505:5) at ok.throws (node:assert:651:24) at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-slowbuffer.js:14:10) at Module._compile (node:internal/modules/cjs/loader:1691:14), expected:{code: 'ERR_STRING_TOO_LONG' }, operator: 'throws' } Node.js v25.0.0-pre ... 

https://ci.nodejs.org/job/node-test-binary-windows-js-suites/34840/RUN_SUBSET=2,nodes=win11-COMPILED_BY-vs2022_clang/testReport/junit/(root)/pummel/test_string_decoder_large_buffer/

--- duration_ms: 174.014 exitcode: 1 severity: fail stack: |- c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-string-decoder-large-buffer.js:26 throw e; ^ RangeError: Array buffer allocation failed at new ArrayBuffer (<anonymous>) at new Uint8Array (<anonymous>) at new FastBuffer (node:internal/buffer:968:5) at createUnsafeBuffer (node:internal/buffer:1114:12) at allocate (node:buffer:433:10) at Buffer.allocUnsafe (node:buffer:408:10) at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-string-decoder-large-buffer.js:21:22) at Module._compile (node:internal/modules/cjs/loader:1691:14) at Object..js (node:internal/modules/cjs/loader:1823:10) at Module.load (node:internal/modules/cjs/loader:1426:32) Node.js v25.0.0-pre ... 

Use the error message as another condition to skip the test when the buffer allocation fails. Refs: nodejs@795dd8eb7988ae38553e Refs: nodejs@e9c6004a2d580008082b
@codecov
Copy link

codecovbot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.12%. Comparing base (0722023) to head (fdb2c4b).
Report is 183 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #58738 +/- ## ========================================== - Coverage 90.16% 90.12% -0.04%  ========================================== Files 637 639 +2 Lines 188126 188201 +75 Branches 36886 36909 +23 ========================================== - Hits 169620 169617 -3 - Misses 11272 11330 +58 - Partials 7234 7254 +20 

see 46 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lpincalpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 17, 2025
@github-actionsgithub-actionsbot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jun 17, 2025
@github-actions

This comment was marked as outdated.

@LiviaMedeirosLiviaMedeiros added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Jun 17, 2025
@lpincalpinca added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jun 17, 2025
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 17, 2025
@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros
Copy link
Member

https://ci.nodejs.org/job/node-test-binary-windows-js-suites/34850/RUN_SUBSET=3,nodes=win11-COMPILED_BY-vs2022_clang/testReport/junit/(root)/pummel/test_string_decoder_large_buffer/

---duration_ms:203.164exitcode:134severity:failstack:|2-<---LastfewGCs--->FATALERROR:MarkCompactCollector:youngobjectpromotionfailedAllocationfailed-JavaScriptheapoutofmemory-----Nativestacktrace-----1:00007FF6857BD5B92:00007FF6864094473:00007FF686208E774:00007FF6861E8E1E5:00007FF6861DE4AC6:00007FF6861DE15C7:00007FF6861DDDA18:00007FF6861F00589:00007FF686AB6D7D10:00007FF686AB709211:00007FF6861E0E1412:00007FF6861C873313:00007FF6861C26D414:00007FF68620B3DA15:00007FF68620A8C616:00007FF68621BE1E17:00007FF68621B93B18:00007FF68756CAAD19:00007FF6862068E620:00007FF6862085ED21:00007FF685FF37DA22:00007FF685FF366B23:00007FF6863DFB8A24:00007FF6863DF03B25:0000019737E78AFA...

@joyeecheung
Copy link
Member

Regarding the OOM issue - maybe adding something like --max-old-space-size=8000 would help, the default size is ~4GB AFAICT, which doesn't give a lot of wiggle room since the buffer alone is ~4GB.

@nodejs-github-bot
Copy link
Collaborator

@lpincalpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 20, 2025
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 20, 2025
@nodejs-github-botnodejs-github-bot merged commit 3d608bb into nodejs:mainJun 20, 2025
60 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 3d608bb

@lpincalpinca deleted the fix/flaky-tests branch June 20, 2025 06:18
lpinca added a commit to lpinca/node that referenced this pull request Jun 20, 2025
Use the error message as another condition to skip the test when the buffer allocation fails. Refs: nodejs#58738
nodejs-github-bot pushed a commit that referenced this pull request Jun 22, 2025
Use the error message as another condition to skip the test when the buffer allocation fails. Refs: #58738 PR-URL: #58771 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Dario Piotrowicz <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jun 23, 2025
Use the error message as another condition to skip the test when the buffer allocation fails. Refs: 795dd8eb7988ae38553e Refs: e9c6004a2d580008082b PR-URL: #58738 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jun 23, 2025
Use the error message as another condition to skip the test when the buffer allocation fails. Refs: #58738 PR-URL: #58771 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Dario Piotrowicz <[email protected]>
@aduh95aduh95 added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Jul 21, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.dont-land-on-v20.xPRs that should not land on the v20.x-staging branch and should not be released in v20.x.dont-land-on-v22.xPRs that should not land on the v22.x-staging branch and should not be released in v22.x.needs-ciPRs that need a full CI run.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@lpinca@nodejs-github-bot@LiviaMedeiros@joyeecheung@aduh95