[Bug 1868708] [NEW] mdmon: device descriptor is not closed
Mariusz Tkaczyk
1868708 at bugs.launchpad.net
Tue Mar 24 11:22:31 UTC 2020
Public bug reported:
When device disappears from the system "mdadm -If" is triggered by udev
and drive is removed from the corresponding array and container. The
missing close() in metadata manager (mdmon) causes that userspace
handler to the device is still opened (can be tracked by lsof -p
<mdmon_pid>).
For nvme drives it causes weird namespace number after hot-plug (e.g. will appear nvme1n2). The issue affects only IMSM metadata format.
Reproducible on Focal with latest mdadm 4.1-5ubuntu1.
Steps:
1. Create IMSM container:
#mdadm -CR imsm -e imsm -n2 /dev/nvme[01]n1
2. Create IMSM array:
#mdadm -CR vol1 -l1 -n2 /dev/nvme[01]n1
3. remove via sysfs drive:
#echo 1 > /sys/block/nvme0n1/device/device/remove
4. restore the same drive:
#echo 1 > /sys/bus/pci/rescan
5. see mdstat and lsblk:
# cat /proc/mdstat
Result:
/dev/nvme0n2 appears in system.
** Affects: mdadm (Ubuntu)
Importance: Undecided
Status: New
** Tags: patch-accepted-upstream
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1868708
Title:
mdmon: device descriptor is not closed
Status in mdadm package in Ubuntu:
New
Bug description:
When device disappears from the system "mdadm -If" is triggered by
udev and drive is removed from the corresponding array and container.
The missing close() in metadata manager (mdmon) causes that userspace
handler to the device is still opened (can be tracked by lsof -p
<mdmon_pid>).
For nvme drives it causes weird namespace number after hot-plug (e.g. will appear nvme1n2). The issue affects only IMSM metadata format.
Reproducible on Focal with latest mdadm 4.1-5ubuntu1.
Steps:
1. Create IMSM container:
#mdadm -CR imsm -e imsm -n2 /dev/nvme[01]n1
2. Create IMSM array:
#mdadm -CR vol1 -l1 -n2 /dev/nvme[01]n1
3. remove via sysfs drive:
#echo 1 > /sys/block/nvme0n1/device/device/remove
4. restore the same drive:
#echo 1 > /sys/bus/pci/rescan
5. see mdstat and lsblk:
# cat /proc/mdstat
Result:
/dev/nvme0n2 appears in system.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1868708/+subscriptions
More information about the foundations-bugs
mailing list