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 1384968 - cman_tool nodes -F addr segfaults when qdisk is present
Summary: cman_tool nodes -F addr segfaults when qdisk is present
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Christine Caulfield
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-14 12:43 UTC by Josef Zimek
Modified: 2020-04-15 14:44 UTC (History)
6 users (show)

Fixed In Version: cluster-3.0.12.1-80.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 09:26:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (1.08 KB, patch)
2016-10-14 14:26 UTC, Christine Caulfield
no flags Details | Diff
Patch to fix coverity (actually clang) error (and more) (1008 bytes, patch)
2016-11-11 09:28 UTC, Christine Caulfield
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0601 0 normal SHIPPED_LIVE cluster bug fix update 2017-03-21 12:26:18 UTC

Description Josef Zimek 2016-10-14 12:43:51 UTC
Description of problem:

`cman_tool nodes -F id,name,addr` segfaults when qdisk is present because we attempt to obtain IP address of qdisk:


without qdisk:
--------------
# cman_tool nodes -F id,name,addr
1 virt-242 2620:52:0:2246:1800:ff:fe00:f2 
2 virt-243 2620:52:0:2246:1800:ff:fe00:f3


with qdisk:
-----------
# cman_tool nodes -F name
/dev/sda 
virt-242 
virt-243 


Works fine until "addr" parameter is used:

# cman_tool nodes -F id,name,addr
0 /dev/sda ,,,,,,,,,,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.
0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.
0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,
1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.
0,1.0.0.0,1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.0.0,1.0.0.0,1.0.0.0,
1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.
0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.
0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0.0,1.0.0Segmentation fault (core dumped)




Version-Release number of selected component (if applicable):
cman-3.0.12.1-78.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. set cluster with qdisk
2. run `cman_tool nodes -F id,name,addr`


Actual results:
segfault while getting IP address of qdisk

Expected results:
we wont check IP address of qdisk

Additional info:
maybe the qdisk should not be considered as node in `cman_tool nodes` or we need to make exception for qdisk and addr

Comment 3 Christine Caulfield 2016-10-14 14:26:48 UTC
Created attachment 1210565 [details]
Patch

I'm quite impressed this bug lasted all the way to RHEL 6.8.

an obvious and easy fix, of course.

Comment 5 Christine Caulfield 2016-10-17 08:20:57 UTC
Patch is upstream(FWIW)

commit b5c85f77a6e4dfd4237c12d4002464a429e5b59c
Author: Christine Caulfield <ccaulfie>
Date:   Fri Oct 14 15:28:42 2016 +0100

    cman_tool: Don't segfault when taking address of qdevice
    
    If cman_tool nodes -F addr is called when qdevice is active then
    cman_tool segfaults quite spectacularly when it tries to print
    the address of the qdevice 'node'
    
    Signed-off-by: Christine Caulfield <ccaulfie>

Comment 8 Christine Caulfield 2016-11-11 08:49:08 UTC
Coverity spotted a bug in this patch that needs a little more thought.

Comment 9 Christine Caulfield 2016-11-11 09:28:51 UTC
Created attachment 1219675 [details]
Patch to fix coverity (actually clang) error (and more)

This patch (on top of the previous one) fixes the clang-reported error and its causes

Comment 12 errata-xmlrpc 2017-03-21 09:26:44 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.

https://rhn.redhat.com/errata/RHBA-2017-0601.html


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