If an OOM happens in the engine, it seems like OCaml just exits with 1 with no error message at all.
That's an issue because that's probably a specific phase that crashed. We want to have information about that phase.
Possible solutions:
https://ocaml.org/manual/5.2/api/Stdlib.htmlat_exit, hook something to catch an error (we could register a callback when running a phase only, or just deregister the callback when exiting normally)
detect exit one in the Rust cli, and display a message saying that's probably an OOM, and re-run with --stats to get an idea of what phase failed
If an OOM happens in the engine, it seems like OCaml just exits with
1
with no error message at all.That's an issue because that's probably a specific phase that crashed. We want to have information about that phase.
Possible solutions:
at_exit
, hook something to catch an error (we could register a callback when running a phase only, or just deregister the callback when exiting normally)--stats
to get an idea of what phase failed