mdmon: device descriptor is not closed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OEM Priority Project |
Fix Released
|
High
|
Unassigned | ||
mdadm |
Invalid
|
Undecided
|
Unassigned | ||
mdadm (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned |
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/
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.
tags: | added: focal |
Changed in oem-priority: | |
importance: | Undecided → High |
tags: | added: vroc |
tags: | added: oem-priority |
Changed in mdadm (Ubuntu Impish): | |
status: | Incomplete → Fix Committed |
Changed in mdadm (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in mdadm (Ubuntu Impish): | |
status: | Fix Committed → Fix Released |
Changed in oem-priority: | |
status: | New → Fix Released |
Hi, issue is fixed by: /git.kernel. org/pub/ scm/utils/ mdadm/mdadm. git/commit/ ?id=91c97c54320 28875db5f8abedd b5cb5f31902001
https:/
Thanks,
Mariusz