Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: limit stack size in test-error-serdes #52674

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LiviaMedeiros
Copy link
Contributor

This should significantly speed up the part of test that exceeds the maximum call stack size and hopefully deflake it on CI.

Might fix: #52630

@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 Apr 24, 2024
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 24, 2024
@aduh95 aduh95 removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 24, 2024
@aduh95
Copy link
Contributor

aduh95 commented Apr 24, 2024

Stress-test CI: https://ci.nodejs.org/job/node-stress-single-test/497/

For comparison, stress-test CI on main: https://ci.nodejs.org/job/node-stress-single-test/501/

@targos
Copy link
Member

targos commented Apr 25, 2024

https://ci.nodejs.org/job/node-stress-single-test/499/

The test still fails occasionally but maybe it's less flaky.

@aduh95
Copy link
Contributor

aduh95 commented Apr 25, 2024

test-macOS: test/pummel/test-crypto-timing-safe-equal-benchmarks.js#L109 seems to be failing consistently (5/5) on this PR 🤔 I restarted it a fifth time, that doesn't sound promising though

EDIT: it’s also failing on other PRs, confirming it’s unrelated.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 25, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 25, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Apr 26, 2024

It seems to make the test more flaky on node-test-binary-armv7l 😬

@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros
Copy link
Contributor Author

This is strange... IIRC default stack size is lower on 32bit platforms, but it shouldn't be lower than 128KB. 🤔

@targos
Copy link
Member

targos commented Apr 26, 2024

From the machine that failed, I started node and did:

> process.pid
4172727

# in another terminal
$ cat /proc/4172727/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes

@LiviaMedeiros
Copy link
Contributor Author

LiviaMedeiros commented Apr 26, 2024

8388608 seems to be kernel-side ulimit -s bar, which normally shouldn't be reachable (V8 should throw RangeError before segfaulting)
Default V8 stack limit in Node.js should be shown with node --v8-options | fgrep 'default: --stack-size='.
With v20.8.1 on 32bit x86 I got 864 which is just slightly lower than 64bit's 984...

Is it possible to perform stress-single-test on binary-armv7l? If the test fails consistently there, it might be easier to debug.

@LiviaMedeiros LiviaMedeiros added blocked PRs that are blocked by other issues or PRs. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 26, 2024
@targos
Copy link
Member

targos commented Apr 26, 2024

I get the same as you on the CI machine:

 ./node --v8-options | fgrep 'default: --stack-size='
        type: int  default: --stack-size=864

@aduh95
Copy link
Contributor

aduh95 commented Apr 26, 2024

@@ -0,0 +1,29 @@
// Flags: --expose-internals --stack-size=128
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these just three tests testing the same thing but with different stack sizes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, these belong to af75425 just to see if there's any difference in CI results on different platforms.
That commit also extracted the stack exhausting parts (primary suspect of flakiness) from the rest of the test to confirm that cyclic errors are the cause of timeout.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. 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.

test-error-serdes times out
9 participants