test: limit young generation in heap snapshot tests#64107
Open
trivikr wants to merge 1 commit into
Open
Conversation
Set maxYoungGenerationSizeMb for the worker heap snapshot tests so the temporary heap limit used while writing the snapshot is deterministic. This keeps the tests focused on verifying that one snapshot is written before the worker reports ERR_WORKER_OUT_OF_MEMORY. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the worker heap snapshot near-heap-limit tests to set an explicit
young generation size for the worker.
The snapshot near-heap-limit callback uses the isolate's max young generation
size as temporary overhead while writing the heap snapshot. On some platforms
that value can be large enough relative to the test's old-space limit that V8
can hit a fatal OOM path before the worker resource-limit callback reports
ERR_WORKER_OUT_OF_MEMORY.By setting
TEST_YOUNG_SPACE_SIZE=16for these tests, the temporary heap limitincrease is deterministic while keeping the old-space limit unchanged.
Refs: https://github.com/nodejs/reliability/issues?q=%22test-heapsnapshot-near-heap-limit-worker%22
Example
Assisted-by: openai:gpt-5.5