Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 156873 - File descriptor 3 left open
Summary: File descriptor 3 left open
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd
Version: 4.0
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: Peter Jones
QA Contact: Mike McLean
: 167860 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-04 20:27 UTC by Pamela Fong
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-09-12 16:44:06 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Pamela Fong 2005-05-04 20:27:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319

Description of problem:
On boot, get several disturbing messages, "File descriptor 3 left open".  This happens on three different PC systems (SCSI, IDE, and Virtual PC), which were automatically partitioned with Disk Druid using LVM2.  The systems seem to run fine on the surface.  However, I'm worried these are indicators of file system problems.  I didn't know whether to classify this as a problem with my installation (me), with grub, anaconda, with nash, or the kernel.

root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.6.9-5.0.5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
   [Linux-bzImage, setup=0x1400, size=0x15cc3e]
initrd /initrd-2.6.9-5.0.5.EL.img
   [Linux-initrd @ 0xfef1000, 0xee087 bytes]
Uncompressing Linux... Ok, booting the kernel.
audit(1115133862.314:0): initialized
Red Hat nash version 4.1.18 starting
File descriptor 3 left open
  Reading all physical volumes.  This may take a while
  /dev/hdc: open failed: No medium found
  Found volume group "VolGroup00" using metadata type lvm2
File descriptor 3 left open
  2 logical volume(s) in volume group "VolGroup00" now active
File desriptor 3 left open
INIT: version 2.85 booting

Version-Release number of selected component (if applicable):
kernel-2.6.9-5.0.5EL grub-0.95-3.1

How reproducible:

Steps to Reproduce:
1.  Boot into Linux

Actual Results:  Boot messages report, "File descriptor 3 left open"

Expected Results:  If there is no problem, then report success or be silent.  The phrasing that something is "left open" evokes despondency akin to "the barn door was left open, and all the horses are missing".

Additional info:

Here is the text of /boot/grub/grub.conf:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
title Red Hat Enterprise Linux AS (2.6.9-5.0.5.EL)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-5.0.5.EL ro
root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.9-5.0.5.EL.img
title Red Hat Enterprise Linux AS (2.6.9-5.EL)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-5.EL ro root=/dev/VolGroup00/LogVol00
rhgb quiet
        initrd /initrd-2.6.9-5.EL.img

Comment 1 Mark Wharton 2005-06-03 14:11:13 UTC
I am seeing the exact same problem with my new install of Red Hat Desktop (v. 
4 for 32-bit x86).

This bug did not occur with Fedora Core v. 3

Comment 2 Mike Malone 2005-07-14 20:02:05 UTC
I also see this on a Dell c800 Latitude laptop used for QA/Testing.  This
problem did not occur with v9.  I have RHEL AS v4 Update 1 for 32-bit x86.

There does seem to be something wrong with the filesystem because Acronis 8
detects a problem and will not image the drive except by sector.

Even when the OS is shutdown/halted normally I get this message.

Is there any fix for this issue yet?

Comment 3 Mike Malone 2005-07-14 20:37:45 UTC
A similar error has been reported in Bugzilla Bug 156854 รข panic in lvm on start
up of x86_64 mach

Maybe these are related?

Comment 4 Ronald Cole 2005-09-08 03:06:15 UTC
I just installed x86_64 RHEL 4 ES Update 1 on a Tyan S2676 with two 3.6G Xeons.
 The file system configuration is four 73G U320 drives with the second two being
RAID1 mirrors of the first two.  The first drive consists of one partition for
/boot and an LVM2 physical volume.  The second drive is one big LVM2 PV.  The
two LVM2 PVs are configured as one volume group with ten logical volumes.  I did
an "everything" installation.

On rebooting, the system hangs for over a minute after printing the nash version
and then gives me the "File descriptior 3 left open" messages as above.  

As for classifying the problem, personally, I suspect that it's an LVM2 since it
appears that it's the part doing the complaining.

So, I'm not sure whether I should deploy RHEL4 in a mission critical
environment, yet.

Comment 5 Ronald Cole 2005-09-08 23:32:20 UTC
I looked at it a bit more and it looks kinda like the kernel, while attempting
to mount the root file systems, manages to run lvm somehow (I'm not a boot
process guru, and I couldn't manage to grep it's secrets in the half hour I
spent looking at this problem).

If you look at _close_stray_fds() in lvmcmdline.c, you'll see that it tries to
clean up any fd's that somehow managed to not get closed.  There appears to be
an LVM2 option to squelch that particular error message, but it would seem that
the boot process is not using it.  Anyway, the message appears to mean that a
stray fd was identified and closed.

Now, what particular LVM commands is being run (I only get two "left open"
messages instead of the three that Ms. Fong reports) are still unknown to me,
but it seems obvious that the code that implements it isn't closing all the
files it opens and gets caught before the lvm command exits.

This problem should probably be identified and fixed before the Update 2 errata
is released (bug #158692).

Comment 6 Ronald Cole 2005-09-08 23:59:43 UTC
I opened bug #167860 against lvm2.  Someone should probably close this bug as a
duplicate of it.

Comment 7 Suzanne Hillman 2005-09-09 20:08:38 UTC
*** Bug 167860 has been marked as a duplicate of this bug. ***

Comment 9 Alasdair Kergon 2005-09-12 16:44:06 UTC
The problem is actually in 'nash' in the mkinitrd package and is fixed in
mkinitrd- which should be included in U2.

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