robur-coop / miou

A simple scheduler for OCaml 5

Home Page:https://docs.osau.re/miou/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Propagate nicely exceptions from domains

dinosaure opened this issue · comments

Currently, if a domain has an exception, it just shows the error and never terminate as we can see here:

miou/lib/miou.ml

Lines 1039 to 1047 in 0560a14

with
| Exit ->
pool.domains_counter <- pool.domains_counter - 1;
Condition.signal pool.condition_all_idle;
Mutex.unlock pool.mutex
| exn ->
Logs.err (fun m ->
m "[%a] Got an unexpected error: %S" Domain_uid.pp domain.uid
(Printexc.to_string exn))

From an user perspective, it's a bit annoying because the application does not stop nicely: dom0 was not informed that a domain terminated with an exception and when it tries to kill them, it will await forever... So it should not difficult and very nice to propagate the exception to dom0 and terminate nicely the program.

Probably fixed by 506c6ff.