Bug 446924

Summary: F9 and Rawhide guests get a segfault when running in KVM
Product: [Fedora] Fedora Reporter: Bryan Kearney <bkearney>
Component: kvmAssignee: Glauber Costa <gcosta>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: apevec, berrange, clalance, katzj, mtosatti, poelstra
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-28 00:41:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 446830    
Bug Blocks: 438944    

Description Bryan Kearney 2008-05-16 12:58:58 EDT
+++ This bug was initially created as a clone of Bug #446830 +++

We are seeing F9 and Rawhide, when launched as a guest in kvm (whether throuhg
virt-manager or command line in qemu-kvm) will get through grub, then loose it's
vnc connection, and eventually seg fault. 

This tasks resolves this issue on f9. Perhaps it should be backported:
http://koji.fedoraproject.org/koji/taskinfo?taskID=600393

I get the following debug output on f8.

[root@localhost kickstarts]# gdb /usr/bin/qemu-kvm
GNU gdb Red Hat Linux (6.6-45.fc8rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) setargs -vnc :1 thincrust9-sda.raw
Undefined command: "setargs".  Try "help".
(gdb) set args -vnc :1 thincrust9-sda.raw
(gdb) run
Starting program: /usr/bin/qemu-kvm -vnc :1 thincrust9-sda.raw
[Thread debugging using libthread_db enabled]
[New Thread -1208984976 (LWP 24008)]
[New Thread -1208923248 (LWP 24346)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208984976 (LWP 24008)]
0x0058d37d in memmove () from /lib/libc.so.6
(gdb) bt
#0  0x0058d37d in memmove () from /lib/libc.so.6
#1  0x080b38ae in vnc_copy (ds=0x8181060, src_x=0, src_y=400, dst_x=0,
dst_y=384, w=56, h=16) at vnc.c:465
#2  0x080947ec in cirrus_bitblt_start (s=0xbea01e0) at
/usr/src/debug/kvm-60/qemu/hw/cirrus_vga.c:760
#3  0x08095008 in cirrus_hook_write_gr (s=0xbea01e0, reg_index=2935746376,
reg_value=2)
    at /usr/src/debug/kvm-60/qemu/hw/cirrus_vga.c:1064
#4  0x08095bb9 in vga_ioport_write (opaque=0xbea01e0, addr=975, val=2) at
/usr/src/debug/kvm-60/qemu/hw/cirrus_vga.c:2958
#5  0x080d3277 in kvm_outw (opaque=0x0, addr=48128, data=<value optimized out>)
at /usr/src/debug/kvm-60/qemu/qemu-kvm.c:478
#6  0x0814b643 in kvm_run (kvm=0xbde0028, vcpu=0) at libkvm.c:719
#7  0x080d2bf2 in kvm_cpu_exec (env=0xbe46da8) at
/usr/src/debug/kvm-60/qemu/qemu-kvm.c:143
#8  0x080d36d2 in kvm_main_loop_cpu (env=0xbe46da8) at
/usr/src/debug/kvm-60/qemu/qemu-kvm.c:343
#9  0x08057cf8 in main (argc=4, argv=0xbfd605f4) at
/usr/src/debug/kvm-60/qemu/vl.c:7817
#10 0x00532390 in __libc_start_main (main=0x8054e2c <main>, argc=4,
ubp_av=0xbfd605f4, init=0x814d340 <__libc_csu_init>,
    fini=0x814d330 <__libc_csu_fini>, rtld_fini=0x50b940 <_dl_fini>,
stack_end=0xbfd605ec) at libc-start.c:220
#11 0x0804ce21 in _start ()
(gdb)

-- Additional comment from apevec@redhat.com on 2008-05-16 08:04 EST --
Patch from Marcelo Tossati fixes this:
http://lists.gnu.org/archive/html/qemu-devel/2008-05/msg00291.html

Koji scratch build for F-9 with this patch added:
http://koji.fedoraproject.org/koji/taskinfo?taskID=600393
Comment 1 John Poelstra 2008-09-26 23:53:17 EDT
Is this still an issue with the latest packages in rawhide?

Should this be considered a release blocker?
Comment 2 Alan Pevec 2008-09-27 23:54:53 EDT
This particular bug is fixed in F9 already.
Comment 3 Alan Pevec 2008-09-28 00:41:27 EDT
* Fri May 16 2008 Glauber Costa <gcosta@redhat.com> - 65-3.fc9
- Fix problem with cirrus device that was breaking vnc connections (rhbz #446830)

kvm-65-cirrus.patch applied upstream:
http://git.kernel.org/?p=linux/kernel/git/amit/kvm-userspace.git;a=commit;h=671eb68630c6d06391cc87233561cba0c73fab48

included since kvm-69, rawhide is kvm-74