Skip to content

Commit

Permalink
fix(swingset): log vat termination and upgrade better (#9535)
Browse files Browse the repository at this point in the history
Vat termination now makes the kernel do a console.log like:

 `kernel terminating vat v6 (failure=true)`

Vat upgrade now announces the start of the upgrade process with:

 `attempting to upgrade vat v6 from incarnation 0 to source b1-..`

in addition to announcing the success or failure of the upgrade

 `vat v6 upgraded from incarnation 0 to 1 with source b1-..`
 or
 `WARNING: vat v6 failed to upgrade from incarnation 0 (startVat)`
  • Loading branch information
warner committed Jun 19, 2024
1 parent c244e96 commit 989aa19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/SwingSet/src/kernel/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export default function buildKernel(
* @param {SwingSetCapData} info
*/
async function terminateVat(vatID, shouldReject, info) {
console.log(`kernel terminating vat ${vatID} (failure=${shouldReject})`);
const vatKeeper = kernelKeeper.provideVatKeeper(vatID);
const critical = vatKeeper.getOptions().critical;
insistCapData(info);
Expand Down Expand Up @@ -819,6 +820,10 @@ export default function buildKernel(
);
const disconnectionCapData = kser(disconnectionObject);

console.log(
`attempting to upgrade vat ${vatID} from incarnation ${oldIncarnation} to source ${bundleID}`,
);

/**
* Terminate the vat and translate internal-delivery results into
* abort-without-termination results for the upgrade delivery.
Expand Down

0 comments on commit 989aa19

Please sign in to comment.