Bug 903906
Summary: | grub2-mkconfig produces a umount error | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Matthew Hassel <matthew.hassel> |
Component: | os-prober | Assignee: | Hedayat Vatankhah <hedayatv> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | bcl, dennis, hedayatv, heldwin, mads, Panos.Kavalagios, pjones, tschweikle, vedran |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | os-prober-1.58-6.fc19 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 896389 | Environment: | |
Last Closed: | 2014-05-17 06:28:29 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: | |||
Attachments: |
Description
Matthew Hassel
2013-01-25 03:16:24 UTC
omit the windows probing... I was simply trying to run the command: grub2-mkconfig -o /boot/grub2/grub.cfg after editing /etc/default/grub omit the windows probing... I was simply trying to run the command: grub2-mkconfig -o /boot/grub2/grub.cfg after editing /etc/default/grub grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg performed the above command and the same error was produced. Generating grub.cfg ... Found theme: /boot/grub2/themes/system/theme.txt Found linux image: /boot/vmlinuz-3.6.11-1.fc17.x86_64 Found initrd image: /boot/initramfs-3.6.11-1.fc17.x86_64.img Found linux image: /boot/vmlinuz-3.6.10-2.fc17.x86_64 Found initrd image: /boot/initramfs-3.6.10-2.fc17.x86_64.img Found linux image: /boot/vmlinuz-3.6.9-2.fc17.x86_64 Found initrd image: /boot/initramfs-3.6.9-2.fc17.x86_64.img No volume groups found umount: /var/lib/os-prober/mount: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) rmdir: failed to remove `/var/lib/os-prober/mount': Device or resource busy Found Microsoft Windows 2000 Professional on /dev/sdb1 Found Fedora release 10 (Cambridge) on /dev/sdb2 done wanted to provide an update... This was on KDE. Since then I have performed a clean install, but used GNOME. the function above works, I am able to make changes to my grub.cfg. With that said, the issue [potentially] only occurred with KDE desktop. It shouldn't be related to any Window Manager, but I think you might be right. I speak KDE too. I have booted in Single User mode and the problem did not occur. It only printed dmesg errors due to using a console term. I have also performed some tests on VT2 with KDE session active and not logged to KDE at all and the problem only occurs when there is a KDE session. Wild guess: KDE Device Notifier is doing something nasty? Attaching the files in single user mode, KDE session and dmesg errors. Created attachment 690772 [details]
grub2-mkconfig output in KDE session
Created attachment 690773 [details]
grub2-mkconfig output in Single User mode
Created attachment 690774 [details]
grub2-mkconfig dmesg output
Can you discover which process keeps the device busy using lsof? Can it be KDE's indexer (akonadi IIRC)? (And I wonder why a clone of this bug exists?!) The lsof command does not display any output: root@bb229:[262] ~ # lsof +D /var/lib/os-prober/mount -x -r 1lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/500/gvfs Output information may be incomplete. ======= ======= ======= ======= during the grub2-mkconfig execution. Furthermore, akonadi, stringi and all those alike are disabled in my system. Please run os-prober, and attach its output in /var/log/messages. Also please specify which device is mounted on /var/lib/os-prober/mount after running os-prober. Created attachment 703832 [details]
Part of /var/log/messages with os-prober statements
The requested information:
root@bb229:[205] ~ # os-prober
/dev/sdb1:Microsoft Windows 2000 Professional:Windows:chain
/dev/sdb2:Fedora release 10 (Cambridge):Fedora:linux
umount: /var/lib/os-prober/mount: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy
root@bb229:[206] ~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 1578104 0 1578104 0% /dev
tmpfs 1589628 1284 1588344 1% /dev/shm
tmpfs 1589628 7136 1582492 1% /run
tmpfs 1589628 0 1589628 0% /sys/fs/cgroup
/dev/sda2 10325780 458312 9342948 5% /
/dev/sda6 30969568 20713956 8682452 71% /usr
tmpfs 1589628 96 1589532 1% /tmp
/dev/sda5 5170664 1607908 3300096 33% /var
/dev/sda8 498992196 342203784 131441060 73% /opt
/dev/sda1 1043548 228956 761580 24% /boot
/dev/sda7 412857852 256229196 135656604 66% /home
/dev/sdb9 2901117 2334193 566924 81% /var/lib/os-prober/mount
root@bb229:[207] ~ # fdisk -l /dev/sdb
Disk /dev/sdb: 82.0 GB, 81964302336 bytes, 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6443ac45
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 40965749 20482843+ 7 HPFS/NTFS/exFAT
/dev/sdb2 40965750 43070264 1052257+ 83 Linux
/dev/sdb3 43070265 45174779 1052257+ 82 Linux swap / Solaris
/dev/sdb4 45174780 160071659 57448440 f W95 Ext'd (LBA)
/dev/sdb5 45174843 55665224 5245191 83 Linux
/dev/sdb6 55665288 59858189 2096451 83 Linux
/dev/sdb7 59858253 80823014 10482381 83 Linux
/dev/sdb8 80823078 154223999 36700461 83 Linux
/dev/sdb9 154224063 160071659 2923798+ b W95 FAT32
I had the same message when running grub2-mkconfig I reboot-ed and unplugged the USB external harddrive, and the message disappeared. Plugged again, message appears again. Also, no directories in /var/lib/os-prober/mount (previously I had the directories from that USB external harddrive, which i use for both fedora-KDE and win8) Hope it helps. I'm open to questions [root@localhost bozi]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found theme: /boot/grub2/themes/system/theme.txt Found linux image: /boot/vmlinuz-3.8.1-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.1-201.fc18.i686.PAE.img Found Windows 8 (loader) on /dev/sda1 done [root@localhost bozi]# grub2-set-default "Windows 8 (loader) (on /dev/sda1)" [root@localhost bozi]# mc [root@localhost home]# ^C [root@localhost home]# [root@localhost home]# [root@localhost home]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found theme: /boot/grub2/themes/system/theme.txt Found linux image: /boot/vmlinuz-3.8.1-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.1-201.fc18.i686.PAE.img umount: /var/lib/os-prober/mount: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy ^X^C [root@localhost home]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found theme: /boot/grub2/themes/system/theme.txt Found linux image: /boot/vmlinuz-3.8.1-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.1-201.fc18.i686.PAE.img rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy Found Windows 8 (loader) on /dev/sda1 done hmm.... weird. Would you please manually try to unmount /var/lib/os-prober/mount after receiving the error? I wonder who is keeping the device busy if no files are open. Specially as (apparently) it doesn't happen always. Checking the system processes with top, during the os-prober, I've noticed that plasma-desktop and krunner are running before os-prober prints the umount error: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 32668 panos 20 0 3385m 99m 28m R 71.7 3.2 3:36.95 plasma-desktop 32704 panos 20 0 933m 28m 14m S 10.3 0.9 0:07.05 krunner 301 root 20 0 299m 14m 14m S 3.9 0.5 0:07.75 systemd-journal 32626 panos 20 0 1349m 99m 14m S 3.5 3.2 0:11.10 kded4 556 panos 20 0 1770m 382m 32m S 3.2 12.3 29:58.27 firefox 681 panos 20 0 560m 29m 19m S 2.6 1.0 0:51.70 konsole 32708 panos 20 0 443m 96m 10m S 2.3 3.1 6:00.07 skype 28323 panos 20 0 115m 1476 996 R 1.6 0.0 0:00.81 top 29883 root 20 0 145m 36m 21m S 1.6 1.2 5:05.40 X 32671 panos 20 0 12040 1108 744 S 1.6 0.0 0:39.78 ksysguardd 471 panos 20 0 1123m 132m 24m S 1.3 4.3 4:32.86 thunderbird 870 panos 20 0 1962m 25m 4200 S 1.0 0.8 1:38.52 java 1147 root 20 0 343m 3536 1888 S 1.0 0.1 1:05.77 udisksd 1188 colord 20 0 325m 988 600 S 1.0 0.0 0:00.28 colord 23661 root 20 0 0 0 0 S 1.0 0.0 0:00.83 kworker/0:1 23533 root 20 0 0 0 0 S 0.6 0.0 0:00.63 kworker/1:1 27522 root 20 0 317m 4600 3640 S 0.6 0.1 0:00.08 packagekitd 30252 root 20 0 109m 1020 636 S 0.6 0.0 0:00.09 os-prober 32658 panos 20 0 2939m 28m 15m S 0.6 0.9 2:02.45 kwin 32664 panos 20 0 1161m 20m 12m S 0.6 0.7 0:03.32 knotify4 Perhaps, those are the processes to blame. (In reply to comment #14) > hmm.... weird. Would you please manually try to unmount > /var/lib/os-prober/mount after receiving the error? I wonder who is keeping > the device busy if no files are open. Specially as (apparently) it doesn't > happen always. hi hedayat on my system it happens always. so I didn't unmount the USB hd, I unplugged it (between complete halt and the next boot) you say: "Would you please manually try to unmount /var/lib/os-prober/mount after receiving the error?" just tell me the sequence of the command line scripts, and I'll execute them for you... Hi, Just run: umount /var/lib/os-prober/mount And also following commands: mount lsof +D /var/lib/os-prober/mount -x and report the results. Thanks! @Panos: What happens when you run the umount command manually? > @Panos: What happens when you run the umount command manually?
The manual umount command always succeeds with no single issue.
Weird; can you try running os-prober when KDE is not running? (e.g. in runlevel 3) Created attachment 713250 [details] Output of "strace -p<plasma-desktop PID>" Hello Hedayat, This is done already in Comment 5. No need for single user mode. Log out KDE and press Control-Alt-F2 to get a VT screen is enough to run os-prober without any umount problems. Please, let me know if you need an alternative scenario. Does KDE runs any daemon to execute autorun or something on newly mounted partitions? Anyway, I have issued strace on the PID of plasma-desktop and I enclose a proof that it performs stat(), lstat() and statfs() on the /var/lib/os-prober/mount directory. Are those to blame for the busy mount point? Oops, sorry. :P I'm not sure, but apparently something in KDE keeps the device busy. However, I wonder why you don't have any problems when manually unmount the device. Maybe you'll have problems if you run umount right after running os-prober (e.g. os-prober && umount /var/lib/os-prober/mount). (In reply to comment #17) > Hi, > > Just run: > umount /var/lib/os-prober/mount > > And also following commands: > mount > lsof +D /var/lib/os-prober/mount -x > > and report the results. > Thanks! > > @Panos: What happens when you run the umount command manually? Hi I booted fedora with usb from the external hd plugged in. This is the copy-paste from terminal: [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# lsof +D /var/lib/os-prober/mount -x lsof: WARNING: can't stat(/var/lib/os-prober/mount): No such file or directory lsof: -x must accompany +d or +D lsof 4.87 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [-Z [Z]] [--] [names] Use the ``-h'' option to get more help information. [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found theme: /boot/grub2/themes/system/theme.txt Found linux image: /boot/vmlinuz-3.8.3-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.3-201.fc18.i686.PAE.img Found linux image: /boot/vmlinuz-3.8.2-206.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.2-206.fc18.i686.PAE.img Found linux image: /boot/vmlinuz-3.8.1-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.1-201.fc18.i686.PAE.img umount: /var/lib/os-prober/mount: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy ^C [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# umount /var/lib/os-prober/mount [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# lsof +D /var/lib/os-prober/mount -x lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found theme: /boot/grub2/themes/system/theme.txt Found linux image: /boot/vmlinuz-3.8.3-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.3-201.fc18.i686.PAE.img Found linux image: /boot/vmlinuz-3.8.2-206.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.2-206.fc18.i686.PAE.img Found linux image: /boot/vmlinuz-3.8.1-201.fc18.i686.PAE Found initrd image: /boot/initramfs-3.8.1-201.fc18.i686.PAE.img Found Windows 8 (loader) on /dev/sda1 done [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# lsof +D /var/lib/os-prober/mount -x lsof: WARNING: can't stat(/var/lib/os-prober/mount): No such file or directory lsof: -x must accompany +d or +D lsof 4.87 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [-Z [Z]] [--] [names] Use the ``-h'' option to get more help information. [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# [root@localhost bozi]# (In reply to comment #21) > Oops, sorry. :P > I'm not sure, but apparently something in KDE keeps the device busy. > However, I wonder why you don't have any problems when manually unmount the > device. Maybe you'll have problems if you run umount right after running > os-prober (e.g. os-prober && umount /var/lib/os-prober/mount). Confirmed: root@bb229:[201] ~ # os-prober && umount /var/lib/os-prober/mount /dev/sdb1:Microsoft Windows 2000 Professional:Windows:chain /dev/sdb2:Fedora release 10 (Cambridge):Fedora:linux umount: /var/lib/os-prober/mount: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy umount: /var/lib/os-prober/mount: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) root@bb229:[202] ~ # The second umount error is from the manual command. It's temporary the issue that keeps the device busy. I have a very old PC and maybe the issue is not reproduced on modern CPU systems that are quick enough. Or maybe something has changed in mount that made it to complain for a busy filesystem, even if a stat is called against that mount point. I would also like to note that it worked fine previously and the issue appeared after a certain update several months ago. I cannot remember well to narrow the exact period though. Strange enough, but this command always succeeds. I have tried it many times: root@bb229:[214] ~ # os-prober && sleep 1 && umount /var/lib/os-prober/mount /dev/sdb1:Microsoft Windows 2000 Professional:Windows:chain /dev/sdb2:Fedora release 10 (Cambridge):Fedora:linux umount: /var/lib/os-prober/mount: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) rmdir: failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy root@bb229:[215] ~ # A pause of 1 second is enough for the umount command to succeed. So whatever keeps the device busy (plasma-desktop?) is doing that for miliseconds. A pause in os-prober could be a workaround, but not a proper fix. The correct would be to get rid of the KDE app that keeps the device busy. OK, both issues look the same since bozi's umount command also succeeded. (@bozi, sorry the lsof command I told you didn't work since /var/lib/os-prober didn't exist, you can probably use /var/lib instead). It might have happened after os-prober or KDE updates. We have made some small changes in os-prober to make it faster, so if the required delay is small it might not happen with older os-prober Fedora packages. But it might be KDE too. Any file system usage can make the device busy and I'm not sure if there is a bug in this area. It seems that we need either a way to tell KDE to not touch our mount point, or in os-prober we should retry umounting for a few times if it didn't succeed the first time. *** Bug 896389 has been marked as a duplicate of this bug. *** Had it happen on Fedora 20 final as well. This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 'version' of '18'. 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 prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 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 to Fedora 18's end of life. 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. Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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. *** Bug 1060459 has been marked as a duplicate of this bug. *** *** Bug 1066656 has been marked as a duplicate of this bug. *** os-prober-1.58-6.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/os-prober-1.58-6.fc20 os-prober-1.58-6.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/os-prober-1.58-6.fc19 Package os-prober-1.58-6.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing os-prober-1.58-6.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-6117/os-prober-1.58-6.fc19 then log in and leave karma (feedback). os-prober-1.58-6.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. os-prober-1.58-6.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. It still emits a warning message: umount: /var/lib/os-prober/mount: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) but the mount point is unmounted. Is that the expected behaviour? If not, it might need to reopen the ticket. I've not muted umount errors, so it is expected. However, it should also emit an error in system logs: umount error, retrying after 1 sec It seems the bug is actually fixed, however it might be better to mute umount errors if it was resolved after retrying. Anyway, please don't reopen the bug. You are right. There is also the following log entry: May 19 09:11:28 bb229 panos: 50mounted-tests: error: umount error, retrying after 1 sec No, it's OK if that is the expected behaviour. Either a mute or a message to explain do not panic the mount point is already unmounted would be a nice additional improvement :) It does it again in f21 (it was fixed at some time or couldn't reproduce it in #1066656). # grub2-mkconfig -o /boot/grub2/grub.cfg [...] umount: /var/lib/os-prober/mount: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) if my backup partition is not automounted while running this command if I access it to automount it, the error message doesn't appear. forgot the version: os-prober-1.58-10.fc21.x86_64 Don't you see any messages like this: "umount error, retrying after 1 sec" ?! nope, I don't have a message like that. posted the full message I get at the end of the command (except the kernel lines it had found) I mean in the command output. In /var/log/messages, I do see it. 50mounted-tests: error: umount error, retrying after 1 sec But it only does it if my by backup on /dev/sdb1 is not mounted, if it is, the message doesn't appear. But sorry, that message seems enough for most people. Each time I see this message, I mount the backup partition, and restart the command, because for me, it is really unclear if it was really completely successful or not (it is probably ?). It is the fact I didn't see it for several time that made me think something changed after the upgrade (will just add a post-it on my screen to remember to not post about it in a few months). Ah, I didn't notice that umount error appears on standard error but the retry message appears in system logs; which is confusing. I'll fix it so that it won't print any error messages if the retry is successful. Thanks for the report. |