Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 162936 - rgmanager segfaults with certain configurations using inheritance
Summary: rgmanager segfaults with certain configurations using inheritance
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: rgmanager
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
Depends On:
TreeView+ depends on / blocked
Reported: 2005-07-11 18:26 UTC by Lon Hohberger
Modified: 2009-04-16 20:17 UTC (History)
3 users (show)

Fixed In Version: RHBA-2005-738
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-10-07 16:52:38 UTC

Attachments (Terms of Use)
Fixes behavior (deleted)
2005-07-11 18:28 UTC, Lon Hohberger
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:738 normal SHIPPED_LIVE rgmanager bug fix update 2005-10-07 04:00:00 UTC

Description Lon Hohberger 2005-07-11 18:26:25 UTC
Description of problem:

                <service autostart="1" domain="gfsnfs" name="NFS">
                        <nfsexport ref="gfs_nfs_export">
                                <clusterfs ref="gfs"/>
                                <ip ref="">
                                        <nfsclient ref="kraid"/>               
                         <nfsclient ref="bowser"/>

The above configuration snippet tries to evaluate <nfsexport> for a file system.

Now, ordinarily, the nfsexport resource inherits the path from the parent file
system.  However, because the parent is actually a service resource, there is no
path to inherit.  When we execute this code:

		val = attr_value(node, res->r_attrs[x].ra_name);

		/* Strlen of both + '=' + 'OCF_RESKEY' + '\0' terminator' */
		n = strlen(res->r_attrs[x].ra_name) + strlen(val) + 2 +

attr_value tries to find the inheritance for the attribute, correctly returning
NULL if none is available.  However, the next call to strlen() raises a segfault
is val is NULL.  Thus, the correct code should be:

		val = attr_value(node, res->r_attrs[x].ra_name);
		if (!val)

Version-Release number of selected component (if applicable): Current stable, CVS.

How reproducible: ?

Actual results:

rgmanager segfaults and freezes.

Expected results:

*no* configuration should cause rgmanager to segfault.

Comment 1 Lon Hohberger 2005-07-11 18:28:08 UTC
Created attachment 116615 [details]
Fixes behavior

This patch fixes the behavior.

Comment 2 Lon Hohberger 2005-07-12 15:35:27 UTC
Patches in upstream CVS

Comment 4 Red Hat Bugzilla 2005-10-07 16:52:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. 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.