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 856068 - [Graphical framebuffers]When spice migration finished, remote-viewer disconnected and got Segmentation fault
Summary: [Graphical framebuffers]When spice migration finished, remote-viewer disconne...
Keywords:
Status: CLOSED DUPLICATE of bug 855870
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk
Version: 6.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Christophe Fergeau
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-11 06:37 UTC by Xu Wang
Modified: 2013-01-10 23:52 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-11 08:42:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xu Wang 2012-09-11 06:37:27 UTC
Description of problem:
When spice migration finished, remote-viewer disconnected and got Segmentation fault (core dumped)

Version-Release number of selected component (if applicable):
kernel-2.6.32-302.el6.x86_64
virt-viewer-0.5.2-10.el6.x86_64
python-virtinst-0.600.0-8.el6.noarch
virt-manager-0.9.0-14.el6.x86_64
spice-gtk-0.13.29-2.el6.x86_64
libvirt-0.10.1-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
0.Prepare two hosts, source and target

1.Edit graphics element of guest's xml like this:
#virsh dumpxml test --security-info
...
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes' passwd='aaabbb' passwdValidTo='2022-08-04T02:14:01'>
      <channel name='main' mode='secure'/>
      <channel name='record' mode='insecure'/>
</graphics>
...

2.Modify the followings in /etc/libvirt/qemu.conf, both on source and target host
uncomment # spice_listen = "0.0.0.0"
spice_listen = "0.0.0.0"

uncomment # spice_tls = 1
spice_tls = 1

uncomment # spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"
spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"

3.Perform the following script on source host, to generate the cert files for ssl
#!/bin/bash

SERVER_KEY=server-key.pem

# creating a key for our ca
if [ ! -e ca-key.pem ]; then
    openssl genrsa -des3 -out ca-key.pem 1024
fi
# creating a ca
if [ ! -e ca-cert.pem ]; then
    openssl req -new -x509 -days 1095 -key ca-key.pem -out ca-cert.pem  -subj "/C=IL/L=Raanana/O=Red Hat/CN=my CA"
fi
# create server key
if [ ! -e $SERVER_KEY ]; then
    openssl genrsa -out $SERVER_KEY 1024
fi
# create a certificate signing request (csr)
if [ ! -e server-key.csr ]; then
    openssl req -new -key $SERVER_KEY -out server-key.csr -subj "/C=IL/L=Raanana/O=Red Hat/CN=my server"
fi
# signing our server certificate with this ca
if [ ! -e server-cert.pem ]; then
    openssl x509 -req -days 1095 -in server-key.csr -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem
fi

# now create a key that doesn't require a passphrase
openssl rsa -in $SERVER_KEY -out $SERVER_KEY.insecure
mv $SERVER_KEY $SERVER_KEY.secure
mv $SERVER_KEY.insecure $SERVER_KEY

# show the results (no other effect)
openssl rsa -noout -text -in $SERVER_KEY
openssl rsa -noout -text -in ca-key.pem
openssl req -noout -text -in server-key.csr
openssl x509 -noout -text -in server-cert.pem
openssl x509 -noout -text -in ca-cert.pem

# copy *.pem file to /etc/pki/libvirt-spice
if [[ -d "/etc/pki/libvirt-spice" ]] 
then
    cp ./*.pem /etc/pki/libvirt-spice
else
    mkdir /etc/pki/libvirt-spice
        cp ./*.pem /etc/pki/libvirt-spice
fi

# echo --host-subject
echo "your --host-subject is" \" `openssl x509 -noout -text -in server-cert.pem | grep Subject: | cut -f 10- -d " "` \"

4.scp /etc/pki/libvirt-spice/* to the target machine /etc/pki/libvirt-spice

5.Restart libvirtd on both source and target host to rescan the configuration
# service libvirtd restart

6.Start the guest
# virsh start guest 

7.Access the spice interface with ssl connection on source machine
# remote-viewer  spice://$ip/?tls-port=5901 --spice-host-subject "C=IL,L=Raanana,O=Red Hat,CN=my server" --spice-ca-file /etc/pki/libvirt-spice/ca-cert.pem
input password

8. migrate guest on source machine to target machine
# virsh migrate --live guest qemu+ssh://$destination_IP/system
  
Actual results:
When spice migration finished, remote-viewer disconnected and got Segmentation fault (core dumped)

Expected results:
spice session always keeps connected . And there is no error for migration.

Additional info:

Comment 2 Xu Wang 2012-09-11 06:58:55 UTC
When spice_tls is enabled which is the difference between this case and bug 825633, segmentation fault still comes after migration with spice-gtk-0.11-11.el6.x86_64 and even with the latest version spice-gtk-0.13.29-2.el6.x86_64.

Comment 3 Marian Krcmarik 2012-09-11 08:42:49 UTC

*** This bug has been marked as a duplicate of bug 855870 ***


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