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: reduce the allocation size in test-worker-arraybuffer-zerofill #54839

Closed

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Sep 7, 2024

Test has been flaky with timeouts in CI. This is possibly due to the repeated large allocations on the main thread. This commit reduces the allocation size and makes a number of other cleanups. The main goal is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations could be causing the test to be flaky if run parallel to other tests.

Refs: #52274

update: I realized after that it wasn't clear what was meant by "reduce the allocation size" here. The actual allocation on each iteration remains the same, but by waiting to start allocating until the worker reports the "online" event we reduce (albeit slightly) the number of allocations that are done overall. In local testing this reduced the actually number of allocation calls by a fair amount, reducing the amount of memory the test was using. Unfortunately I don't think just doing that is enough to moving the test to sequential should hopefully also help.

@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 Sep 7, 2024
@nodejs-github-bot

This comment was marked as outdated.

@lpinca
Copy link
Member

lpinca commented Sep 7, 2024

As written elsewhere I really see no reason to refactor this kind of tests to use node:test. In my opinion it is only added complexity and additional code that might interfere with what should be actually tested. The original design of using only the code strictly required for the test was great. There is no better way to write and run tests in my opinion. That said, I'm not blocking.

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.06%. Comparing base (123bb4c) to head (49d5078).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54839      +/-   ##
==========================================
- Coverage   88.07%   88.06%   -0.01%     
==========================================
  Files         651      651              
  Lines      183396   183396              
  Branches    35795    35798       +3     
==========================================
- Hits       161523   161515       -8     
+ Misses      15161    15159       -2     
- Partials     6712     6722      +10     

see 29 files with indirect coverage changes

@jasnell
Copy link
Member Author

jasnell commented Sep 8, 2024

The stress test looks good.

@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell force-pushed the cleanup-test-worker-arraybuffer-zerofill branch from 4db976a to 066d836 Compare September 8, 2024 17:52
@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 8, 2024
Test has been flaky with timeouts in CI. This is possibly due to the
repeated large allocations on the main thread. This commit reduces the
allocation size and makes a number of other cleanups. The main goal
is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations
could be causing the test to be flaky if run parallel to other tests.
@jasnell jasnell force-pushed the cleanup-test-worker-arraybuffer-zerofill branch from 066d836 to 49d5078 Compare September 11, 2024 14:39
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 11, 2024

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

jasnell added a commit that referenced this pull request Sep 12, 2024
Test has been flaky with timeouts in CI. This is possibly due to the
repeated large allocations on the main thread. This commit reduces the
allocation size and makes a number of other cleanups. The main goal
is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations
could be causing the test to be flaky if run parallel to other tests.

PR-URL: #54839
Refs: #52274
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented Sep 12, 2024

Landed in 4b2cab2

@jasnell jasnell closed this Sep 12, 2024
@lpinca
Copy link
Member

lpinca commented Sep 12, 2024

Some tests time out due to a deadlock during process shutdown, see #52550 (comment). I think that the underlying issue is the same here. We could revert/revisit this when a fix lands.

aduh95 pushed a commit that referenced this pull request Sep 12, 2024
Test has been flaky with timeouts in CI. This is possibly due to the
repeated large allocations on the main thread. This commit reduces the
allocation size and makes a number of other cleanups. The main goal
is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations
could be causing the test to be flaky if run parallel to other tests.

PR-URL: #54839
Refs: #52274
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 13, 2024
Test has been flaky with timeouts in CI. This is possibly due to the
repeated large allocations on the main thread. This commit reduces the
allocation size and makes a number of other cleanups. The main goal
is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations
could be causing the test to be flaky if run parallel to other tests.

PR-URL: #54839
Refs: #52274
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 13, 2024
Test has been flaky with timeouts in CI. This is possibly due to the
repeated large allocations on the main thread. This commit reduces the
allocation size and makes a number of other cleanups. The main goal
is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations
could be causing the test to be flaky if run parallel to other tests.

PR-URL: #54839
Refs: #52274
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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.

6 participants