Bug 3412 - The initrd file system not released when the real root is mounted
Summary: The initrd file system not released when the real root is mounted
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-06-12 10:25 UTC by vek
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-08-22 14:28:35 UTC

Attachments (Terms of Use)

Description vek 1999-06-12 10:25:52 UTC
This problem is new to the 2.2.x kernel

When your root disk is a scsi unit you load in inital
ramdisk so you can load the required scsi driver before
mounting the real root file systems.  In the new kernel
the scsi module (aha1542 at least, probably other drivers
too) starts a kernel process named scsi_eh_0  which on
my system gets PID number 8.  This process inherits the open
files from the insmod program which has as current direcotry
the ram disk file system, has the file for the driver open
and the console device.  When the kernel process inherits
these open files, these file will never be closed, so when
the kernel later tries to unmount the ram disk file system
it will fail because of these open files, and because the
file system can't be unmounted the ram area used by this ram
disk file system cannot be freed.  For a normal ram disk
image this is about one and a half megabyts of ram waisted.

The kernel thread si started on the procedure
scsi_error_handler() found in

This routine has some nice comments about the user space
pages inherited from the insmod process.  The inherited open
files will lock an even bigger number of pages in kernel, in
this case protected file system pages.


Comment 1 Alan Cox 1999-06-12 17:02:59 UTC
Thank you. I've been trying to figure out the cause of assorted Linux
2.2 initrd reports and you've given me the info I'd missed.


Comment 2 Cristian Gafton 1999-08-27 23:47:59 UTC
This should be fixed in 2.2.12 and later. Alan, do you disagree?

Comment 3 Cristian Gafton 2000-01-04 22:25:59 UTC
Assigned to dledford

Comment 4 Cristian Gafton 2000-01-04 22:27:59 UTC
Assigned to dledford

Comment 5 vek 2000-05-17 13:50:59 UTC
The problem is unchanged present in Redhat linux version 6.2
kernel 2.2.14-5.0

BTW, what does it mean "Stauts: RESOLVED CURRENTRELEASE"?


Comment 6 Alan Cox 2000-08-22 14:28:33 UTC
It was sorted for most cases. The remaining one I think I finally nailed in

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