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

add test for retiring unreachable abandoned non-durables #9875

Open
warner opened this issue Aug 11, 2024 · 0 comments
Open

add test for retiring unreachable abandoned non-durables #9875

warner opened this issue Aug 11, 2024 · 0 comments
Assignees
Labels
SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented Aug 11, 2024

I'm adding more tests to exercise the full set of states (to be named gc-kernel-orphan.test), which are currently failing for both syscall.abandonExports() and terminateVat(), happening either before or after an importing vat uses syscall.dropImports() to drop down to the merely-recognizable state. My new test is not exercising the upgrade/abandon-non-durables case.

Originally posted by @warner in #7212 (comment)

We need a test that will:

  • create a vat
  • have it make some merely-virtual (non-durable) objects
  • export that object to a second vat, which adds it to a WeakStore, and then drops the Representative
  • wait for the GC dropImports to make it back to the first vat, leaving the object in the "recognized but unreachable" state
  • now upgrade the first vat
  • the kernel ought to retire the merely-virtual object on behalf of the upgraded vat
  • the second vat should receive a dispatch.retireImports

The new test wants to go into gc-kernel-orphan.test, but it can't use the existing framework because that framework uses createTestVat, and we can't upgrade such vats, and we need to upgrade the vat so we can trigger the abandon-non-durable code in processVatUpgrade.

So we'll need a new framework that creates a pair of static vats or something. The createTestVat approach was convenient because we can snoop on the deliveries and syscalls very directly (no bundles or extra Compartments involved). So the alternative will probably involve vatPowers.testLog.

@warner warner added the SwingSet package: SwingSet label Aug 11, 2024
@warner warner self-assigned this Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

1 participant