-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
sea: don't set code cache flags when snapshot is used #54120
Merged
nodejs-github-bot
merged 1 commit into
nodejs:main
from
joyeecheung:fix-snapshot-codecache
Aug 5, 2024
Merged
sea: don't set code cache flags when snapshot is used #54120
nodejs-github-bot
merged 1 commit into
nodejs:main
from
joyeecheung:fix-snapshot-codecache
Aug 5, 2024
Conversation
This file contains 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
When both useCodeCache and useSnapshot are set, we generate the snapshot and skip the generation of the code cache since the snapshot already includes the code cache. But we previously still persist the code cache setting in the flags that got serialized into the SEA, so the resulting executable would still try to read the code cache even if it's not added to the SEA, leading to a flaky crash caused by OOB on some platforms. This patch fixes the crash by ignoring the code cache setting when generating the flag if both snapshot and code cache is configured.
Review requested:
|
nodejs-github-bot
added
needs-ci
PRs that need a full CI run.
single-executable
Issues and PRs related to single-executable applications
labels
Jul 30, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Jul 30, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54120 +/- ##
=======================================
Coverage 87.07% 87.07%
=======================================
Files 643 643
Lines 181583 181588 +5
Branches 34886 34888 +2
=======================================
+ Hits 158114 158122 +8
- Misses 16751 16754 +3
+ Partials 6718 6712 -6
|
legendecas
approved these changes
Jul 30, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Aug 5, 2024
joyeecheung
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Aug 5, 2024
nodejs-github-bot
added
commit-queue-failed
An error occurred while landing this pull request using GitHub Actions.
and removed
commit-queue
Add this label to land a pull request using GitHub Actions.
labels
Aug 5, 2024
Commit Queue failed- Loading data for nodejs/node/pull/54120 ✔ Done loading data for nodejs/node/pull/54120 ----------------------------------- PR info ------------------------------------ Title sea: don't set code cache flags when snapshot is used (#54120) Author Joyee Cheung <[email protected]> (@joyeecheung) Branch joyeecheung:fix-snapshot-codecache -> nodejs:main Labels needs-ci, single-executable Commits 1 - sea: don't set code cache flags when snapshot is used Committers 1 - Joyee Cheung <[email protected]> PR-URL: https://github.com/nodejs/node/pull/54120 Fixes: https://github.com/nodejs/node/issues/50740 Reviewed-By: Chengzhong Wu <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54120 Fixes: https://github.com/nodejs/node/issues/50740 Reviewed-By: Chengzhong Wu <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 30 Jul 2024 10:56:15 GMT ✔ Approvals: 1 ✔ - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/54120#pullrequestreview-2208090806 ✘ This PR needs to wait 18 more hours to land (or 0 hours if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-08-05T15:39:09Z: https://ci.nodejs.org/job/node-test-pull-request/60885/ - Querying data for job/node-test-pull-request/60885/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/10252668602 |
richardlau
approved these changes
Aug 5, 2024
richardlau
added
commit-queue
Add this label to land a pull request using GitHub Actions.
and removed
commit-queue-failed
An error occurred while landing this pull request using GitHub Actions.
labels
Aug 5, 2024
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Aug 5, 2024
Landed in c6aeddf |
targos
pushed a commit
that referenced
this pull request
Aug 14, 2024
When both useCodeCache and useSnapshot are set, we generate the snapshot and skip the generation of the code cache since the snapshot already includes the code cache. But we previously still persist the code cache setting in the flags that got serialized into the SEA, so the resulting executable would still try to read the code cache even if it's not added to the SEA, leading to a flaky crash caused by OOB on some platforms. This patch fixes the crash by ignoring the code cache setting when generating the flag if both snapshot and code cache is configured. PR-URL: #54120 Fixes: #50740 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs-ci
PRs that need a full CI run.
single-executable
Issues and PRs related to single-executable applications
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.
When both useCodeCache and useSnapshot are set, we generate the snapshot and skip the generation of the code cache since the snapshot already includes the code cache. But we previously still persist the code cache setting in the flags that got serialized into the SEA, so the resulting executable would still try to read the code cache even if it's not added to the SEA, leading to a flaky crash caused by OOB on some platforms.
This patch fixes the crash by ignoring the code cache setting when generating the flag if both snapshot and code cache is configured.
Fixes: #50740