aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2022-04-26 15:51:57 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-04-26 17:03:20 -0400
commitc21e22e8e6014babe3ad3c930ee37e17ef4787a1 (patch)
tree555ac0c17cf1f6a19f94103860dcbf5013228228
parent63b026b6245234ac0200e32b03800aa0ca9e261d (diff)
downloadmeta-virtualization-c21e22e8e6014babe3ad3c930ee37e17ef4787a1.tar.gz
meta-virtualization-c21e22e8e6014babe3ad3c930ee37e17ef4787a1.tar.bz2
meta-virtualization-c21e22e8e6014babe3ad3c930ee37e17ef4787a1.zip
libvirt: Fix error on undefining domain and segfault on libvirt_driver_qemu.so
Backport a patch to fix segfault when undefining virtual machines. virsh undefine vm rpc-libvirtd[9725]: segfault at 18 ip 00007f8b0a5f17a9 sp 00007f8b3f8cbb60 error 4 in libvirt_driver_qemu.so[7f8b0a56e000+113000] error: Code: a4 01 0f 84 89 03 00 00 4c 89 ff e8 d1 ed f7 ff 85 c0 0f 88 b9 02 00 00 48 8b 45 b8 48 8b b0 80 00 00 00 48 8b 86 b0 02 00 00 <48> 8b 78 18 48 85 ff 0f 84 42 01 00 00 e8 b5 02 f8 ff 48 89 45 c0 Disconnected from qemu:///system due to end of file error: Failed to undefine domain 'vm' error: End of file while reading data: Input/output error Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/libvirt/libvirt/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch52
-rw-r--r--recipes-extended/libvirt/libvirt_8.1.0.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch b/recipes-extended/libvirt/libvirt/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch
new file mode 100644
index 0000000..85870e0
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch
@@ -0,0 +1,52 @@
+From 823a62ec8aac4fb75e6e281164f3eb56ae47597c Mon Sep 17 00:00:00 2001
+From: Boris Fiuczynski <fiuczy@linux.ibm.com>
+Date: Tue, 1 Mar 2022 18:47:59 +0100
+Subject: [PATCH] qemu: segmentation fault in virtqemud executing
+ qemuDomainUndefineFlags
+
+Commit 5adfb3472342741c443ac91dee0abb18b5a3d038 causes a segmentation fault.
+
+Stack trace of thread 664419:
+ #0 0x000003ff62ec553c in qemuDomainUndefineFlags (dom=0x3ff6c002810, flags=<optimized out>) at ../src/qemu/qemu_driver.c:6618
+ #1 0x000003ff876a7e5c in virDomainUndefineFlags (domain=domain@entry=0x3ff6c002810, flags=<optimized out>) at ../src/libvirt-domain.c:6519
+ #2 0x000002aa2b64a808 in remoteDispatchDomainUndefineFlags (server=0x2aa2c3d7880, msg=0x2aa2c3d2770, args=<optimized out>, rerr=0x3ff8287b950, client=<optimized out>)
+ at src/remote/remote_daemon_dispatch_stubs.h:13080
+ #3 remoteDispatchDomainUndefineFlagsHelper (server=0x2aa2c3d7880, client=<optimized out>, msg=0x2aa2c3d2770, rerr=0x3ff8287b950, args=<optimized out>, ret=0x0)
+ at src/remote/remote_daemon_dispatch_stubs.h:13059
+ #4 0x000003ff8758bbf4 in virNetServerProgramDispatchCall (msg=0x2aa2c3d2770, client=0x2aa2c3e3050, server=0x2aa2c3d7880, prog=0x2aa2c3d8010)
+ at ../src/rpc/virnetserverprogram.c:428
+ #5 virNetServerProgramDispatch (prog=0x2aa2c3d8010, server=server@entry=0x2aa2c3d7880, client=0x2aa2c3e3050, msg=0x2aa2c3d2770) at ../src/rpc/virnetserverprogram.c:302
+ #6 0x000003ff8758c260 in virNetServerProcessMsg (msg=<optimized out>, prog=<optimized out>, client=<optimized out>, srv=0x2aa2c3d7880) at ../src/rpc/virnetserver.c:140
+ #7 virNetServerHandleJob (jobOpaque=0x2aa2c3e2d30, opaque=0x2aa2c3d7880) at ../src/rpc/virnetserver.c:160
+ #8 0x000003ff874c49aa in virThreadPoolWorker (opaque=<optimized out>) at ../src/util/virthreadpool.c:164
+ #9 0x000003ff874c3f62 in virThreadHelper (data=<optimized out>) at ../src/util/virthread.c:256
+ #10 0x000003ff86c1cf8c in start_thread () from /lib64/libc.so.6
+ #11 0x000003ff86c9650e in thread_start () from /lib64/libc.so.6
+
+Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
+Reviewed-by: Jim Fehlig <jfehlig@suse.com>
+Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
+
+Upstream-Status: Backport [823a62ec8aac4fb75e6e281164f3eb56ae47597c]
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ src/qemu/qemu_driver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
+index bcd9bdb436..8337eed510 100644
+--- a/src/qemu/qemu_driver.c
++++ b/src/qemu/qemu_driver.c
+@@ -6615,7 +6615,7 @@ qemuDomainUndefineFlags(virDomainPtr dom,
+ }
+ }
+
+- if (vm->def->os.loader->nvram) {
++ if (vm->def->os.loader && vm->def->os.loader->nvram) {
+ nvram_path = g_strdup(vm->def->os.loader->nvram);
+ } else if (vm->def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) {
+ qemuDomainNVRAMPathFormat(cfg, vm->def, &nvram_path);
+--
+2.25.1
+
diff --git a/recipes-extended/libvirt/libvirt_8.1.0.bb b/recipes-extended/libvirt/libvirt_8.1.0.bb
index 61b7a44..f8deba4 100644
--- a/recipes-extended/libvirt/libvirt_8.1.0.bb
+++ b/recipes-extended/libvirt/libvirt_8.1.0.bb
@@ -28,6 +28,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \
file://dnsmasq.conf \
file://hook_support.py \
file://gnutls-helper.py \
+ file://0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch \
"
SRC_URI[libvirt.sha256sum] = "3c6c43becffeb34a3f397c616206aa69a893ff8bf5e8208393c84e8e75352934"