Bug 169427

Summary: initscripts - "File descriptor 53 left open"
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: agk, bikehead, notting, pjones, sangu.fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-04 00:21:30 UTC Type: ---
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 Flags
lsof output a moment before lvm commands are called none

Description Michal Jaegermann 2005-09-28 07:37:56 UTC
Description of problem:

This message quoted in summary does not want to go away already for some
time on x86_64.  On i386 does not seem to be present.

A corresponding fragment of startup messages looks like follows:

....
Starting udev:                                             [  OK  ]
Initializing hardware...  storage network audio done       [  OK  ]
Loading default keymap (emacs2):                           [  OK  ]
Setting hostname localhost.localdomain:                    [  OK  ]
Setting up Logical Volume Management: File descriptor 53 left open
  No volume groups found
....

????

Version-Release number of selected component (if applicable):
initscripts-8.15-1

Comment 1 Bill Nottingham 2005-09-28 17:51:21 UTC
Assigning to lvm2 for the moment; that's coming from the LVM tools.

Comment 2 Alasdair Kergon 2005-10-03 15:15:14 UTC
Can you debug this by adding a line *immediately* before the lvm command in the
initscripts to run '/usr/sbin/lsof' (no args) and capture its complete output to
a file and attach it to this bug report?


Comment 3 Alasdair Kergon 2005-10-03 15:18:45 UTC
And say whether you've built a special initrd, and if so, what options you used.

Comment 4 Alasdair Kergon 2005-10-03 15:22:15 UTC
And which version of mkinitrd package you have


Comment 5 Michal Jaegermann 2005-10-03 16:48:50 UTC
Created attachment 119556 [details]
lsof output a moment before lvm commands are called

/dev/sda5 which shows up in an attached output with "53r" is actually my swap
partition.

All initrd images were build by %post script in an installation process
of new kernels.  The current version of mkinitrd is mkinitrd-5.0.3-1. and the
image used in testing was build with this one, but "File descriptor 53 left
open" was showing up with earlier versions of mkinitrd as well and I was just
forgetting to report it until mkinitrd really started to misbehave (see bug
#169712).

OTOH I have one initrd image build with mkinitrd-5.0.0-1 and, when I started
careful checks, when booting with this one I do not see that "... left open"
and there is no /dev/sda5 anywhere in an lsof output.

The message surely was present too when various earlier versions were used
and it is back if I am booting a kernel which has initrd made with a version
5.0.2-1 of mkinitrd (with /dev/sda5 splattered all over lsof output).

Comment 6 Alasdair Kergon 2005-10-03 17:47:18 UTC
The relevant lsof line is:

init         1 root   53r      BLK                8,5              935 /dev/sda5

which suggests 'nash' in the initrd is forgetting to close this before starting
'init'.

Comment 7 Alasdair Kergon 2005-10-03 17:51:10 UTC
Is the swap activated correctly after booting?  (cat /proc/swaps)

Comment 8 Michal Jaegermann 2005-10-03 18:43:09 UTC
Swap looks all right after a boot; both in /proc/swaps and in an output of
'free'.

I observe that on x86_64 but this may be really a hardware difference.
On that machine there is a SATA drive, which shows as /dev/sda, and the
other box has a plain old IDE.

Comment 9 Michal Jaegermann 2005-10-08 20:48:32 UTC
With the current version of startup (initrd and initscripts) I do not see,
at this moment, this complaint.  OTOH checking with lsof shows that init
still holds open a block device of my swap.

Comment 10 Alasdair Kergon 2005-11-02 19:42:06 UTC
*** Bug 165912 has been marked as a duplicate of this bug. ***

Comment 11 Jason 2005-11-03 13:37:36 UTC
I am seeing looks of selinux messages becuase of this bug.  To see the messages
goto https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165912 which is closed
since it is a duplicate of this bug.  I am running rawhide on i686 updated until
yesterday (todays updates dont install due to dependency issues).  I have
initscripts-8.17-1 and mkinitrd-5.0.8-1 installed.  I am using kernel-2.6.14-1635-1.

Thanks,
Jason


Comment 12 Jason 2005-11-08 18:52:09 UTC
When I boot I get File descriptor 42 left open.  Is this different than File
descriptor 53?

Comment 13 Michal Jaegermann 2005-11-08 19:00:22 UTC
> When I boot I get File descriptor 42 left open.  Is this different than File
descriptor 53?

Most likely not.  A particular number depends on your hardware and possibly
on a kernel architecture too.  You may check with lsof if this is a reference
to your swap device.  If this is really not then you are seeing something diffrent.

Comment 14 Alasdair Kergon 2006-09-13 19:31:28 UTC
*** Bug 171659 has been marked as a duplicate of this bug. ***