Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 591759 - Segmentation fault when using vnc to view guest without vga card
Segmentation fault when using vnc to view guest without vga card
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2010-05-12 22:08 EDT by Qunfang Zhang
Modified: 2013-01-09 17:34 EST (History)
9 users (show)

See Also:
Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-09 23:22:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
upstream patch (808 bytes, patch)
2010-05-18 15:46 EDT, Gerd Hoffmann
no flags Details | Diff

  None (edit)
Description Qunfang Zhang 2010-05-12 22:08:51 EDT
Description of problem:
This issue is found when verifying Bug 584902, boot a guest with a floppy device using -global and then view the guest with vnc, segmentation fault.

Command line:

/usr/libexec/qemu-kvm -nodefaults -drive
file=lxc_tech_paper.pdf,if=none,id=drive-fdc0-0-0,format=raw -global
isa-fdc.driveA=drive-fdc0-0-0 -monitor stdio -vnc :10 -drive file=rhel5.5-32.qcow2,media=disk,if=ide,cache=off -boot c 

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

How reproducible:

Steps to Reproduce:
1.Boot a guest with above command line
2.View it with vnc : vncviewer $HOST_IP:10
Actual results:
(gdb) r -nodefaults -drive
file=lxc_tech_paper.pdf,if=none,id=drive-fdc0-0-0,format=raw -global
isa-fdc.driveA=drive-fdc0-0-0 -monitor stdio -vnc :10

Boot with "-vnc" option, then using "vncviewer" to view it. segmentation fault.

Program received signal SIGSEGV, Segmentation fault.
0x000000000049bdc7 in vga_hw_invalidate () at console.c:169
169     if (active_console->hw_invalidate)
Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-md5-2.1.23-8.el6.x86_64 cyrus-sasl-plain-2.1.23-8.el6.x86_64
(gdb) bt
#0  0x000000000049bdc7 in vga_hw_invalidate () at console.c:169
#1  0x00000000004cfc39 in set_pixel_format (vs=0x16f9510, data=0x1704980 "", 
    len=<value optimized out>) at vnc.c:1892
#2  protocol_client_msg (vs=0x16f9510, data=0x1704980 "", 
    len=<value optimized out>) at vnc.c:1965
#3  0x00000000004d096b in vnc_client_read (opaque=0x16f9510) at vnc.c:1352
#4  0x000000000040b15f in main_loop_wait (timeout=1000)
    at /usr/src/debug/qemu-kvm-
#5  0x000000000042864a in kvm_main_loop ()
    at /usr/src/debug/qemu-kvm-
#6  0x000000000040e17b in main_loop (argc=<value optimized out>, 
    argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-
#7  main (argc=<value optimized out>, argv=<value optimized out>, 
    envp=<value optimized out>) at /usr/src/debug/qemu-kvm-

Expected results:

Additional info:
Comment 2 RHEL Product and Program Management 2010-05-13 00:17:14 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
Comment 3 Gerd Hoffmann 2010-05-18 15:18:47 EDT
Simple "/usr/libexec/qemu-kvm -nodefaults -vnc :10 -cdrom /mort/distiso/rhel6-beta/RHEL6.0-20100506.3-Server-x86_64-DVD1.iso" segfaults too.  Removing -nodefaults makes it boot fine.  So it isn't related to floppy at all.  Investigating ...
Comment 4 Gerd Hoffmann 2010-05-18 15:34:54 EDT
Ah.  -nodefaults makes qemu not plug in a default vga card.  So if you don't add one with -vga <something> qemu boots the guest without vga plugged in.  Seems vnc doesn't handle this very gracefully ...
Comment 5 Gerd Hoffmann 2010-05-18 15:46:36 EDT
Created attachment 414951 [details]
upstream patch
Comment 6 Gerd Hoffmann 2010-05-20 09:25:40 EDT
Patch submitted upstream
Comment 7 Gerd Hoffmann 2010-06-01 15:56:16 EDT
Patch committed upstream
Comment 11 Qunfang Zhang 2010-06-09 23:21:46 EDT
Verified on qemu-kvm-, passed.

Note You need to log in before you can comment on or make changes to this bug.