-
Notifications
You must be signed in to change notification settings - Fork 30k
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
build: re-enable V8 concurrent marking #41013
Conversation
This breaks a test on my machine:
|
What was the failure? I think the logs are just what we log in the tests (even if it passes)? |
Oh you're right, the test is probably just flaky. I'll open a separate issue. |
@joyeecheung it's only flaky with this change, so I'll post here:
|
The stress test failed on windows but not linux or macos:
|
hmm, so it seems this hits this branch here because we are not increasing the heap limit in the near heap limit callback - since we are performing a heap snapshot which is triggering GC, and we are confident that this would release memory anyway, we simply return the initial limit back after the snapshot is written, but the branch checks that the returned it's strictly bigger than the initial limit or it will just crash. I wonder why we haven't bumped into this failure before until concurrent marking is enabled... @ulan Is it better that we just return a slightly bigger limit (+1 maybe) in this case? Or can the NearHeapLimit API be loosen up a little to accept the original limit, if the embedder knows that they can do something to free up the memory in the callback? |
@joyeecheung: adding 1 should work if you're sure that the GC is going to free a lot of memory. Note that 1) performing GC doesn't necessarily mean that many objects will be freed (it could be that all objects are reachable) 2) the callback is invoked when V8 thinks that promoting the young generation in the current GC may go over the old generation limit. So the freed bytes in the old generation should exceed the promoted bytes from the young generation. To make the test robust and independent from such technical details, perhaps it is worthwhile to increase the limit by substantial amount? E.g. double the limit? |
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: #41041 Refs: #41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
847201a
to
19958c7
Compare
Commit Queue failed- Loading data for nodejs/node/pull/41013 ✔ Done loading data for nodejs/node/pull/41013 ----------------------------------- PR info ------------------------------------ Title build: re-enable V8 concurrent marking (#41013) Author Michaël Zasso (@targos) Branch targos:fix-concurrent-marking -> nodejs:master Labels v8 engine, tools, needs-ci, dont-land-on-v12.x, dont-land-on-v14.x, lts-watch-v16.x Commits 1 - build: re-enable V8 concurrent marking Committers 1 - Michaël Zasso PR-URL: https://github.com/nodejs/node/pull/41013 Fixes: https://github.com/nodejs/node/issues/41012 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Richard Lau Reviewed-By: Jiawen Geng Reviewed-By: James M Snell ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/41013 Fixes: https://github.com/nodejs/node/issues/41012 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Richard Lau Reviewed-By: Jiawen Geng Reviewed-By: James M Snell -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - build: re-enable V8 concurrent marking ℹ This PR was created on Mon, 29 Nov 2021 10:13:36 GMT ✔ Approvals: 4 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/41013#pullrequestreview-817668927 ✔ - Richard Lau (@richardlau) (TSC): https://github.com/nodejs/node/pull/41013#pullrequestreview-817688119 ✔ - Jiawen Geng (@gengjiawen): https://github.com/nodejs/node/pull/41013#pullrequestreview-817733406 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/41013#pullrequestreview-817918558 ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2021-12-05T11:53:32Z: https://ci.nodejs.org/job/node-test-pull-request/41356/ - Querying data for job/node-test-pull-request/41356/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/1541360821 |
Landed in ca353de |
It was unintentionally disabled during a V8 update. Fixes: #41012 PR-URL: #41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: #41041 Refs: #41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update. Fixes: #41012 PR-URL: #41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: #41041 Refs: #41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update. Fixes: #41012 PR-URL: #41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
Is there a chance to be merged into 16.x? |
Yes, we have noticed some fairly large regressions in GC performance in production between node 14 and node 16, hopefully this fix will get merged back into node 16. |
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: #41041 Refs: #41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update. Fixes: #41012 PR-URL: #41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: #41041 Refs: #41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update. Fixes: #41012 PR-URL: #41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: nodejs#41041 Refs: nodejs#41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update. Fixes: nodejs#41012 PR-URL: nodejs#41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
V8 requires the NearHeapLimitCallback to return a limit that's higher than the initial one or otherwise it will crash. PR-URL: #41041 Refs: #41013 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update. Fixes: #41012 PR-URL: #41013 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
It was unintentionally disabled during a V8 update.
Fixes: #41012