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 808371 - libvirtd crashed with SIGSEGV in __strcmp_ssse3()
Summary: libvirtd crashed with SIGSEGV in __strcmp_ssse3()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Alex Jia
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-30 09:39 UTC by Alex Jia
Modified: 2012-06-20 06:51 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.10-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:51:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Alex Jia 2012-03-30 09:39:26 UTC
Description of problem:
virsh edit a channel without target name into guest XML configuration then create a snapshot for the shut off status guest, finally, to use virsh snapshot-current to set current snapshot name, libvirt will crash due to derefing a NULL pointer.

Version-Release number of selected component (if applicable):
# rpm -q libvirt
libvirt-0.9.10-6.el6.x86_64

How reproducible:
always

Steps to Reproduce:

# qemu-img create -f qcow2 /var/lib/libvirt/images/test.img 10M
Formatting '/var/lib/libvirt/images/test.img', fmt=qcow2 size=10485760 encryption=off cluster_size=65536

# cat > /tmp/test.xml <<EOF
<domain type='qemu'>
  <name>test</name>
  <memory>219200</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='hd'/>
  </os>
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/test.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <channel type='pty'>
      <target type='virtio'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes' listen='0.0.0.0'/>
  </devices>
</domain>
EOF

# virsh define /tmp/test.xml
Domain test defined from /tmp/test.xml

# virsh snapshot-list test
 Name                 Creation Time             State
------------------------------------------------------------

# virsh snapshot-create-as test hello
Domain snapshot hello created

# virsh snapshot-list test
 Name                 Creation Time             State
------------------------------------------------------------
 hello                2012-03-30 17:30:13 +0800 shutoff

# virsh snapshot-current test hello
error: End of file while reading data: Input/output error


Actual results:

# service libvirtd status
libvirtd dead but pid file exists

Expected results:
avoid crashing libvirtd.

Additional info:

Run till exit from #0  __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:187

Program received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:213

(gdb) bt
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:213
#1  0x00007f77dee24fd3 in virDomainChannelDefCheckABIStability (src=0x7f77cc1886c0, dst=0x7f77c80d2630) at conf/domain_conf.c:9496
#2  virDomainDefCheckABIStability (src=0x7f77cc1886c0, dst=0x7f77c80d2630) at conf/domain_conf.c:9862
#3  0x000000000044e948 in qemuDomainSnapshotCreateXML (domain=<value optimized out>, xmlDesc=<value optimized out>, flags=<value optimized out>) at qemu/qemu_driver.c:10165
#4  0x00007f77dee78c8c in virDomainSnapshotCreateXML (domain=0x7f77c80bf650, 
    xmlDesc=0x7f77c80c2eb0 "<domainsnapshot>\n  <name>hello</name>\n  <state>shutoff</state>\n  <creationTime>1333095328</creationTime>\n  <domain type='kvm'>\n    <name>foo-clone</name>\n    <uuid>fea1e273-6516-c52c-634a-d735c68524dd"..., flags=3) at libvirt.c:17089
#5  0x000000000042a9ef in remoteDispatchDomainSnapshotCreateXML (server=<value optimized out>, client=<value optimized out>, msg=<value optimized out>, rerr=0x7f77d84edbc0, args=0x7f77c80c0130, 
    ret=0x7f77c80c0170) at remote_dispatch.h:5485
#6  remoteDispatchDomainSnapshotCreateXMLHelper (server=<value optimized out>, client=<value optimized out>, msg=<value optimized out>, rerr=0x7f77d84edbc0, args=0x7f77c80c0130, ret=0x7f77c80c0170)
    at remote_dispatch.h:5461
#7  0x00007f77deeb2615 in virNetServerProgramDispatchCall (prog=0x13dbe80, server=0x13d0ac0, client=0x13dc530, msg=0x141ca20) at rpc/virnetserverprogram.c:416
#8  virNetServerProgramDispatch (prog=0x13dbe80, server=0x13d0ac0, client=0x13dc530, msg=0x141ca20) at rpc/virnetserverprogram.c:289
#9  0x00007f77deeb1411 in virNetServerHandleJob (jobOpaque=<value optimized out>, opaque=0x13d0ac0) at rpc/virnetserver.c:164
#10 0x00007f77dedf5bbc in virThreadPoolWorker (opaque=<value optimized out>) at util/threadpool.c:144
#11 0x00007f77dedf54d9 in virThreadHelper (data=<value optimized out>) at util/threads-pthread.c:161
#12 0x00000038baa077f1 in start_thread (arg=0x7f77d84ee700) at pthread_create.c:301
#13 0x00000033f68e570d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Comment 1 Alex Jia 2012-03-30 09:41:34 UTC
Patch for upstream:
https://www.redhat.com/archives/libvir-list/2012-March/msg01324.html

Comment 3 Alex Jia 2012-03-30 09:44:16 UTC
(In reply to comment #0)
> Version-Release number of selected component (if applicable):
> # rpm -q libvirt
> libvirt-0.9.10-6.el6.x86_64
It exists the same issue on libvirt-0.9.10-9.el6.x86_64.

Comment 5 Daniel Veillard 2012-04-05 03:19:45 UTC
Upstream commit 814fcb9e08fdc80ff2d74d5ca205b9c8bd0d351c

Daniel

Comment 8 Huang Wenlong 2012-04-06 04:07:08 UTC
Verify this bug :

libvirt-0.9.10-10.el6.x86_64
qemu-kvm-0.12.1.2-2.267.el6.x86_64


Steps: 

# qemu-img create -f qcow2 /var/lib/libvirt/images/test.img 10M
Formatting '/var/lib/libvirt/images/test.img', fmt=qcow2 size=10485760
encryption=off cluster_size=65536

# cat > /tmp/test.xml <<EOF
<domain type='qemu'>
  <name>test</name>
  <memory>219200</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='hd'/>
  </os>
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/test.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <channel type='pty'>
      <target type='virtio'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes' listen='0.0.0.0'/>
  </devices>
</domain>
EOF

# virsh define /tmp/test.xml
Domain test defined from /tmp/test.xml

# virsh snapshot-list test
 Name                 Creation Time             State
------------------------------------------------------------

# virsh snapshot-create-as test hello
Domain snapshot hello created

# virsh snapshot-list test
 Name                 Creation Time             State
------------------------------------------------------------
 hello                2012-03-30 17:30:13 +0800 shutoff

# virsh snapshot-current test hello
Snapshot hello set as current

# /etc/init.d/libvirtd status
libvirtd (pid  26619) is running...

Comment 10 errata-xmlrpc 2012-06-20 06:51:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


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