Bug 3412

Summary: The initrd file system not released when the real root is mounted
Product: [Retired] Red Hat Linux Reporter: vek
Component: kernelAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: alan
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-08-22 14:28:35 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:

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
/usr/src/linux/drivers/scsi/scsi_error.c

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.





Villy

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.

Alan

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"?

--
Villy

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
2.2.17pre12