Skip to content

A vat restarted after a syscall outside a delivery reuses the promise and object IDs it had given out #1328

Backlog

Description

@sirtimid

Liveslots writes its ID counters to the vatstore only at the end of a delivery (afterDispatchActions calls vrm.flushIDCounters()), and the kernel stores a vat's vatstore writes from the delivery's reply. A send or resolve the vat makes outside a delivery, from a timer or a fetch callback, allocates p+N or o+N and the kernel adds it to the vat's c-list, but the counter that produced it is not stored until the vat's next delivery ends.

If the vat is restarted before then, VatManager.performVatRestart keeps the c-list and the vatstore, so the new incarnation starts from the older counter and allocates the same p+N for an unrelated promise. On main the kernel takes it for the old kernel promise, so the new send's answer and the old one's are crossed. With #1325 the send is refused if the old promise has been delivered or settled, which is an illegal syscall for a vat that did nothing wrong. Exported objects reuse IDs the same way.

SwingSet has no syscalls outside a delivery, so its counters and c-list always commit together.

Proposal: none settled. The kernel could drop, at a restart, the c-list exports made since the vat's last stored delivery, or the supervisor could send the vatstore writes made outside a delivery along with the late syscall.

Traced by reading in the review of #1325; not reproduced.

Activity

  1. added
    bug
    area: vats
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: vatsbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions