Description
Currently, it is not possible to interrupt or cancel execution if the guest is calling a host function. This means that, if the host function hangs, then the call will never return or get cancelled. This gets surfaced, like so:
One possible solution
When running with the seccomp feature on, host functions are wrapped in their own thread like so:
hyperlight/src/hyperlight_host/src/sandbox/host_funcs.rs
Lines 208 to 228 in b9c67fb
You could leverage these threads to cancel execution in the same way we cancel execution in the guest:
hyperlight/src/hyperlight_host/src/hypervisor/hypervisor_handler.rs
Lines 729 to 762 in b9c67fb
Though, this would mean always wrapping host function calls with an extra thread and that might be naive in terms of perf.
Metadata
Metadata
Assignees
Type
Projects
Status