Bug 853083 - ccs_tool update with non-valid cluster.conf suceeds but leads to segmentation fault in clustat
ccs_tool update with non-valid cluster.conf suceeds but leads to segmentation...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager (Show other bugs)
5.9
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Ryan McCabe
Cluster QE
:
Depends On:
Blocks: 1049888
  Show dependency treegraph
 
Reported: 2012-08-30 09:10 EDT by michal novacek
Modified: 2014-09-15 20:28 EDT (History)
5 users (show)

See Also:
Fixed In Version: rgmanager-2.0.52-51.el5
Doc Type: Bug Fix
Doc Text:
When a cluster configuration file was invalid, an attempt to run the "clustat" command failed with a segmentation fault. This bug has been fixed with this update and "clustat" no longer crashes in the described scenario.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-15 20:28:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
clustat core file (46.53 KB, application/octetstream)
2012-08-30 09:10 EDT, michal novacek
no flags Details

  None (edit)
Description michal novacek 2012-08-30 09:10:10 EDT
Created attachment 608183 [details]
clustat core file

Description of problem:
I have correctly running cluster. I change cluster.conf on one of the nodes with non-valid xml. I run ccs_tool to update this config version to all the nodes which it correctly does. Running "clustat" after that on any of the nodes leads to Segmentation Fault.

Version-Release number of selected component (if applicable):
This is RHEL5.9-candidate-20120813, rgmanager-2.0.52-34, running on ia64.

How reproducible:
Always.

Steps to Reproduce:
1. Have three node cluster on rhel5.9 ia64.
2. Modify /etc/cluster/cluster.conf on any of the nodes as follows (add <a> tag and increase config_version):
<?xml version="1.0"?>
<a>
    <cluster name="a_cluster" config_version="303">
	...
    </cluster>
</a>

3. run: ccs_tool update /etc/cluster/cluster.conf
4. check that all nodes report that the config has been updated correctly.
5. run: clustat
  
Actual results:
Segmentation Fault (core dumped)

Expected results:
Cluster status shown.

Additional info:
Info from the core attached: 

Core was generated by `clustat'.
Program terminated with signal 11, Segmentation fault.
#0  0x2000000000259890 in strcmp () from /lib/libc.so.6.1
(gdb) bt full
#0  0x2000000000259890 in strcmp () from /lib/libc.so.6.1
No symbol table info available.
#1  0x4000000000007b40 in add_missing (all=0x600000000000d9f0, these=0x600000000000d600) at clustat.c:396
        x = 0
        y = 0
        addflag = 0
        m = 0x0
        nn = 0x0
#2  0x400000000000c350 in build_member_list (ch=0x600000000000c010, lid=0x60000fffffd6b758) at clustat.c:983
        all = 0x600000000000d9f0
        part = 0x600000000000d600
        m = 0x0
        root = 1
        x = 0
#3  0x400000000000d190 in main (argc=1, argv=0x60000fffffd6ba88) at clustat.c:1173
        qs = 1
        ret = 0
        membership = 0x200000000004f378
        rgs = 0x0
        local_node_id = -2705464
        fast = 0
        runtype = 0
        now = 2305843009215291960
        ch = 0x600000000000c010
        ci = {ci_name = "a_cluster\000\000\000\000\000\000\000", ci_number = 50356, ci_generation = 512}
        refresh_sec = 0
        errors = 0
        opt = -1
        xml = 0
        flags = 0
        member_name = 0x0
        rg_name = 0x0
        real_rg_name = "\000\000\000\000\340\343\004\000\000\000\000 @\267\326\377\377\017\000`", '\000' <repeats 40 times>, "8b\030"
(gdb) info threads
* 1 Thread 0x20000000000ada60 (LWP 31939)  0x2000000000259890 in strcmp () from /lib/libc.so.6.1
Comment 5 Ryan McCabe 2014-03-13 14:26:26 EDT
commit fde6e0e3a1fc1dac3b95d7cd96315bb2231ccfd5
Author: Ryan McCabe <rmccabe@redhat.com>
Date:   Thu Mar 13 14:24:50 2014 -0400

    rgmanager: Fix for clustat crash when using an invalid config
    
    Fix for a crash in clustat when executed with an invalid cluster
    configuration file.
    
    Resolves: rhbz#853083
    
    Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
Comment 10 errata-xmlrpc 2014-09-15 20:28:43 EDT
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/RHBA-2014-1207.html

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