From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Chen Hanxiao <chenhanxiao@gmail.com>,
Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Subject: [Qemu-devel] [PULL 1/4] qga-win: don't hang if vss hold writes timeout
Date: Thu, 26 Oct 2017 20:18:46 -0500 [thread overview]
Message-ID: <20171027011849.29195-2-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171027011849.29195-1-mdroth@linux.vnet.ibm.com>
From: Chen Hanxiao <chenhanxiao@gmail.com>
When VM is in a heavy IO, if the command "guest-fsfreeze-freeze"
is executed, VSS may timeout when trying to hold writes.
Inside guest, Event ID 12298(VSS_ERROR_HOLD_WRITES_TIMEOUT)
is logged in the Event Viewer.
At that time, if we call AbortBackup, qga may hang forever.
This patch will solve this issue.
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
qga/vss-win32/requester.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 301762d8b1..3d9c9716c0 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -419,6 +419,16 @@ void requester_freeze(int *num_vols, ErrorSet *errset)
break;
}
}
+
+ if (wait_status == WAIT_TIMEOUT) {
+ err_set(errset, E_FAIL,
+ "timeout when try to receive Frozen event from VSS provider");
+ /* If we are here, VSS had timeout.
+ * Don't call AbortBackup, just return directly.
+ */
+ goto out1;
+ }
+
if (wait_status != WAIT_OBJECT_0) {
err_set(errset, E_FAIL,
"couldn't receive Frozen event from VSS provider");
@@ -432,6 +442,8 @@ out:
if (vss_ctx.pVssbc) {
vss_ctx.pVssbc->AbortBackup();
}
+
+out1:
requester_cleanup();
CoUninitialize();
}
--
2.11.0
next prev parent reply other threads:[~2017-10-27 1:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 1:18 [Qemu-devel] [PULL 0/4] qemu-ga patch queue Michael Roth
2017-10-27 1:18 ` Michael Roth [this message]
2017-10-27 1:18 ` [Qemu-devel] [PULL 2/4] qga-win: Updating guest_set_time action Michael Roth
2017-10-27 1:18 ` [Qemu-devel] [PULL 3/4] qga: add network stats to guest-network-get-interfaces Michael Roth
2017-10-27 1:18 ` [Qemu-devel] [PULL 4/4] qga-win: fix error-handling in getNameByStringSID() Michael Roth
2017-10-30 9:47 ` [Qemu-devel] [PULL 0/4] qemu-ga patch queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171027011849.29195-2-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=chenhanxiao@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=tomoki.sekiyama@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).