Hide Forgot
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.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.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.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
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.
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>
Coverity spotted a bug in this patch that needs a little more thought.
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
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