Red Hat Bugzilla – Bug 159878
/sbin/fsck.ext3 doesn't close fd for unrecognized device files
Last modified: 2015-01-07 19:10:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2
Description of problem:
When probing device files, the fsck command doesn't close the fd for
those devices not recognized.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. creating about 1024 partitions which are not formarted.
2. adding labeled partition into /etc/fstab like follows:
LABEL=dummy /hoge ext3 defaults,noauto 0 0
(NOTE: the partition labeled "dummy" does not exist.)
3. execute fsck
(power off a system forcely, and reboot it)
Actual Results: rc.sysinit scripts shows:
Checking root filesystem
[/sbin/fsck.ext3 (1) --/] fsck.ext3 -a /dev/sda2
/: Error determining size of the physical device: Too many open files
Expected Results: The system boot with no errors.
Attaching patch to fix problem
Created attachment 115237 [details]
Patch to close fd when probing unrecognized devices
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.