Bug 1428481

Summary: qemu segfaults in gtk_display_init
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: amit, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-2.9.0-0.1.rc1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-29 15:49: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:

Description Richard W.M. Jones 2017-03-02 16:37:04 UTC
Description of problem:

$ qemu-system-x86_64 -nodefaults -no-reboot -kernel /var/tmp/.guestfs-1000/appliance.d/kernel -initrd /var/tmp/.guestfs-1000/appliance.d/initrd -drive file=/var/tmp/.guestfs-1000/appliance.d/root,snapshot=on -m 1024 -append "guestfs_rescue=1" -serial stdio
Segmentation fault

This only seems to happen with the Fedora package.  As far as I
can tell this doesn't affect upstream qemu.

The stack trace is:

Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
0x0000555555acc49c in gtk_display_init (ds=<optimized out>, 
    full_screen=<optimized out>, grab_on_hover=<optimized out>)
    at /usr/src/debug/qemu-2.8.0/ui/gtk.c:2253
2253	    gtk_widget_set_sensitive(s->copy_item,

(gdb) bt
#0  0x0000555555acc49c in gtk_display_init (ds=<optimized out>, full_screen=<optimized out>, grab_on_hover=<optimized out>)
    at /usr/src/debug/qemu-2.8.0/ui/gtk.c:2253
#1  0x0000555555816b33 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /usr/src/debug/qemu-2.8.0/vl.c:4615

Version-Release number of selected component (if applicable):

qemu-2.8.0-2.fc26.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Run the command shown above.

Comment 1 Richard W.M. Jones 2017-03-02 16:40:14 UTC
The GtkDisplayState *s struct is enormous but gdb seems to be able
to print all of it.

Comment 2 Richard W.M. Jones 2017-03-02 16:40:49 UTC
gtk3-3.22.6-2.fc25.x86_64

Hmm, let's try updating that.

Comment 3 Richard W.M. Jones 2017-03-02 16:41:43 UTC
Fails in the same way with gtk3-3.22.8-2.fc26

Comment 4 Daniel Berrangé 2017-03-02 17:13:35 UTC
Fix upstream in git master with


commit 3d4da9d6f3b664beb5bee446ad53b69178f46ad4
Author: Hervé Poussineau <hpoussin>
Date:   Sun Jan 1 10:39:45 2017 +0100

    ui/gtk: fix crash at startup when no console is available
    
    This patch fixes a segfault at QEMU startup, introduced in a08156321ab9a7d2fed9ee77dbfeea2a61ffd153.
    gd_vc_find_current() return NULL, which is dereferenced without checking it.
    
    While at it, disable the whole 'View' menu if no console exists.
    
    Reproducer: qemu-system-i386 -M none -nodefaults
    
    Signed-off-by: Hervé Poussineau <hpoussin>
    Reviewed-by: Stefan Hajnoczi <stefanha>
    Message-id: 1483263585-8101-1-git-send-email-hpoussin
    Signed-off-by: Gerd Hoffmann <kraxel>

Comment 5 Fedora Update System 2017-03-17 17:38:39 UTC
qemu-2.9.0-0.1.rc0.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d1858655b8

Comment 6 Fedora Update System 2017-03-17 22:23:36 UTC
qemu-2.9.0-0.1.rc0.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d1858655b8

Comment 7 Fedora Update System 2017-03-22 12:12:41 UTC
qemu-2.9.0-0.1.rc1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8fba7a271e

Comment 8 Fedora Update System 2017-03-22 15:29:26 UTC
qemu-2.9.0-0.1.rc1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8fba7a271e

Comment 9 Fedora Update System 2017-04-01 17:26:22 UTC
qemu-2.9.0-0.1.rc1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.