[PATCH] bhyve: handle unexpected signal exits
The bhyve monitor currently handles signal exits only when they produce a core dump or are caused by SIGTERM. Since SIGKILL never produces a core dump, a bhyve process killed with SIGKILL remains reported as running. Treat every signal exit except SIGTERM as a crash so that the domain is stopped and its resources are cleaned up properly. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index 8e481b17aa..8740c856a8 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -161,7 +161,7 @@ bhyveMonitorIO(int watch, int kq, int events G_GNUC_UNUSED, void *opaque) shutdownBySignal = WIFSIGNALED(status) && WTERMSIG(status) == SIGTERM; - if (WIFSIGNALED(status) && WCOREDUMP(status)) { + if (WIFSIGNALED(status) && !shutdownBySignal) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Guest %1$s got signal %2$d and crashed"), name, WTERMSIG(status)); -- 2.56.0
On Tue, Nov 10, 2026 at 07:13:58PM +0100, Roman Bogorodskiy wrote:
The bhyve monitor currently handles signal exits only when they produce a core dump or are caused by SIGTERM. Since SIGKILL never produces a core dump, a bhyve process killed with SIGKILL remains reported as running.
Treat every signal exit except SIGTERM as a crash so that the domain is stopped and its resources are cleaned up properly.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
participants (2)
-
Daniel P. Berrangé -
Roman Bogorodskiy