-
Notifications
You must be signed in to change notification settings - Fork 206
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
fix(xsnap): Avoid snapshot data memory leak #9405
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
275a050
to
0461c7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Given the scope of fixups, I'm not sure mergify will be able to do it right, so feel free to rebase locally. I'd love to keep the layering of failing test -> fix with test switching to non failing.
packages/xsnap/package.json
Outdated
@@ -33,6 +33,7 @@ | |||
"@endo/bundle-source": "^3.2.3", | |||
"@endo/eventual-send": "^1.2.2", | |||
"@endo/init": "^1.1.2", | |||
"@endo/nat": "^5.0.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in devDependencies
@@ -87,7 +157,7 @@ export async function xsnap(options) { | |||
netstringMaxChunkSize = undefined, | |||
parserBufferSize = undefined, | |||
snapshotStream, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given our findings in https://gist.github.com/mhofman/7fbfd71048148b97089993bb4463b465 I am slightly conflicted about keeping this snapshotStream
binding in the surrounding scope of makeSnapshotStream
, but then the only major engine that seems to not support split scopes (JSC) would also need options
to be nulled too, or skipped altogether (deconstructed in the params)
0461c7f
to
63cbd93
Compare
This removes the need to explicitly clear its value.
63cbd93
to
c9db8f8
Compare
Fixes #9316 Add testing code to observe memory leaks related to xsnap snapshots, and fix the leak that retains them. None. None. None. Covered! None (this is kernel code).
Fixes #9316
Description
Add testing code to observe memory leaks related to xsnap snapshots, and fix the leak that retains them.
Security Considerations
None.
Scaling Considerations
None.
Documentation Considerations
None.
Testing Considerations
Covered!
Upgrade Considerations
None (this is kernel code).