Bug 1600778 - os-prober gives device-mapper errors
Summary: os-prober gives device-mapper errors
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-13 02:47 UTC by ghborrmann
Modified: 2019-08-22 17:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 19:02:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description ghborrmann 2018-07-13 02:47:34 UTC
Description of problem:
Running grub2-mkconfig, I frequently get one or more error messages from os-prober:

device-mapper: remove ioctl on osprober-linux-sda12  failed: Device or resource busy
Command failed


Version-Release number of selected component (if applicable):
1:2.02-38.fc28


How reproducible:
Not exactly.  Occasionally grub2-mkconfig will run without any error, but usually there are one or more errors.  The partitions named in successive invocations are usually different.


Steps to Reproduce:
1.  Run  dmsetup ls  to ensure there are no leftover osprober-linux* devices.
2.  Run  grub2-mkconfig -o grub.cfg


Actual results:
Console output may be error-free, but usually contains one or more of the device-mapper failed messages.  The grub.cfg file generated is usable, but there are no entries for the partition(s) identified in the error messages


Expected results:
No error messages, and the grub.cfg file contains entries for all of the identified os installations.


Additional info:
There are no error messsages in the syslog (journalctl -b), although the debug messages produced from os-prober are very numerous.

The non-reproducibility of the results seems to be a timing issue: some part of the code is trying to remove the device-mapper device before another part succeeds in closing something on that device.

I have never encountered this error on previous Fedoras: 17 thru 27.  I have two other computers, and this bug does not affect them.  One difference: the cpu is AMD Athlon(tm) 64 X2 Dual Core Processor 5000+.  Another difference: this system has two hard disks having 12 and 14 partitions.

Comment 1 ghborrmann 2018-11-03 19:57:57 UTC
I have now encountered the problem on another computer: it has an Intel i7-6700 processor. This computer has three hard disks, with 16,3,and 1 partitions, respectively.  I don't use LVM.  I have installed Fedora 29 (XFCE) on this computer.  Errors are exactly as described earlier, but occur somewhat more consistently.  The errors are always on ext4 partitions, and have even occurred on partitions without an operating system.

I have tracked down the source of the errors to the execution of /usr/bin/os-prober within the script /etc/grub.d/30_os-prober.  Since the errors do not appear consistently, I am guessing that it is a timing problem: the software attempts to release a device before a previous operation has completed.  When no errors occur, the previous operation apparently has enough time to complete before the device is released.  In my case, it's possible that the multitude of partitions on my disk delays the operation enough to cause the problem.

These errors do not prevent os-prober from performing its task: it generates a list of operating systems for later processing within 30_os-prober.  This later processing relies on execution of /usr/bin/linux-boot-prober.  When dmsetup ls reports a device of osprober-linux-sdaxx, linux-boot-prober will refuse to recognize that partition as a linux operating system.

As a temporary fix, I have inserted into 30_os-prober, after execution of os-prober, dmsetup remove commands for any osprober* devices left over. That fix results in generation of the menu entries for all of the operating systems.  It does not, of course, eliminate the error messages.

I've noted that my original report has generated no responses.  Apparently most fedora users don't encounter this problem, but I find it hard to believe that others have not had a problem with this.  The problem has gotten more severe for me as time has gone by; perhaps others who have been living with this problem may see this worsening with time as well.

Comment 2 Ben Cotton 2019-05-02 19:21:19 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2019-05-02 20:23:12 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Dr J Austin 2019-05-18 13:43:32 UTC
This problem is still present in F30

A new install of F30 on an existing SSD containing F29 did not provide a grub
entry for F29.


Investigations showed that on a fully updated F30
consecutive running of  grub2-mkconfig -o fredx sometimes gives different results!

[root@naxos:~]$ ltr fred*
-rw-r--r--. 1 root root 9264 May 18 10:54 fred1
-rw-r--r--. 1 root root 5850 May 18 10:54 fred2
-rw-r--r--. 1 root root 5850 May 18 10:54 fred3
-rw-r--r--. 1 root root 5850 May 18 10:56 fred4
-rw-r--r--. 1 root root 5850 May 18 10:59 fred5
-rw-r--r--. 1 root root 9270 May 18 13:09 fred6

