Skip to content
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): do not leak through vat termination race #5643

Merged
merged 2 commits into from
Jun 29, 2022

Conversation

mhofman
Copy link
Member

@mhofman mhofman commented Jun 22, 2022

refs: #5507

Description

Security Considerations

None

Documentation Considerations

We should have some documentation for developers regarding the memory leak risks of promises.

Testing Considerations

Tested locally with the loadgen. The snapshot does not seem to accumulate any significant program objects.

@mhofman mhofman requested review from arirubinstein, warner and dckc June 22, 2022 16:53
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to take a look... it's more than I can look at urgently. I don't object to this going forward, though it seems to introduce significant technical-debt to re-sync endo (in place of the patch). I'd prefer to see an issue about cleaning that up.

@mhofman
Copy link
Member Author

mhofman commented Jun 22, 2022

@dckc the patches will become redundant and be removed at the next endo sync. I've used this approach before to incorporate endo changes into agoric-sdk without going through a full blown version bump, and it has worked well. cc @kriskowal

@dckc
Copy link
Member

dckc commented Jun 22, 2022

@dckc the patches will become redundant and be removed at the next endo sync.

Yes; I'm asking that we make an issue now for that work later.

Just like... hm... I don't see an issue for #5576 . So maybe that's not the norm. Oh well.

@mhofman mhofman force-pushed the mhofman/5507-fix-promise-leak branch from 61bccdf to 5a1135c Compare June 23, 2022 21:56
@mhofman mhofman requested review from dtribble and turadg as code owners June 23, 2022 21:56
@mhofman mhofman force-pushed the mhofman/5507-fix-promise-leak branch from 5a1135c to f957c8f Compare June 23, 2022 22:04
@mhofman mhofman force-pushed the mhofman/memory-sleuth branch from 547d722 to 384024a Compare June 23, 2022 22:04
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed just the non-Endo changes since those have separate review.

This patch approach seems fine to me. It's the norm when syncing Endo deps to remove stale patches. (These will fail otherwise.)

The snapshot does not seem to accumulate any significant program objects.

I can't tell whether this is evidence that the motivating observation is gone.

Approving because this appears to be strictly an improvement, whether it fully solves the problem or not.

@mhofman
Copy link
Member Author

mhofman commented Jun 23, 2022

Ugh sorry I didn't mean to add @turadg or @dtribble as reviewers. I had a bad push which included some of master into an out of date base branch. (I assume code-owners triggered this)

@mhofman mhofman removed the request for review from dtribble June 23, 2022 22:59
@mhofman mhofman force-pushed the mhofman/5507-fix-promise-leak branch from f957c8f to bea100e Compare June 23, 2022 23:06
Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not qualified to review the implementation of racePromises (maybe @erights or @kriskowal ?), but the use of it within xsnap.js looks good to me.

@mhofman mhofman force-pushed the mhofman/5507-fix-promise-leak branch from bea100e to e46d1cb Compare June 27, 2022 16:59
@mhofman mhofman changed the base branch from mhofman/memory-sleuth to master June 27, 2022 16:59
@mhofman
Copy link
Member Author

mhofman commented Jun 27, 2022

I re-integrated the patches of endo PR that now landed, and rebased to not layer on top of the measurement work.

@kriskowal depending on how #5576 goes, let decide whether when to merge this.

@mhofman mhofman force-pushed the mhofman/5507-fix-promise-leak branch 3 times, most recently from ba9dc71 to 08ec858 Compare June 27, 2022 20:16
@mhofman mhofman force-pushed the mhofman/5507-fix-promise-leak branch from 08ec858 to c6a200e Compare June 28, 2022 23:35
@mhofman mhofman changed the base branch from master to kris-sync-endo June 28, 2022 23:38
@mhofman mhofman added the automerge:squash Automatically squash merge label Jun 28, 2022
Base automatically changed from kris-sync-endo to master June 29, 2022 00:03
@mhofman
Copy link
Member Author

mhofman commented Jun 29, 2022

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Jun 29, 2022

refresh

✅ Pull request refreshed

@mhofman mhofman added force:integration Force integration tests to run on PR and removed force:integration Force integration tests to run on PR labels Jun 29, 2022
@mergify mergify bot merged commit 8201050 into master Jun 29, 2022
@mergify mergify bot deleted the mhofman/5507-fix-promise-leak branch June 29, 2022 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants