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-buffer-tostring-rangeerror is flaky (timeout) #52964

Open
aduh95 opened this issue May 12, 2024 · 7 comments
Open

test-buffer-tostring-rangeerror is flaky (timeout) #52964

aduh95 opened this issue May 12, 2024 · 7 comments
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. linux Issues and PRs related to the Linux platform.

Comments

@aduh95
Copy link
Contributor

aduh95 commented May 12, 2024

Test

test-buffer-tostring-rangeerror

Platform

Linux x64

Console output

not ok 1244 parallel/test-buffer-tostring-rangeerror
  ---
  duration_ms: 120073.76400
  severity: fail
  exitcode: -15
  stack: |-
    timeout
    (node:2934155) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use `node --trace-deprecation ...` to show where the warning was created)
  ...

Build links

Additional information

No response

@aduh95 aduh95 added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label May 12, 2024
@github-actions github-actions bot added the linux Issues and PRs related to the Linux platform. label May 12, 2024
@aduh95
Copy link
Contributor Author

aduh95 commented May 12, 2024

I'm able to reproduce locally: running the test 100'000 times, I got 6 timeouts. If I add a console.log("pass") at the end of the file, it gets printed even when the test times out. Adding process.exit(); does not help.

@fahrradflucht
Copy link
Contributor

I also investigated this a bit earlier. I was able to reproduce it quite consistently with just a 1000 runs and reduced it to this:

'use strict';
require('../common');

const assert = require('assert');
const { constants: { MAX_STRING_LENGTH } } = require('buffer');

const len = MAX_STRING_LENGTH + 1;
const message = {
  code: 'ERR_STRING_TOO_LONG',
  name: 'Error',
};
assert.throws(() => Buffer(len).toString('utf8'), message);
assert.throws(() => Buffer(len).toString('utf8'), message);

Removing either the second buffer.toString call, the ../common import, adding a console.log('pass') at the end or using a debug build will make it not reproduce anymore. 🙃 🤔

@aduh95
Copy link
Contributor Author

aduh95 commented May 12, 2024

Could we try to add --no-warnings CLI flag and see if that would have any effect? EDIT: nope, I tried with both --no-warnings and --no-deprecation, and I was still getting timeouts

@fahrradflucht
Copy link
Contributor

fahrradflucht commented May 16, 2024

I got curious again by #52959 (comment) and indeed this doesn't reproduce on 07f481c but does on 91661ec so it looks like something in #52293 introduced this flakiness as well / aka probably it's the same root cause.

@lpinca
Copy link
Member

lpinca commented May 16, 2024

@fahrradflucht can you try with the --jitless flag?

@fahrradflucht
Copy link
Contributor

@fahrradflucht can you try with the --jitless flag?

It indeed does not reproduce with --jitless on 91661ec.

@fahrradflucht
Copy link
Contributor

I got curious again by #52959 (comment) and indeed this doesn't reproduce on 07f481c but does on 91661ec so it looks like something in #52293 introduced this flakiness as well / aka probably it's the same root cause.

Actually, I'm sorry, I think I have to take this back. I now reproduced a bunch of times on 07f481c as well. It might happen less prior to the v8 update, but it can be reproduced as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. linux Issues and PRs related to the Linux platform.
Projects
None yet
Development

No branches or pull requests

3 participants