diff --git a/libvirt.spec b/libvirt.spec index 7ba8240b25983e58d12a3e496ff676781e4dc178..0bde8c592e4c2539cee8e8cd1cb17070db9fb23c 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %define arches_qemu_kvm x86_64 aarch64 loongarch64 @@ -167,6 +167,7 @@ Patch0002: Config-some-capabilities-for-loongarch-virt-machine.patch Patch0003: Implement-the-method-of-getting-host-info-for-loonga.patch Patch0004: Add-bios-path-for-loongarch.patch Patch0005: 0005-fix-crash-in-qemuSaveImageDecompressionStart.patch +Patch0006: qemuProcessStartWithMemoryState-Don-t-start-qemu-wit.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -2144,6 +2145,9 @@ exit 0 %changelog +* Wed Jan 31 2024 Xianglai Li - 9.9.0-3 +- Don't start qemu with '-loadvm SNAP' and '-incoming defer' together + * Fri Jan 19 2024 Chang Gao - 9.9.0-2 - Fix crash when revert snapshot diff --git a/qemuProcessStartWithMemoryState-Don-t-start-qemu-wit.patch b/qemuProcessStartWithMemoryState-Don-t-start-qemu-wit.patch new file mode 100644 index 0000000000000000000000000000000000000000..2eb9ec0c0d07e3d4981cdb9886ebd6bed8e91eb9 --- /dev/null +++ b/qemuProcessStartWithMemoryState-Don-t-start-qemu-wit.patch @@ -0,0 +1,55 @@ +From f227f52227ab31d5e588b9921259d0437a6dd483 Mon Sep 17 00:00:00 2001 +From: Peter Krempa +Date: Fri, 1 Dec 2023 10:28:48 +0100 +Subject: [PATCH] qemuProcessStartWithMemoryState: Don't start qemu with + '-loadvm SNAP' and '-incoming defer' together + +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 +Reviewed-by: Pavel Hrdina +Signed-off-by: Xianglai Li +Signed-off-by: xianglai li +--- + 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 b9267d8..c486b0b 100644 +--- a/src/qemu/qemu_process.c ++++ b/src/qemu/qemu_process.c +@@ -8195,6 +8195,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) { +@@ -8206,6 +8207,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 +@@ -8219,7 +8222,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.27.0 +