kpartx causes kernel oops when NVMe devices is not in blacklist

Bug #1551828 reported by Ivan Suzdal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
multipath-tools (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Trusty
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

[Impact]
Users expecting to use multipath over NVMe device will notice hangs with any software attempting to use the device-mapper devices (/dev/dm-* or /dev/mapper/mpath*).

[Test case]
1) Setup multipath over nvme. (should not be possible with the patch in)
2) Run kpartx -av /dev/dm-device-mulipath-over-nvme (will hang without the patch)

[Regression Potential]
Minimal. This removes a theoretically valid use case of multipath devices using NVMe disks, which is not technically supported and leads to software hangs (and thus installs will not complete, and setting up multipath over NVMe post-install would hang).
This only affects nvme devices; so any storage device using the "nvme" naming would no longer be able to setup multipath even if technical specifications were to change sufficiently to support multipath over NVMe (or if some other device starts using this naming which isn't affected by the same limitations).

-----

When on bare metal uses NVMe devices - kpartx cause kernel oops.
http://paste.openstack.org/show/488638/

Also any tools which works with disks (e.g. fdisk, lsblk) hangs in D state (uninterruptible sleep) while trying to to read /dev/dm-X.
This bug is already described and fixed in upstream (http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=commitdiff;h=5c412e47e589b5325ed7de6cba86d906a671d9df)

I made patches for trusty and xenial versions of multipath-tools.
Patches which fix issue is in attach.
Could you apply this patches please, at least for trusty version?

Revision history for this message
Ivan Suzdal (isuzdal) wrote :
Revision history for this message
Ivan Suzdal (isuzdal) wrote :
summary: - kpartx cause kernel oops when NVMe devices is not in blacklist
+ kpartx causes kernel oops when NVMe devices is not in blacklist
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "trusty nvme blacklist" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

Could you have a look at this Mathieu?

Changed in multipath-tools (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
assignee: Mathieu Trudel-Lapierre (mathieu-tl) → nobody
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Yeah, this is pretty bad and the fixes are obviously right; I'll upload to xenial now and ship the trusty update with another SRU I was already preparing.

Changed in multipath-tools (Ubuntu Trusty):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Changed in multipath-tools (Ubuntu):
importance: Undecided → High
Changed in multipath-tools (Ubuntu Trusty):
importance: Undecided → High
Changed in multipath-tools (Ubuntu):
status: New → In Progress
Changed in multipath-tools (Ubuntu Trusty):
status: New → Triaged
Ivan Suzdal (isuzdal)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package multipath-tools - 0.5.0-7ubuntu16

---------------
multipath-tools (0.5.0-7ubuntu16) xenial; urgency=medium

  * debian/patches/dm-multipath-backlist-nvme-5c412e47.patch: blacklist NVMe
    from multipath, otherwise kpartx calls will hang. This is because mpath
    works at the request level (which NVMe bypasses), so multipathing is not
    supported on NVMe. (LP: #1551828)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 01 Mar 2016 11:55:13 -0500

Changed in multipath-tools (Ubuntu):
status: In Progress → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ivan, or anyone else affected,

Accepted multipath-tools into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/multipath-tools/0.4.9-3ubuntu7.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in multipath-tools (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Ivan Suzdal (isuzdal) wrote :

Looks like you forgot to add nvme patch to debian/patches/series
# ls debian/patches/ | grep nvme
dm-multipath-backlist-nvme-5c412e47.patch
# grep nvme debian/patches/series
#

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Ivan Suzdal (isuzdal) wrote :

Hi all!
Any ETA with series file? Can I help you somehow?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Just uploaded it to the trusty queue again, I'll get someone to review it and accept the upload.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Ivan, or anyone else affected,

Accepted multipath-tools into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/multipath-tools/0.4.9-3ubuntu7.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

This is verified OK on Trusty:

# lsb_release -c
Codename: trusty

# dpkg -s multipath-tools | grep ^Version
Version: 0.4.9-3ubuntu7.11

# ls -1 /dev/nvme*
/dev/nvme0
/dev/nvme0n1
/dev/nvme0n1p1
/dev/nvme0n1p2
/dev/nvme0n1p3

# multipath -v3 /dev/nvme0n1
Apr 07 13:25:25 | nvme0n1: device node name blacklisted

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package multipath-tools - 0.4.9-3ubuntu7.11

---------------
multipath-tools (0.4.9-3ubuntu7.11) trusty; urgency=medium

  * debian/patches/series: add dm-multipath-backlist-nvme-5c412e47.patch to
    the series file; it was missing in the previous upload and thus the patch
    intending to fix bug 1551828 was not applied. (LP: #1551828)

multipath-tools (0.4.9-3ubuntu7.10) trusty; urgency=medium

  [ Mathieu Trudel-Lapierre ]
  * debian/patches/dm-multipath-backlist-nvme-5c412e47.patch: blacklist NVMe
    from multipath, otherwise kpartx calls will hang. This is because mpath
    works at the request level (which NVMe bypasses), so multipathing is not
    supported on NVMe. (LP: #1551828)

  [ Mauricio Faria de Oliveira ]
  * Remove partition device nodes of individual paths (for LVM on multipath)
    (LP: #1540401)
    - debian/multipath-tools.dm-mpath-lvm.udev: udev rule for that.
    - debian/initramfs/hooks: copy the udev rule and partx to the initramfs.
    - debian/initramfs/init-top: load dm-multipath module for 'multipath -c'.
    - debian/rules: install the udev rule and init-top.

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 21 Mar 2016 10:41:36 -0400

Changed in multipath-tools (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for multipath-tools has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.