From nobody Fri May 3 12:53:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490093435277367.99537011158554; Tue, 21 Mar 2017 03:50:35 -0700 (PDT) Received: from localhost ([::1]:38663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqHN3-0005W7-P0 for importer@patchew.org; Tue, 21 Mar 2017 06:50:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqHMZ-0005Ug-9t for qemu-devel@nongnu.org; Tue, 21 Mar 2017 06:50:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqHMV-0007pp-9T for qemu-devel@nongnu.org; Tue, 21 Mar 2017 06:50:03 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:34444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqHMV-0007pI-1Z for qemu-devel@nongnu.org; Tue, 21 Mar 2017 06:49:59 -0400 Received: by mail-wr0-x243.google.com with SMTP id u48so21916228wrc.1 for ; Tue, 21 Mar 2017 03:49:58 -0700 (PDT) Received: from bark.daynix ([141.226.163.173]) by smtp.gmail.com with ESMTPSA id l138sm17169935wmd.7.2017.03.21.03.49.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Mar 2017 03:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=GjJbHIPBkbrkenVrB/cKnPOfLCoxfhagKgmPsXdkLLs=; b=lwrjUjX8O7IqOFBV5X+Zy2INHR0eYLJUV+B5ppBcI/pu3AxkU/CKRAVGTtdVAqtq49 pgPmHTdtBgvodLKYN7BUajgWPrOMUeD98k55uCIeNn/lU1PP8fd6tIwSN4dgjJS4WL4w jnfpgpqFwiyrAFe+jRU+bYaUjbJEz9AjwL/yi+aiZ5v4UQ0zNTKHw/XxzV9//bcBnuqA sx9b+regSPrJ6GAqucXIgey+I28HdpnvXd+ySI+QnnuM3KohXaqfgv0FtXvE+8Uy1YCb OHhR/twSkv3IGih0lBxVN7HSsB9hcbIEpFAxtiJgeYbeAjO5vfUzVkcfAvRsbQNXQirt a/2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GjJbHIPBkbrkenVrB/cKnPOfLCoxfhagKgmPsXdkLLs=; b=Vl4xKhvGkM6ZDCK+8qOhtyIl3zOErH+OnLr527HkMvTWUHXajBHKtUJtdwoks8SU6T L1VgpePp/Ij/+b8A0xwcDjsy4RLSj8L8MC6sHi04TEgVxNmzRsaaciJ6H7RBjs1EDnbC MYDbqXDz29BXfdcd2LSlspheW/689WSPHUrpxJ1njmTSmZMD4F8G6EySm+pBLJX6lt5Z m4pnqrsV771PfuGlEu5PYhP3N6h3/rrCUJLao0D+SpTee05y/2+Hcl6gAPPUSgmW/sMl n3DQPwQMdmGx1151EeJRTR5xQozl040d37h3oLN/SgdP3S1Bbh6UPIkYpHjhhawxF/I+ Lq1g== X-Gm-Message-State: AFeK/H1ogW0V+05ed3adsvNgpVrDlBomFdwKyjRyzN/Kvr2P9znFXI0Bi3gOuY/wP1BVlw== X-Received: by 10.223.182.133 with SMTP id j5mr33650128wre.19.1490093397718; Tue, 21 Mar 2017 03:49:57 -0700 (PDT) From: Sameeh Jubran To: qemu-devel@nongnu.org, Michael Roth Date: Tue, 21 Mar 2017 12:49:52 +0200 Message-Id: <20170321104952.6236-1-sameeh@daynix.com> X-Mailer: git-send-email 2.9.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH] Fix Event Viewer errors caused by qemu-ga X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When the command "guest-fsfreeze-freeze" is executed it causes the VSS service to log the errors below in the Event Viewer. These errors are caused by two issues in the function "CommitSnapshots" in provider.cpp: 1. When VSS_TIMEOUT_MSEC expires the funtion returns E_ABORT. This causes the error #12293. 2. The VSS_TIMEOUT_MSEC value is too big. According to msdn the "Flush & Hold" operation has 10 seconds timeout not configurable, The "CommitSnapshots" is a part of the "Flush & Hold" process and thus any timeout bigger than 10 seconds would cause the error #12298 and anything bigger than 40 seconds causes the error #12340. All this info can be found = here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa384589(v=3Dvs.85= ).aspx |event id| error | * 12293 : Volume Shadow Copy Service error: Error calling a routine on a Shadow Copy Provider {00000000-0000-0000-0000-000000000000}. Routine details CommitSnapshots [hr =3D 0x80004004, Operation aborted. * 12340 : Volume Shadow Copy Error: VSS waited more than 40 seconds for all volumes to be flushed. This caused volume \\?\Volume{62a171da-32ec-11e4-80b1-806e6f6e6963}\ to timeout while waiting for the release-writes phase of shadow copy creation. Trying again when disk activity is lower may solve this problem. * 12298 : Volume Shadow Copy Service error: The I/O writes cannot be held during the shadow copy creation period on volume \\?\Volume{62a171d9-32ec-11e4-80b1-806e6f6e6963}\. The volume index in the shadow copy set is 0. Error details: Open[0x00000000, The operation completed successfully. ], Flush[0x00000000, The operation completed successfully.], Release[0x00000000, The operation completed successfully.], OnRun[0x80042314, The shadow copy provider timed out while holding writes to the volume being shadow copied. This is probably due to excessive activity on the volume by an application or a system service. Try again later when activity on the volume is reduced. Signed-off-by: Sameeh Jubran --- qga/vss-win32/provider.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index ef94669..d72f4d4 100644 --- a/qga/vss-win32/provider.cpp +++ b/qga/vss-win32/provider.cpp @@ -15,7 +15,7 @@ #include #include =20 -#define VSS_TIMEOUT_MSEC (60*1000) +#define VSS_TIMEOUT_MSEC (9 * 1000) =20 static long g_nComObjsInUse; HINSTANCE g_hinstDll; @@ -377,7 +377,6 @@ STDMETHODIMP CQGAVssProvider::CommitSnapshots(VSS_ID Sn= apshotSetId) if (WaitForSingleObject(hEventThaw, VSS_TIMEOUT_MSEC) !=3D WAIT_OBJECT= _0) { /* Send event to qemu-ga to notify the provider is timed out */ SetEvent(hEventTimeout); - hr =3D E_ABORT; } =20 CloseHandle(hEventThaw); --=20 2.9.3