[root@naxos:~]$ grub2-mkconfig -o fred6
Generating grub configuration file ...
device-mapper: remove ioctl on osprober-linux-nvme0n1p7  failed: Device or resource busy
Command failed.
device-mapper: remove ioctl on osprober-linux-nvme0n1p9  failed: Device or resource busy
Command failed.
Found Fedora 27 (Twenty Seven) on /dev/nvme0n1p5
Found Fedora 29 (Twenty Nine) on /dev/nvme0n1p7
Adding boot menu entry for EFI firmware configuration
done


[root@naxos:~]$ blkid -c /dev/null
/dev/nvme0n1: PTUUID="244cc500-118e-4038-a410-695aa42734a2" PTTYPE="gpt"
/dev/nvme0n1p1: SEC_TYPE="msdos" UUID="E14A-89D0" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="d4e09126-17d4-4f74-bece-068315603c12"
/dev/nvme0n1p2: PARTLABEL="BIOS boot partition" PARTUUID="c047c873-be17-4c0d-960c-55133e3d4972"
/dev/nvme0n1p3: LABEL="hayling3_boot" UUID="3ca8620d-4be7-4e41-9e1a-424127760150" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="2a80d7bc-c7cd-440e-ae5d-655904db9f85"
/dev/nvme0n1p4: LABEL="naxos4_swap" UUID="2ef4a1b2-4255-4cc7-9c2c-472279b17f88" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="12bbef74-e7f6-4d91-8a89-4d4a008fc12c"
/dev/nvme0n1p5: LABEL="hayling5_F27" UUID="c2898f0e-65cd-4496-a000-e78d8b88a39f" TYPE="ext4" PARTLABEL="hayling5_F23" PARTUUID="5c0eace8-f153-495b-8cc2-be6f06a4e557"
/dev/nvme0n1p6: LABEL="hayling6_data" UUID="416a3b40-9992-469e-bb39-d8f7cc4e0d62" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="c5584bf6-8b39-4f97-99ad-687913555292"
/dev/nvme0n1p7: LABEL="naxos7_F29" UUID="1a9ccef1-af1c-4c26-8e4d-64a25bc56fcc" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="65b8af5f-2280-4dc8-a231-a6557de210b5"
/dev/nvme0n1p8: LABEL="naxos8_F30" UUID="32524647-c8e8-49cb-9c6f-ae25b663fa54" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="583f12b8-7b6e-4f04-81af-3159ec0d5edc"
/dev/nvme0n1p9: LABEL="temp" UUID="b8f4cacf-810a-4bb0-8402-00cc66f2c52f" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="d61f16f8-2514-4680-8ae5-89798b53fb53"
/dev/mapper/osprober-linux-nvme0n1p7: LABEL="naxos7_F29" UUID="1a9ccef1-af1c-4c26-8e4d-64a25bc56fcc" TYPE="ext4"
/dev/mapper/osprober-linux-nvme0n1p9: LABEL="temp" UUID="b8f4cacf-810a-4bb0-8402-00cc66f2c52f" TYPE="ext4"
/dev/mapper/osprober-linux-nvme0n1p5: LABEL="hayling5_F27" UUID="c2898f0e-65cd-4496-a000-e78d8b88a39f" TYPE="ext4"
/dev/mapper/osprober-linux-nvme0n1p3: LABEL="hayling3_boot" UUID="3ca8620d-4be7-4e41-9e1a-424127760150" TYPE="ext4"
/dev/mapper/osprober-linux-nvme0n1p6: LABEL="hayling6_data" UUID="416a3b40-9992-469e-bb39-d8f7cc4e0d62" TYPE="ext4"

Comment 5 Ben Cotton 2019-05-28 19:02:26 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Dr J Austin 2019-05-28 19:18:36 UTC
I believe that this bug is still present in F30
See comment 5 above
Should it be re-opened?
Thanks

Comment 7 apt-ghetto 2019-08-22 17:09:55 UTC
I have created https://bugzilla.redhat.com/show_bug.cgi?id=1744693 with the same problem.


Note You need to log in before you can comment on or make changes to this bug.