-
Notifications
You must be signed in to change notification settings - Fork 214
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
have the kernel abandon non-durable vat exports during upgrade, not stopVat
#6696
Comments
I have a partial branch for this in https://github.com/Agoric/agoric-sdk/tree/6696-kernel-abandons-nondurables . It lays the groundwork, but is not complete. The added comments (both in the code, and the commit comments) enumerate the remaining work. The trickiest part code part is to refactor kernel.js and vat-loader to make the VatSyscallHandler available to kernel.js so that The trickiest conceptual part is whether we need to care about the difference between reachable and recognizable exports. It's possible that we can abandon either form identically, and the kernel-side GC code will take care of both. I don't remember if we have a test for this. The test would prepare one export that is held strongly by a downstream vat (so the export-side c-list entry is marked as "R" for Reachable), then the upstream vat does a |
What is the Problem Being Solved?
As listed in #6650, during vat upgrade, one of the last remaining responsiblities of the old vat's
stopVat
call has been to abandon all non-durable exports. We need to abandon these here, because clients may still have imports that refer to them (Presences), but the implementation of these objects will not be available after the upgrade (not being durable). By callingsyscall.abandonExport()
on the vrefs, the old vat is telling the kernel to treat those objects as unowned by any vat. They retain their identity, and refcounts will keep the kref alive as usual, but any attempt to send them a message will result in an error being generated by the kernel (aka "message goes splat"), and the objects will be removed from the old exporting vat's c-list.The task is to move this responsibility into the kernel. During
processUpgradeVat
, the kernel will enumerate the upgraded vat's c-list for all non-durable exports (which, after #6695,will be the set of kvStore keys fromedit: durables are${vatID}.o+/
through${vatID}.o+e
o+d..
, so I think non-durables areo+/
-o+:
, pluso+v
-o+v:
). For each one, it will do the same thing assyscall.abandonExports
(currently implemented inkernelSyscall.js
): akernelKeeper.orphanKernelObject(koid, vatID)
. It must also delete the c-list entry (currently performed invatTranslator.js
in thetranslateAbandonExports()
function).Simultaneously, we should remove the
abandonExports()
call fromsrc/liveslots/stop-vat.js
.Description of the Design
Security Considerations
Test Plan
The text was updated successfully, but these errors were encountered: