[PATCH for 9.9.0] qemuProcessStartWithMemoryState: Don't start qemu with '-loadvm SNAP' and '-incoming defer' together

Peter Krempa posted 1 patch 4 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/3b188fe08ac1593787bbe4f9796235048ae8f0d1.1701423688.git.pkrempa@redhat.com
src/qemu/qemu_process.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH for 9.9.0] qemuProcessStartWithMemoryState: Don't start qemu with '-loadvm SNAP' and '-incoming defer' together
Posted by Peter Krempa 4 months, 4 weeks ago
A bug in qemuProcessStartWithMemoryState caused that we would start qemu
with '-loadvm SNAP' and '-incoming defer' together.  qemu doesn't expect
that and crashes on an assertion failure [1].

[1]: https://issues.redhat.com/browse/RHEL-16782

Fixes: 8a88d3e5860881f430e528d3e5e8d6455ded4d1d
Resolves: https://issues.redhat.com/browse/RHEL-17841
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_process.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f32e82bbd1..fc05b4b24f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8196,6 +8196,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
     VIR_AUTOCLOSE intermediatefd = -1;
     g_autoptr(virCommand) cmd = NULL;
     g_autofree char *errbuf = NULL;
+    const char *migrateFrom = NULL;
     int rc = 0;

     if (data) {
@@ -8207,6 +8208,8 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
                                             &errbuf, &cmd) < 0) {
             return -1;
         }
+
+        migrateFrom = "stdio";
     }

     /* No cookie means libvirt which saved the domain was too old to mess up
@@ -8220,7 +8223,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
         priv->disableSlirp = true;

     if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL,
-                         asyncJob, "stdio", *fd, path, snapshot,
+                         asyncJob, migrateFrom, *fd, path, snapshot,
                          VIR_NETDEV_VPORT_PROFILE_OP_RESTORE,
                          start_flags) == 0)
         *started = true;
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH for 9.9.0] qemuProcessStartWithMemoryState: Don't start qemu with '-loadvm SNAP' and '-incoming defer' together
Posted by Pavel Hrdina 4 months, 4 weeks ago
On Fri, Dec 01, 2023 at 10:41:59AM +0100, Peter Krempa wrote:
> A bug in qemuProcessStartWithMemoryState caused that we would start qemu
> with '-loadvm SNAP' and '-incoming defer' together.  qemu doesn't expect
> that and crashes on an assertion failure [1].
> 
> [1]: https://issues.redhat.com/browse/RHEL-16782
> 
> Fixes: 8a88d3e5860881f430e528d3e5e8d6455ded4d1d
> Resolves: https://issues.redhat.com/browse/RHEL-17841
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  src/qemu/qemu_process.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org