diff mbox series

[6/6] qga: Cancel async snapshot before abort

Message ID 20231025140058.113376-7-alexander.ivanov@virtuozzo.com (mailing list archive)
State New, archived
Headers show
Series qga: Assorted patches, let us discuss | expand

Commit Message

Alexander Ivanov Oct. 25, 2023, 2 p.m. UTC
VSS requestor calls abort after the timeout of the backup operation
expires. In the result later the process hangs on some internal VSS
lock. Cancel async snapshot before abort.

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 qga/vss-win32/requester.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Konstantin Kostiuk Oct. 26, 2023, 8:47 a.m. UTC | #1
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Wed, Oct 25, 2023 at 5:01 PM Alexander Ivanov <
alexander.ivanov@virtuozzo.com> wrote:

> VSS requestor calls abort after the timeout of the backup operation
> expires. In the result later the process hangs on some internal VSS
> lock. Cancel async snapshot before abort.
>
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
> ---
>  qga/vss-win32/requester.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 9884c65e70..20680a42a1 100644
> --- a/qga/vss-win32/requester.cpp
> +++ b/qga/vss-win32/requester.cpp
> @@ -533,6 +533,7 @@ void requester_freeze(int *num_vols, void
> *mountpoints, ErrorSet *errset)
>      }
>
>      if (wait_status != WAIT_OBJECT_0) {
> +        vss_ctx.pAsyncSnapshot->Cancel();
>          err_set(errset, E_FAIL,
>                  "couldn't receive Frozen event from VSS provider");
>          goto out;
> --
> 2.34.1
>
>
Konstantin Kostiuk Oct. 26, 2023, 9:17 a.m. UTC | #2
On Wed, Oct 25, 2023 at 5:01 PM Alexander Ivanov <
alexander.ivanov@virtuozzo.com> wrote:

> VSS requestor calls abort after the timeout of the backup operation
> expires. In the result later the process hangs on some internal VSS
> lock. Cancel async snapshot before abort.
>

Can you share some information on how to reproduce this issue?


>
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
> ---
>  qga/vss-win32/requester.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 9884c65e70..20680a42a1 100644
> --- a/qga/vss-win32/requester.cpp
> +++ b/qga/vss-win32/requester.cpp
> @@ -533,6 +533,7 @@ void requester_freeze(int *num_vols, void
> *mountpoints, ErrorSet *errset)
>      }
>
>      if (wait_status != WAIT_OBJECT_0) {
> +        vss_ctx.pAsyncSnapshot->Cancel();
>          err_set(errset, E_FAIL,
>                  "couldn't receive Frozen event from VSS provider");
>          goto out;
> --
> 2.34.1
>
>
diff mbox series

Patch

diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 9884c65e70..20680a42a1 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -533,6 +533,7 @@  void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
     }
 
     if (wait_status != WAIT_OBJECT_0) {
+        vss_ctx.pAsyncSnapshot->Cancel();
         err_set(errset, E_FAIL,
                 "couldn't receive Frozen event from VSS provider");
         goto out;