Bug 603886 - If empty totem tag is in config file ccs_config_dump segfaults
Summary: If empty totem tag is in config file ccs_config_dump segfaults
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: corosync
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Steven Dake
QA Contact: Cluster QE
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-14 18:56 UTC by Chris Feist
Modified: 2016-04-26 15:38 UTC (History)
5 users (show)

Clone Of:
Last Closed: 2010-11-15 13:53:45 UTC

Attachments (Terms of Use)
Patch to fix objdb (400 bytes, patch)
2010-06-15 15:02 UTC, Christine Caulfield
no flags Details | Diff

Description Chris Feist 2010-06-14 18:56:24 UTC
Description of problem:
If an empty totem tag is in the cluster.conf file ccs_config_dump segfaults causing 'service cman start' to fail.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Put in empty totem tag into cluster.conf '<totem>'
2. Run 'service cman start'
3. Segfault
Actual results:

Expected results:
Dump of cluster.conf file.

Additional info:
Stack trace of segfault:

Program terminated with signal 11, Segmentation fault.
#0  __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:31
31		pcmpeqb	(%rdi), %xmm2
(gdb) bt
#0  __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:31
#1  0x00007f6c54063898 in object_key_iter (parent_object_handle=1265737887312248845, key_name=0x7fff2b1ae398, key_len=0x7fff2b1ae390, 
    value=<value optimized out>, value_len=0x7fff2b1ae380) at objdb.c:1543
#2  0x00007f6c53c566b5 in copy_config_tree (objdb=0x7f6c54266380, source_object=1265737887312248845, target_parent_object=<value optimized out>, 
    always_create=<value optimized out>) at /usr/src/debug/cluster-3.0.12/cman/daemon/cman-preconfig.c:1066
#3  0x00007f6c53c567d1 in copy_tree_to_root (objdb=0x7f6c54266380, name=0x7f6c53c5a025 "totem", always_create=0)
    at /usr/src/debug/cluster-3.0.12/cman/daemon/cman-preconfig.c:1102
#4  0x00007f6c53c59a69 in cmanpre_readconfig (objdb=0x7f6c54266380, error_string=0x7fff2b1ae8f8)
    at /usr/src/debug/cluster-3.0.12/cman/daemon/cman-preconfig.c:1322
#5  0x00000039584087a8 in load_config () at sa-confdb.c:130
#6  confdb_sa_init () at sa-confdb.c:159
#7  0x0000003958402ee0 in confdb_initialize (handle=0x7fff2b1ae998, callbacks=0x6016a0) at confdb.c:146
#8  0x0000000000400f3f in main (argc=1, argv=0x7fff2b1aea98, envp=<value optimized out>)
    at /usr/src/debug/cluster-3.0.12/config/tools/xml/ccs_config_dump.c:138

Comment 1 RHEL Product and Program Management 2010-06-14 19:02:59 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 2 Fabio Massimo Di Nitto 2010-06-15 05:21:05 UTC
Chrissie, looking at the back trace, this looks like a bug in cman-preconfig copy_to_tree function. From the look of it, it's a missing NULL check.

Can you please take a look at it?


Comment 3 Christine Caulfield 2010-06-15 08:05:25 UTC
Can you post the full cluster.conf file please? I can't reproduce this problem.

I tried

<?xml version="1.0" ?>
<cluster config_version="1" name="cluster3">


... and

<?xml version="1.0" ?>
<cluster config_version="1" name="cluster3">



Comment 4 Christine Caulfield 2010-06-15 15:02:27 UTC
Created attachment 424186 [details]
Patch to fix objdb

This looks to me like a bug in corosync.

object_key_iter() calls object_key_iter_typed() and then always tries to dereference the string it returns, even if it fails. The attached patch fixes this

Comment 6 releng-rhel@redhat.com 2010-11-15 13:53:45 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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