Bug 1444194

Summary: Multipathd crashes
Product: Red Hat Enterprise Linux 7 Reporter: Ben Marzinski <bmarzins>
Component: device-mapper-multipathAssignee: Ben Marzinski <bmarzins>
Status: CLOSED ERRATA QA Contact: Lin Li <lilin>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: agk, anasubra, bmarzins, heinzm, jbrassow, lilin, msnitzer, nkshirsa, prajnoha, rbalakri, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: device-mapper-multipath-0.4.9-110.el7 Doc Type: Bug Fix
Doc Text:
Cause: multipath was incorrectly matching kpartx partition devices with the device that they were a partition of. This could cause multipath to think a kpartx partition device was a partition of itself. Consequence: In rare cases mutipath would recursively read the same device trying to find all of its partitions, and run out of memory and crash. Fix: Multipath now correctly determines which device a kpartx partition devices belongs to Result: Multipath now always correctly removes partition devices without crashing
Story Points: ---
Clone Of: 1442369 Environment:
Last Closed: 2017-08-01 16:36:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1442369    
Bug Blocks:    

Comment 2 Ben Marzinski 2017-05-11 15:33:50 UTC
Reproducing this is kind of tricky. You need to force a situation where the minor number of a kpartx partition matches the minor number of its multipath device for all of kpartx minor numbers digits.  For example, if the multipath device has a minor number of 103 and the kpartx device has a minor number of 10, this will work. The string "10" matches the string "103", for both of the characters in "10". The easiest way to do this is to create a bunch of random dm devices (you could use the error target) before creating the multipath device with partitions. After you create the multipath device, remove the partition devices, remove the lowest numbered junk device (hopefully it's dm-1, so you only need the multipath device to be dm-10. If you already have some dm devieces, so the lowest numbered junk device is dm-3 for instance, you need the
multipath device to be somewhere between dm-30 and dm-39), and recreate the partition devices. One of the partition devices should now have that low minor number. Then you can try either renaming or removing the multipath device.

Comment 3 Ben Marzinski 2017-05-12 21:31:28 UTC
Multipath now does a better job of making sure that the partition devices are actually partitions of the correct device.

Comment 15 errata-xmlrpc 2017-08-01 16:36:55 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://access.redhat.com/errata/RHBA-2017:1961