Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 607874 - multipath can't handle reloading maps with offlined devices.
multipath can't handle reloading maps with offlined devices.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-multipath (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Ben Marzinski
Barry Donahue
:
: 608797 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-25 00:20 EDT by Ben Marzinski
Modified: 2018-10-27 08:39 EDT (History)
15 users (show)

See Also:
Fixed In Version: device-mapper-multipath-0.4.9-23.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 15:11:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben Marzinski 2010-06-25 00:20:39 EDT
device-mapper is unable to load tables that include offlined devices.  So far, I can only see this when I manually offline the device with:

# echo offline > /sys/block/<devname>/device/state

Unfortunately, when multipathd tries to add a path to a multipath device with an offlined path device, it needs to reload the device.  This will fail. Worse, multipathd will retry the reload, and will livelock.

If you run multipath, it will segfault.  When multipath examines the existing multipath devices, it will see the offlined path. However, since the path is offline, multipath will not have gotten any of the path info, and it will crash trying to select a checker without already having the sysfs info.
Comment 1 Ben Marzinski 2010-06-25 00:27:43 EDT
I have a fix for this.  The ideal fix would be for the device-mapper kernel code to allow new tables with offlined devices, if the old table already included the devices.  Instead, I fixed the resulting problems in the multipath code.

multipathd will still not be able to reload the table, but it will add the new path device to the pathlist, where it can be adopted from later, and multipathd won't livelock.

Also multipath will now grab the sysfs pathinfo if necessary before trying to select a checker.
Comment 2 Ben Marzinski 2010-06-25 00:33:40 EDT
To reproduce this bug

1. Setup a multipath device with multiple paths
2. run
# echo offline > /sys/block/<path1>/device/state
3. run
# echo 1 > /sys/block/<path2>/device/delete

This should fail to remove the path, because you can't reload the table with path1 offlined.  Then

4. run
# scsi-rescan

This will make multipathd go into a livelock trying to readd the new path2 device. To see the multipath error

5. kill multipathd
6. run
# multipath

This will segfault, since multipath doesn't get the sysfs info from path1 before it tries to select a checker for it.
Comment 3 Ben Marzinski 2010-06-25 00:39:49 EDT
If this can actually be hit in without manually offlining the device, this fix will still have the problem that multipathd won't be able to reload the table to add the path back to the multipath device, when it adds the path to its list of available paths.  This was true in RHEL5 as well. However it never really bothered people since path devices didn't get removed when they failed.  To work around this issue in RHEL6, users can set

dev_loss_tmo and fast_io_fail_tmo to high enough values that their devices never get removed when the fail. This will make RHEL6 work like RHEL 5.

However, I have not been able to recreate this without manually offlining the device, and no testers have reported this problem, so I'm not sure that it will ever come up in normal operations.
Comment 4 RHEL Product and Program Management 2010-06-25 00:42:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 5 Ben Marzinski 2010-06-28 18:46:04 EDT
multipathd now only tries to reload 3 times in ev_add_path if the load fails.  Also, multipath will now pull in the sysfs information for devices that lack it.  This allows multipath and multipathd to cope with this without segfaulting or getting stuck in inifinte loops.
Comment 6 Ben Marzinski 2010-06-28 19:09:33 EDT
You can pick up packages with this fix at http://people.redhat.com/bmarzins/device-mapper-multipath/rpms/RHEL6/
Comment 8 Ben Marzinski 2010-07-21 17:36:01 EDT
*** Bug 608797 has been marked as a duplicate of this bug. ***
Comment 11 Barry Donahue 2010-09-21 16:19:49 EDT
Verified by partner.
Comment 12 releng-rhel@redhat.com 2010-11-10 15:11:31 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. 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.