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

fix(swingset): do not record GC syscalls in the transcript #3148

Merged
merged 1 commit into from
May 21, 2021

Conversation

warner
Copy link
Member

@warner warner commented 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
refs #3106

@warner warner added the SwingSet package: SwingSet label May 21, 2021
@warner warner added this to the Testnet: Stress Test Phase milestone May 21, 2021
@warner warner requested a review from FUDCo May 21, 2021 08:36
@warner warner self-assigned this May 21, 2021
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the minor naming nit (which you can make a judgement call on) this looks fine.

@@ -26,7 +26,13 @@ export function makeTranscriptManager(
};
}

const gcSyscalls = new Set(['dropImports', 'retireImports', 'retireExports']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd label this unrecordedSyscalls or something like that. Today it's GC but conceivably in the future there could be other things that fall into this category.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but I think it's slightly more likely to move a different direction: we don't record them during the initial execution, but we still collect something about them during replay (to deal with possible early dropImports). So "unrecorded" won't quite capture it.. the code on the if X.include(syscallType) side will want to recognize GC syscalls and do something special with them, record/not-record/collect. So my hunch is that we'll continue to mark this particular set as "GC syscalls", but the mapping (or not) of "GC syscall" to "don't record" will be made explicit at the point of use.

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 warner enabled auto-merge (rebase) May 21, 2021 20:33
@warner warner merged commit d18ddf5 into master May 21, 2021
@warner warner deleted the 3146-no-gc-transcript branch May 21, 2021 20:46
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

Successfully merging this pull request may close these issues.

do not record GC syscalls in transcript
2 participants