Bug 677709 - libvirt: Accessing incorrect union field when setting up SPICE password causes crash
Summary: libvirt: Accessing incorrect union field when setting up SPICE password cause...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 677926 678319 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-15 16:10 UTC by Jakub Libosvar
Modified: 2011-05-19 13:27 UTC (History)
11 users (show)

Fixed In Version: libvirt-0.8.7-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:27:38 UTC
Target Upstream Version:


Attachments (Terms of Use)
Backtrace + log (397.39 KB, application/x-gnome-theme-package)
2011-02-15 16:10 UTC, Jakub Libosvar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description Jakub Libosvar 2011-02-15 16:10:38 UTC
Created attachment 478906 [details]
Backtrace + log

Description of problem:
When attempting to run VM from RHEV-M, libvirtd stops working. 

Version-Release number of selected component (if applicable):
libvirt-0.8.7-6.el6.x86_64
vdsm-4.9-47.el6.x86_64
kernel-2.6.32-113.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Have RHEV-Manager with some machines on it using rhel 6 host
2. Run VM on this host with libvirt
  
Actual results:
Libvirt crashes

Expected results:
Libvirt works and VM is running

Additional info:
Backtrace from gdb and libvirt logs are attached

Comment 1 Daniel Berrangé 2011-02-15 16:21:14 UTC
This is another mistake like the one in bug 676374. A mixup of vnc/spice in qemuInitPasswords:

    if (vm->def->ngraphics == 1) {
        if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
            ret = qemuInitGraphicsPasswords(driver, vm,
                                            VIR_DOMAIN_GRAPHICS_TYPE_VNC,
                                            &vm->def->graphics[0]->data.vnc.auth,
                                            driver->vncPassword);
        } else if (vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
            ret = qemuInitGraphicsPasswords(driver, vm,
                                            VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
                                            &vm->def->graphics[0]->data.vnc.auth,
                                            driver->vncPassword);
        }
    }

Comment 4 Daniel Berrangé 2011-02-16 10:27:07 UTC
*** Bug 677926 has been marked as a duplicate of this bug. ***

Comment 6 Daniel Berrangé 2011-02-17 15:37:05 UTC
*** Bug 678319 has been marked as a duplicate of this bug. ***

Comment 8 Vivian Bian 2011-02-18 08:35:32 UTC
verfied with libvirt-0.8.7-7.el6.x86_64 

[reproducer with libvirt-0.8.7-6.el6.x86_64]
# virsh dumpxml test1 |grep spice
    <graphics type='spice' port='5900' autoport='no' listen='0.0.0.0' keymap='en-us' passwdValidTo='2011-04-09T15:51:00'/>

# virsh start test1
error: Failed to start domain test1
error: server closed connection: 

# service libvirtd status
libvirtd dead but pid file exists


[verification with libvirt-0.8.7-7.el6.x86_64 ]
# virsh dumpxml test1 |grep spice
    <graphics type='spice' port='5900' autoport='no' listen='0.0.0.0' keymap='en-us' passwdValidTo='2011-04-09T15:51:00'/>

# virsh start test1
Domain test1 started

# spicec -h 10.66.93.106 -p 5900 -w aaabbb    could access the spice interface successfully . 


So set bug status to VERIFIED

Comment 9 Vivian Bian 2011-04-18 06:09:02 UTC
tested with 
libvirt-0.8.7-17.el6.x86_64
qemu-kvm-0.12.1.2-2.158.el6.x86_64
kernel-2.6.32-131.0.1.el6.x86_64
spice-client-0.7.3-1.el6.x86_64
spice-server-0.8.0-1.el6.x86_64

[Steps]
# virsh dumpxml test1 |grep spice
    <graphics type='spice' port='5900' autoport='no' listen='0.0.0.0'
keymap='en-us' passwdValidTo='2011-04-18T15:51:00'/>

# virsh start test1
Domain test1 started

# spicec -h 10.66.4.220 -p 5900 -w aaabbb    could access the spice interface
successfully . 


So keep bug status VERIFIED

Comment 12 errata-xmlrpc 2011-05-19 13:27:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html


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