From 89e0dfae111e0365fdcbf7a65ecafa60580ee8b0 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Mon, 6 May 2019 18:01:05 +0800 Subject: [PATCH] qemu: stop qemu process when virtiofsd quits If virtiofsd fails to initialize and stops unexpected, qemu might hang forever. We just stop the qemu process. Resource cleanup will be done by others. Fixes: #1690 Signed-off-by: Peng Tao --- virtcontainers/qemu.go | 1 + 1 file changed, 1 insertion(+) diff --git a/virtcontainers/qemu.go b/virtcontainers/qemu.go index 2d0ffe418..9edafcb08 100644 --- a/virtcontainers/qemu.go +++ b/virtcontainers/qemu.go @@ -645,6 +645,7 @@ func (q *qemu) startSandbox(timeout int) error { } } q.Logger().Info("virtiofsd quits") + q.stopSandbox() }() timeoutDuration := time.Duration(timeout) * time.Second select {