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

Alexander Ivanov posted 6 patches 1 year, 1 month ago
Maintainers: Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>
[PATCH 6/6] qga: Cancel async snapshot before abort
Posted by Alexander Ivanov 1 year, 1 month ago
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
Re: [PATCH 6/6] qga: Cancel async snapshot before abort
Posted by Konstantin Kostiuk 1 year, 1 month ago
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
>
>
Re: [PATCH 6/6] qga: Cancel async snapshot before abort
Posted by Konstantin Kostiuk 1 year, 1 month ago
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
>
>