Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 677709

Summary: libvirt: Accessing incorrect union field when setting up SPICE password causes crash
Product: Red Hat Enterprise Linux 6 Reporter: Jakub Libosvar <jlibosva>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.0CC: berrange, danken, dyuan, eblake, jialiu, jyang, mgoldboi, mjenner, mzhan, vbian, xen-maint
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.7-7.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:27:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Backtrace + log none

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