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

do not record GC syscalls in transcript #3146

Closed
warner opened this issue May 21, 2021 · 0 comments · Fixed by #3148
Closed

do not record GC syscalls in transcript #3146

warner opened this issue May 21, 2021 · 0 comments · Fixed by #3148
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented May 21, 2021

What is the Problem Being Solved?

When we're in non-consensus mode, we want to be tolerant of GC activity happening in different order (during vat transcript replay) from one kernel restart to the next. In consensus mode, we require that each replica and each restart sees the same set of GC operations in any given crank, but I think we want to be more tolerant in an ag-solo, or in a local replay (under Node.js, for debugging) of a transcript recorded on a chain fullnode (under XS).

part of #3106

Description of the Design

The simplest way to support this is to not record GC-related syscalls in the transcript, and to ignore them when doing a replay (the simulated syscalls is a no-op, instead of the usual "pop the next syscall record off the transcript and compare" test). This means GC-related syscalls cannot return data (good thing they don't), and cannot cause an "anachrophobia" error.

There is one consideration to make: in non-consensus mode, when doing a replay, the new execution might observe a GC transition earlier than the previous execution would have. This means the vat might emit a syscall.dropImport during replay that was not included in the transcript, which is fine, but that dropImport isn't going to happen a second time. So we need to watch the series of dropImports that happen during replay and compare them against the clist. If, at the end of replay, we've seen a dropImport for something that's still marked as "reachable" in the clist, that means we've witnessed this "earlier than the historical record" dropImports, and we need to process it. If we ignore it, we'll be keeping some object pinned in memory, maybe forever.

I'm going to defer this second part for a while, I don't think it will cause any problems in the near term.

Test Plan

Unit tests.

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels May 21, 2021
@warner warner self-assigned this May 21, 2021
warner added a commit that referenced this issue May 21, 2021
Consensus mode will depend upon GC being deterministic, but solo mode does
not. Solo mode requires GC be "sufficiently deterministic", which means a
finalizer may or may not run in any given crank.

To support this, we must not record the GC-related syscalls (dropImport,
retireImport, retireExport) in the transcript. When replaying a transcript,
we ignore these syscalls as well.

closes #3146
refs #2615
refs #2660
refs #2724
warner added a commit that referenced this issue May 21, 2021
Consensus mode will depend upon GC being deterministic, but solo mode does
not. Solo mode requires GC be "sufficiently deterministic", which means a
finalizer may or may not run in any given crank.

To support this, we must not record the GC-related syscalls (dropImport,
retireImport, retireExport) in the transcript. When replaying a transcript,
we ignore these syscalls as well.

closes #3146
refs #2615
refs #2660
refs #2724
warner added a commit that referenced this issue May 21, 2021
Consensus mode will depend upon GC being deterministic, but solo mode does
not. Solo mode requires GC be "sufficiently deterministic", which means a
finalizer may or may not run in any given crank.

To support this, we must not record the GC-related syscalls (dropImport,
retireImport, retireExport) in the transcript. When replaying a transcript,
we ignore these syscalls as well.

closes #3146
refs #2615
refs #2660
refs #2724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant