Bug 1379218
Summary: | libvirtd crashes after qemu-attach in qemuDomainMachineIsPSeries | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dan Zheng <dzheng> | ||||||
Component: | libvirt | Assignee: | Andrea Bolognani <abologna> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 7.3 | CC: | abologna, dyuan, dzheng, gsun, jishao, mzhan, pkrempa, rbalakri | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | ppc64le | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | libvirt-3.9.0-1.el7 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2018-04-10 10:39:40 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1401400 | ||||||||
Attachments: |
|
Description
Dan Zheng
2016-09-26 05:11:17 UTC
The backtrace you've posted does not contain any hints of a crash. Please attach a proper one. Created attachment 1204777 [details]
log for the libvirtd crash
A less useless backtrace than the posted in the bug summary would help as well. (The above one does not contain any trheads that would execute anything even remotely linked to the crash) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x3ffface8f080 (LWP 68610)] __strcmp_power8 () at ../sysdeps/powerpc/powerpc64/power8/strcmp.S:49 49 ld r8,0(r3) (gdb) set logging on Copying output to gdb.txt. (gdb) t a a bt Thread 16 (Thread 0x3ffface8f080 (LWP 68610)): #0 __strcmp_power8 () at ../sysdeps/powerpc/powerpc64/power8/strcmp.S:49 #1 0x00003fff9b6e8d84 in qemuDomainMachineIsPSeries (def=<optimized out>) at qemu/qemu_domain.c:5246 #2 0x00003fff9b6d8804 in qemuParseCommandLineDisk (old_style_ceph_args=<optimized out>, nvirtiodisk=0, dom=<optimized out>, val=0x3fffa40015e0 "file=/var/lib/libvirt/images/RHEL-7.3-ppc64le-latest.qcow2,index=0", xmlopt=<optimized out>) at qemu/qemu_parse_command.c:657 #3 qemuParseCommandLine (caps=0x3fff601cd780, xmlopt=0x3fff601d01c0, progenv=0x3fffa4003d70, progargv=0x3fffa4000aa0, pidfile=0x3ffface8e1c0, monConfig=0x3ffface8e1b8, monJSON=0x3ffface8e1af) at qemu/qemu_parse_command.c:2279 #4 0x00003fff9b6dbfa8 in qemuParseCommandLinePid (caps=0x3fff601cd780, xmlopt=0x3fff601d01c0, pid=<optimized out>, pidfile=0x3ffface8e1c0, monConfig=0x3ffface8e1b8, monJSON=0x3ffface8e1af) at qemu/qemu_parse_command.c:2747 #5 0x00003fff9b75f754 in qemuDomainQemuAttach (conn=0x3fffa4000b10, pid_value=<optimized out>, flags=<optimized out>) at qemu/qemu_driver.c:15684 #6 0x00003fffb59a1334 in virDomainQemuAttach (conn=0x3fffa4000b10, pid_value=<optimized out>, flags=<optimized out>) at libvirt-qemu.c:154 #7 0x0000000021cddd30 in qemuDispatchDomainAttach (server=0x1001e060c70, msg=<optimized out>, ret=0x3fffa4001520, args=0x3fffa4001460, rerr=0x3ffface8e4a0, client=0x1001e0704b0) at qemu_dispatch.h:168 #8 qemuDispatchDomainAttachHelper (server=0x1001e060c70, client=0x1001e0704b0, msg=<optimized out>, rerr=0x3ffface8e4a0, args=0x3fffa4001460, ret=0x3fffa4001520) at qemu_dispatch.h:146 #9 0x00003fffb57baabc in virNetServerProgramDispatchCall (msg=0x1001e06f3b0, client=0x1001e0704b0, server=0x1001e060c70, prog=0x1001e069b10) at rpc/virnetserverprogram.c:437 #10 virNetServerProgramDispatch (prog=0x1001e069b10, server=0x1001e060c70, client=0x1001e0704b0, msg=0x1001e06f3b0) at rpc/virnetserverprogram.c:307 #11 0x0000000021cfa370 in virNetServerProcessMsg (msg=<optimized out>, prog=<optimized out>, client=<optimized out>, srv=0x1001e060c70) at rpc/virnetserver.c:148 #12 virNetServerHandleJob (jobOpaque=<optimized out>, opaque=0x1001e060c70) at rpc/virnetserver.c:169 #13 0x00003fffb5658b9c in virThreadPoolWorker (opaque=<optimized out>) at util/virthreadpool.c:167 #14 0x00003fffb565759c in virThreadHelper (data=<optimized out>) at util/virthread.c:206 #15 0x00003fffb4c68728 in start_thread (arg=0x3ffface8f080) at pthread_create.c:310 #16 0x00003fffb4b9d210 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:109 Thanks for the backtrace. This crashes in qemuDomainMachineIsPSeries since def->os.machine is not initialized and the function does not check it. Patch posted upstream. https://www.redhat.com/archives/libvir-list/2017-October/msg00406.html v2 patch posted upstream. https://www.redhat.com/archives/libvir-list/2017-October/msg00413.html Fix merged upstream. commit 0e0e328dc1acc6a871910d17446013140a966080 Author: Andrea Bolognani <abologna> Date: Tue Oct 10 15:53:53 2017 +0200 qemu: Don't crash when parsing command line lacking -M Parse the -M (or -machine) command line option before starting processing in earnest and have a fallback ready in case it's not present, so that while parsing other options we can rely on def->os.machine being initialized. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1379218 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Daniel P. Berrange <berrange> v3.8.0-69-g0e0e328dc Packages used: qemu-kvm-rhev-2.10.0-4.el7.ppc64le libvirt-3.9.0-1.el7.ppc64le kernel-3.10.0-771.el7.ppc64le As qemu command line will fail when missing if=none with 'file=', I used below command /usr/libexec/qemu-kvm -m 2048 -drive file=/var/lib/avocado/data/avocado-vt/images/jeos-25-64.qcow2,if=none,index=0 -monitor unix:/tmp/ss,server,nowait -name test -uuid 1fdf7c78-866a-4dcf-b017-5a9299682e1f [1] 18948 # VNC server running on ::1:5900 # virsh qemu-attach 18948 But still libvirtd crashed. See attachment libvirtd_crash.gdb.log. Created attachment 1348452 [details]
libvirtd_crash.gdb.log
(In reply to Dan Zheng from comment #11) > Packages used: > qemu-kvm-rhev-2.10.0-4.el7.ppc64le > libvirt-3.9.0-1.el7.ppc64le > kernel-3.10.0-771.el7.ppc64le > > > As qemu command line will fail when missing if=none with 'file=', I used > below command > > /usr/libexec/qemu-kvm -m 2048 -drive > file=/var/lib/avocado/data/avocado-vt/images/jeos-25-64.qcow2,if=none, > index=0 -monitor unix:/tmp/ss,server,nowait -name test -uuid > 1fdf7c78-866a-4dcf-b017-5a9299682e1f > > [1] 18948 > # VNC server running on ::1:5900 > > # virsh qemu-attach 18948 > > But still libvirtd crashed. > > See attachment libvirtd_crash.gdb.log. This is a separate bug, one that it looks like it would reproduce on x86_64 as well. Can you please verify whether that's the case and file accordingly? Andrea, Yes, you are right. This is a new bug also on x86. I will file a new one. File a bug 1510781. Verify this one. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:0704 |