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

test(swingset): fix GC test flake by forcing xsnap worker, not V8 #9442

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

warner
Copy link
Member

@warner warner commented Jun 1, 2024

This "forward to fake zoe" in gc-vat.test was added to demonstrate a fix for #3482, in which liveslots was mishandling an intermediate promise by retaining it forever, which made us retain objects that appear in eventual-send results forever.

This problem was discovered while investigating an unrelated XS engine bug (#3406), so "is this specific to a single engine?" was on our mind, and I wasn't sure that we were dealing with two independent bugs until I wrote the test and showed that it failed on both V8 and XS. So the test was originally written with a commented-out managerType: option to make it easy to switch back and forth between local and xs-worker. That switch was left in the local state, probably because it's slightly faster.

What we've learned is that V8 sometimes holds on to objects despite a forced GC pass (see #5575 and #3240), and somehow it only seems to fail in CI runs (and only for people other than me). Our usual response is to make the test use XS instead of V8, either by setting creationOptions.managerType: 'xs-worker' on the individual vat, or by setting defaultManagerType: 'xs-worker' to set it for all vats.

This PR uses the first approach, changing just the one vat being exercised (which should be marginally cheaper than making all vats use XS).

closes #9392

This "forward to fake zoe" in gc-vat.test was added to demonstrate a
fix for #3482, in which liveslots was mishandling an intermediate
promise by retaining it forever, which made us retain objects that
appear in eventual-send results forever.

This problem was discovered while investigating an unrelated XS engine
bug (#3406), so "is this specific to a single engine?" was on our
mind, and I wasn't sure that we were dealing with two independent bugs
until I wrote the test and showed that it failed on both V8 and XS. So
the test was originally written with a commented-out `managerType:`
option to make it easy to switch back and forth between `local` and
`xs-worker`. That switch was left in the `local` state, probably
because it's slightly faster.

What we've learned is that V8 sometimes holds on to objects despite a
forced GC pass (see #5575 and #3240), and somehow it only seems to
fail in CI runs (and only for people other than me). Our usual
response is to make the test use XS instead of V8, either by setting
`creationOptions.managerType: 'xs-worker'` on the individual vat, or
by setting `defaultManagerType: 'xs-worker'` to set it for all vats.

This PR uses the first approach, changing just the one vat being
exercised (which should be marginally cheaper than making all vats use
XS).

closes #9392
@warner warner added the SwingSet package: SwingSet label Jun 1, 2024
@warner warner requested a review from turadg June 1, 2024 01:38
Copy link

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5bf5af0
Status: ✅  Deploy successful!
Preview URL: https://d49094c7.agoric-sdk.pages.dev
Branch Preview URL: https://warner-9392-fix-swingset-tes.agoric-sdk.pages.dev

View logs

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.

Thanks for the write up. This looks like the best solution.

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jun 1, 2024
@mergify mergify bot merged commit 8830a6e into master Jun 1, 2024
74 checks passed
@mergify mergify bot deleted the warner/9392-fix-swingset-test-flake branch June 1, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake in SwingSet gc test
2 participants