Skip to content

test: remove impact of tier-up changes in worker stack size test#64271

Open
joyeecheung wants to merge 1 commit into
nodejs:mainfrom
joyeecheung:fix-worker-stack
Open

test: remove impact of tier-up changes in worker stack size test#64271
joyeecheung wants to merge 1 commit into
nodejs:mainfrom
joyeecheung:fix-worker-stack

Conversation

@joyeecheung

@joyeecheung joyeecheung commented Jul 3, 2026

Copy link
Copy Markdown
Member

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.

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 <joyeec9h3@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jul 3, 2026
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 3, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 3, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants