Skip to content

manage: new bail code, remove traps if discarding cold state#974

Open
dozreg-toplud wants to merge 2 commits intodevelopfrom
dozreg/trace-bunt-mean
Open

manage: new bail code, remove traps if discarding cold state#974
dozreg-toplud wants to merge 2 commits intodevelopfrom
dozreg/trace-bunt-mean

Conversation

@dozreg-toplud
Copy link
Contributor

In #940 we prevented promoting potentially incorrect HAMTs by discarding them on non-deterministic errors. Recently @yosoyubik noticed that failing migrations spin forever without printing the trace.

We found out that the issue was caused by the (trap tank) nouns in the stacktrace: these thunks outlived the cold state that was nececcary to run them, causing +mook to spin forever.

This PR addresses two issues:

  1. There was not enough granularity between "This is a nondeterministic error that happened on the current road" vs "This is a nondeterministic error caused by a child road". In the former case the road's datastructures might be incorrect, while in the latter the datastructures should be fine. This PR adds code 5 that represents the latter. On 5 we rebail with the same code, just like it worked previously with 3. On 3 we rebail with 5, discarding the road state.
  2. When we bail with 3 we replace [%mean (trap tank)] elements of the stack trace with [%mean '####']. We do the same with the innermost road when we unwind the road stack on an incoming signal. That way we won't later run computations that will require the cold state that we discarded.

@dozreg-toplud dozreg-toplud requested a review from a team as a code owner March 2, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant