Bug 425995 - segfault in dm_flush_map when wwid changes on storage
Summary: segfault in dm_flush_map when wwid changes on storage
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: device-mapper-multipath   
(Show other bugs)
Version: 4.5
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Ben Marzinski
QA Contact: Corey Marthaler
Depends On:
TreeView+ depends on / blocked
Reported: 2007-12-17 17:08 UTC by John Sobecki
Modified: 2010-01-12 02:31 UTC (History)
13 users (show)

Fixed In Version: RHBA-2008-0764
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 20:03:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch that uses EL5 mpio behaviour (731 bytes, patch)
2007-12-17 17:14 UTC, John Sobecki
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0764 normal SHIPPED_LIVE device-mapper-multipath bug fix and enhancement update 2008-07-23 17:17:53 UTC

Description John Sobecki 2007-12-17 17:08:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070223 Oracle/ Firefox/

Description of problem:

Customer reconfigured storage array (EMC) and LUN mapping changed thereby
effecting the wwid's of the devices.  Any attempt to re-scan results in
a segfault:

 # multipath -v2
 remove: mpath1 (wwid changed)
 Segmentation fault 

Loaded the debuginfo RPM and got the following call stack for the failure
from the core:

   (gdb) bt
   #0  0x0000003d46370242 in strcmp () from /lib64/tls/libc.so.6
   #1  0x0000000000407aa2 in dm_type (name=0x52c1b0 "mpath1", type=0x0) at
   #2  0x0000000000407cae in dm_flush_map (mapname=0x52c1b0 "mpath1",
         type=0x0) at devmapper.c:412
   #3  0x0000000000403a01 in select_action (mpp=0x52b6a0, curmp=0x529c60) at
   #4  0x000000000040468f in coalesce_paths (curmp=0x529c60,
         pathvec=0x529c80) at main.c:820
   #5  0x0000000000404ec1 in configure () at main.c:1090
   #6  0x0000000000405342 in main (argc=2, argv=0x7fbffff978) at main.c:1207

The call stack arguments show type being null, in both of these
call frames for 'type' as follows:

   #1  0x0000000000407aa2 in dm_type (name=0x52c1b0 "mpath1", type=0x0)
   #2  0x0000000000407cae in dm_flush_map (mapname=0x52c1b0 "mpath1",
Here is the call in select_action():

         if (!find_mp_by_wwid(curmp, mpp->wwid)) {
                 condlog(2, "remove: %s (wwid changed)", cmpp->alias);
                 dm_flush_map(mpp->alias, NULL);

So this code is guarenteed to segfault everytime it calls dm_flush_map().

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

How reproducible:

Steps to Reproduce:
1.  Customer reconfigured EMC storage
2.  Runs multipath -v2 to rediscover
3.  This results in a segfault

Actual Results:
segfault as shown above.

Expected Results:
Cleanup of old dm device & add new dm-X based on wwid change.

Additional info:

Comment 1 John Sobecki 2007-12-17 17:14:09 UTC
Created attachment 289787 [details]
Patch that uses EL5 mpio behaviour

Comment 2 Ben Marzinski 2007-12-18 20:20:35 UTC
Patch applied. Thanks.

Comment 3 RHEL Product and Program Management 2007-12-18 20:25:23 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 6 errata-xmlrpc 2008-07-24 20:03:07 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 therefore 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.