From c563b455e3bb0cebfbe2a77c8d5ebac36aac3c76 Mon Sep 17 00:00:00 2001
From: jikui <jikui2@huawei.com>
Date: Thu, 4 Nov 2021 19:58:33 +0800
Subject: [PATCH 1/8] kata-runtime: fix kata-runtime hungs when qemu process is
 D/T state

Signed-off-by: jikui <jikui2@huawei.com>
---
 src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go b/src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go
index 97e9245..325250d 100644
--- a/src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go
+++ b/src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go
@@ -717,6 +717,8 @@ func QMPStart(ctx context.Context, socket string, cfg QMPConfig, disconnectedCh
 		if q.version == nil {
 			return nil, nil, fmt.Errorf("failed to find QMP version information")
 		}
+	case <-time.After(15 * time.Second):
+		return nil, nil, fmt.Errorf("qmp start time out")
 	}
 
 	return q, q.version, nil
-- 
2.25.1

