-
Notifications
You must be signed in to change notification settings - Fork 574
Do not use pretty print for checkpoints as it might cause stack overflow #17167
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
base: compatible
Are you sure you want to change the base?
Conversation
!ci-build-me |
!ci-build-me |
src/app/replayer/replayer.ml
Outdated
@@ -604,7 +604,7 @@ let write_replayer_checkpoint ~logger ~ledger ~last_global_slot_since_genesis | |||
let%map input = | |||
create_replayer_checkpoint ~ledger ~start_slot_since_genesis | |||
in | |||
input_to_yojson input |> Yojson.Safe.pretty_to_string | |||
input_to_yojson input |> Yojson.Safe.to_string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How large is the json output? Do we need it at all, now it is non-pretty, but maybe it's worth dropping right away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need it as it's dumping checkpoint which is used then for next replayer execution in next run. The same goes for replayer output file. It is quite large for mainnet at it contains all accounts state at given slot. We didn't experience issues on different network.
We have There's also |
Unfortunately it's not about logging at all, but dumping json for next usage. We either dumping a checkpoint file for next replayer run or we are saving output file with final result both are treated as artifacts not log output |
!ci-build-me |
!ci-nightly-me |
!ci-build-me |
When running replayer on mainnet archive we often receive stack overflow panic like below:
My least invasive solution is to skip pretty print on replayer checkpoints and output files