-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Flaky GC-related tests with V8 12.2 #52273
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
Comments
Refs: #52273 PR-URL: #51362 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
Not sure if it's exactly related to |
@legendecas an FYI as I think you were working on shadow realm related stuff? |
PR-URL: #52855 Refs: #52273 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
PR-URL: #52855 Refs: #52273 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
PR-URL: nodejs#52855 Refs: nodejs#52273 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
PR-URL: nodejs#52855 Refs: nodejs#52273 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
PR-URL: #52855 Refs: #52273 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
PR-URL: #52855 Refs: #52273 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
@targos @joyeecheung ... can either of you update here on what is needed to address the flaky tests? For test-net-write-fully-async-hex-string, it's not clear from the discussion here what the issue might be or how the test might need to change and I've been unable to reproduce any failure locally. |
FWIW I found that when I increased the I also couldn't reproduce the |
I tried to enable the tests in #58232 Failure: https://github.com/nodejs/node/actions/runs/14905536948/job/41866906957?pr=58232
|
I think the worker thread changes (or any changes in that direction) could make the tests more flaky, not less, because it would be less likely for any unblocking GC from any thread to block the main thread - performance wise that's a good thing, however, the tests generally count on GC to kick in and finish fast enough that the heap growth would not reach limit of the heap, they assume when the memory pressure is critical enough the whole world will stop and wait for GC before moving forward (they tried queuing foreground tasks in the event loop, which I don't think would do the trick now) which may not necessarily be a safe assumption especially for a very small heap limit value so that V8 doesn't have a lot of wiggle room to work with. I think to make them more reliable it's between to just rewrite with something like checkIfCollectableByCounting and don't count on heap limits. |
Uh oh!
There was an error while loading. Please reload this page.
re.
test-shadow-realm-gc-module
andtest-shadow-realm-gc
, I think we should just skip them. Possible solution can be, use the more reliablecheckIfCollectableByCounting()
to check if the ShadowRealm instance in the main context can be collected, but I feel that would make the test invalid too (e.g. the native side can still be leaking even though the JS instances are collectable), so we might as well just skip and figure out a better way to test it later.re.
test-net-write-fully-async-hex-string
, looks like it's related to--expose-gc
again. I'd suggest that we just open an issue to track this and the shadow realm tests, and skip them for now. They are likely flaking due to incorrect assumptions in the tests broken by V8's new GC strategy, not real bugs.Originally posted by @joyeecheung in #51362 (comment)
The text was updated successfully, but these errors were encountered: