test: remove impact of tier-up changes in worker stack size test - #64271
Merged
Conversation
The depth of the stack depends not only on the stack size, but also on the size of each stack frame, which in turn depends on which tier the recursive function happens to be running at when the overflow occurs. Under load the background tier-up can land at a non-deterministic point in the recursion and flake the test. Keep the recursive function in the interpreter with %NeverOptimizeFunction() so the frame size - and thus the depth - is deterministic. Signed-off-by: Joyee Cheung <[email protected]>
targos
approved these changes
Jul 3, 2026
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
jasnell
approved these changes
Jul 7, 2026
Collaborator
|
Landed in 3257a36 |
aduh95
pushed a commit
that referenced
this pull request
Jul 21, 2026
The depth of the stack depends not only on the stack size, but also on the size of each stack frame, which in turn depends on which tier the recursive function happens to be running at when the overflow occurs. Under load the background tier-up can land at a non-deterministic point in the recursion and flake the test. Keep the recursive function in the interpreter with %NeverOptimizeFunction() so the frame size - and thus the depth - is deterministic. Signed-off-by: Joyee Cheung <[email protected]> PR-URL: #64271 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
RafaelGSS
pushed a commit
that referenced
this pull request
Jul 29, 2026
The depth of the stack depends not only on the stack size, but also on the size of each stack frame, which in turn depends on which tier the recursive function happens to be running at when the overflow occurs. Under load the background tier-up can land at a non-deterministic point in the recursion and flake the test. Keep the recursive function in the interpreter with %NeverOptimizeFunction() so the frame size - and thus the depth - is deterministic. Signed-off-by: Joyee Cheung <[email protected]> PR-URL: #64271 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Aug 6, 2026
The depth of the stack depends not only on the stack size, but also on the size of each stack frame, which in turn depends on which tier the recursive function happens to be running at when the overflow occurs. Under load the background tier-up can land at a non-deterministic point in the recursion and flake the test. Keep the recursive function in the interpreter with %NeverOptimizeFunction() so the frame size - and thus the depth - is deterministic. Signed-off-by: Joyee Cheung <[email protected]> PR-URL: #64271 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
Merged
1 task
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 21, 2026
…ite (#53062) Backports nodejs/node#64271. The test compares the recursion depth two Workers reach before overflowing, but depth also depends on frame size, which changes when the recursive function tiers up mid-recursion. On a busy CI runner that lands non-deterministically and the depths end up >10% apart. Pin the function to the interpreter so the depth is stable. The fix is only in Node 26.6.0+, so it is carried as a patch until the Node roll picks it up.
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 21, 2026
…ite (#53075) Backports nodejs/node#64271. The test compares the recursion depth two Workers reach before overflowing, but depth also depends on frame size, which changes when the recursive function tiers up mid-recursion. On a busy CI runner that lands non-deterministically and the depths end up >10% apart. Pin the function to the interpreter so the depth is stable. The fix is only in Node 26.6.0+, so it is carried as a patch until the Node roll picks it up. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <[email protected]>
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 21, 2026
…ite (#53076) Backports nodejs/node#64271. The test compares the recursion depth two Workers reach before overflowing, but depth also depends on frame size, which changes when the recursive function tiers up mid-recursion. On a busy CI runner that lands non-deterministically and the depths end up >10% apart. Pin the function to the interpreter so the depth is stable. The fix is only in Node 26.6.0+, so it is carried as a patch until the Node roll picks it up. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <[email protected]>
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 21, 2026
…ite (#53077) Backports nodejs/node#64271. The test compares the recursion depth two Workers reach before overflowing, but depth also depends on frame size, which changes when the recursive function tiers up mid-recursion. On a busy CI runner that lands non-deterministically and the depths end up >10% apart. Pin the function to the interpreter so the depth is stable. The fix is only in Node 26.6.0+, so it is carried as a patch until the Node roll picks it up. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <[email protected]>
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 21, 2026
…ite (#53078) Backports nodejs/node#64271. The test compares the recursion depth two Workers reach before overflowing, but depth also depends on frame size, which changes when the recursive function tiers up mid-recursion. On a busy CI runner that lands non-deterministically and the depths end up >10% apart. Pin the function to the interpreter so the depth is stable. The fix is only in Node 26.6.0+, so it is carried as a patch until the Node roll picks it up. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <[email protected]>
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 29, 2026
src_fix_libuv_assertion_on_windows.patch (nodejs/node#61999) and test_remove_impact_of_tier-up_changes_in_worker_stack_size_test.patch (nodejs/node#64271) are both included in Node.js v24.20.0.
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 29, 2026
Both landed in v24.20.0. Ref: nodejs/node#61999 Ref: nodejs/node#64271
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Aug 29, 2026
Both patches are backports that landed in Node.js v24.20.0. Ref: nodejs/node#61999 Ref: nodejs/node#64271
ckerr
pushed a commit
to electron/electron
that referenced
this pull request
Sep 1, 2026
Both landed in v24.20.0. Ref: nodejs/node#61999 Ref: nodejs/node#64271
ckerr
pushed a commit
to electron/electron
that referenced
this pull request
Sep 1, 2026
Both patches are backports that landed in Node.js v24.20.0. Ref: nodejs/node#61999 Ref: nodejs/node#64271
ckerr
pushed a commit
to electron/electron
that referenced
this pull request
Sep 1, 2026
src_fix_libuv_assertion_on_windows.patch (nodejs/node#61999) and test_remove_impact_of_tier-up_changes_in_worker_stack_size_test.patch (nodejs/node#64271) are both included in Node.js v24.20.0.
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Sep 1, 2026
* chore: bump node in DEPS to v24.20.0 * fix(patch): implement package maps in the ESM resolver Upstream added join to the path imports in resolve.js, which overlaps the import line this patch rewrites to pull in toNamespacedPath. Ref: nodejs/node#62239 * chore: remove upstreamed patches Both landed in v24.20.0. Ref: nodejs/node#61999 Ref: nodejs/node#64271 * chore: update patches (trivial only) * fix(patch): preserve RSA-PSS legacy pubkey DER Upstream added ReadASN1Element to ncrypto.cc but only calls it from the OpenSSL 3 provider branch, so under BoringSSL it is an unused function and -Werror fails the build. Guard the definition with the same NCRYPTO_USE_OPENSSL3_PROVIDER condition as its callers. Ref: nodejs/node#64547 * fix(patch): update sqlite to 3.53.4 The sqlite update introduced an unsigned/signed comparison in rbuDeltaApply that trips -Wsign-compare under -Werror. Extend the existing sign-compare patch to cast lenDelta, which is never negative at that point, to unsigned int. Ref: nodejs/node#64745 * fix: do not pass removed JSPI V8 flag Node.js v24.20.0 passes --experimental-wasm-jspi unconditionally, but Chromium's V8 shipped JSPI and removed the flag, so node_mksnapshot aborts with 'bad option'. Add the same patch as the main-branch roll. Ref: nodejs/node#59941 Ref: https://chromium-review.googlesource.com/c/v8/v8/+/6937664 * chore: update filenames.auto.gni --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <[email protected]>
MarshallOfSound
added a commit
to electron/electron
that referenced
this pull request
Sep 1, 2026
* chore: bump node in DEPS to v24.20.0 * chore: remove upstreamed patches Both patches are backports that landed in Node.js v24.20.0. Ref: nodejs/node#61999 Ref: nodejs/node#64271 * fix(patch): implement package maps in the ESM resolver Upstream rewrote packageResolve() to branch on hasPackageMap() and added join to the path imports, which shifted the context around the electron: specifier shortcut and the legacyMainResolve imports. Ref: nodejs/node#62239 * chore: update patches (trivial only) * fix(patch): split OpenSSL 3, BoringSSL, and legacy backends Upstream added an ASN.1 helper, ReadASN1Element, whose only callers live under NCRYPTO_USE_OPENSSL3_PROVIDER. With BoringSSL that macro is 0, so the helper is unused and fails -Werror=unused-function. Guard the definition with the same macro as its callers. Ref: nodejs/node#64211 * chore: update filenames.auto.gni Node.js v24.20.0 replaced src/quic/logstream.h with src/quic/session_manager.h. * fix(patch): update sqlite to 3.53.4 The new sqlite amalgamation compares 'unsigned int cnt' against 'int lenDelta' in rbuDeltaApply, which fails -Werror=sign-compare. Extend the existing sqlite sign-compare patch to cast that operand too. Ref: nodejs/node#64745 * fix(patch): do not pass removed JSPI V8 flag Node.js v24.20.0 backported JSPI enablement, which unconditionally passes --experimental-wasm-jspi to V8. Chromium's V8 removed that flag (JSPI is always on), so node_mksnapshot aborts with "bad option". Drop the argument in a new patch, matching main. Ref: nodejs/node#59941 Ref: https://chromium-review.googlesource.com/c/v8/v8/+/6937664 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Sam Attard <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background: this is flaking in the canary as https://chromium-review.googlesource.com/c/v8/v8/+/7761796 made the function eligible for maglev tier-up. Locally this made the flake disappear for me. Opening against the main branch since it makes sense here anyway.
The depth of the stack depends not only on the stack size, but also on the size of each stack frame, which in turn depends on which tier the recursive function happens to be running at when the overflow occurs. Under load the background tier-up can land at a non-deterministic point in the recursion and flake the test. Keep the recursive function in the interpreter with %NeverOptimizeFunction() so the frame size - and thus the depth - is deterministic.