node icon indicating copy to clipboard operation
node copied to clipboard

test: limit stack size in `test-error-serdes`

Open LiviaMedeiros opened this issue 10 months ago β€’ 15 comments

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

Might fix: https://github.com/nodejs/node/issues/52630

LiviaMedeiros avatar Apr 24 '24 21:04 LiviaMedeiros

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/

aduh95 avatar Apr 24 '24 21:04 aduh95

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

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

targos avatar Apr 25 '24 06:04 targos

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 avatar Apr 25 '24 14:04 aduh95

CI: https://ci.nodejs.org/job/node-test-pull-request/58706/

nodejs-github-bot avatar Apr 25 '24 19:04 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/58707/

nodejs-github-bot avatar Apr 25 '24 20:04 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/58709/

nodejs-github-bot avatar Apr 26 '24 07:04 nodejs-github-bot

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

aduh95 avatar Apr 26 '24 08:04 aduh95

CI: https://ci.nodejs.org/job/node-test-pull-request/58719/

nodejs-github-bot avatar Apr 26 '24 14:04 nodejs-github-bot

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

LiviaMedeiros avatar Apr 26 '24 14:04 LiviaMedeiros

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

targos avatar Apr 26 '24 14:04 targos

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 avatar Apr 26 '24 15:04 LiviaMedeiros

I get the same as you on the CI machine:

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

targos avatar Apr 26 '24 16:04 targos

ARM CI: https://ci.nodejs.org/job/node-test-commit-arm-fanned/36411/

aduh95 avatar Apr 26 '24 21:04 aduh95

CI: https://ci.nodejs.org/job/node-test-pull-request/58772/

nodejs-github-bot avatar Apr 28 '24 07:04 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/58771/

nodejs-github-bot avatar Apr 28 '24 07:04 nodejs-github-bot