Bug 438743

Summary: mkinitrd creates initrd.img/init script with ~6000 insmod lines for lock_nolock.ko, and gfs2.ko
Product: Red Hat Enterprise Linux 5 Reporter: James Laska <jlaska>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: adas, cfeist, jturner
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0437 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:26:43 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
/var/log/messages
none
/init (from /boot/initrd-2.6.18-86.el5.img) none

Description James Laska 2008-03-24 20:10:25 UTC
Description of problem:

Perform a kickstart install with the root partition being a logical volume of
--fstype=gfs2.

On boot up ... observe the following message on console:

124:Mar 24 12:59:57 ibm-505-lp1 kernel: lock_nolock: Unknown symbol
gfs2_register_lockproto
125:Mar 24 12:59:58 ibm-505-lp1 kernel: lock_nolock: Unknown symbol
gfs2_unregister_lockproto
126:Mar 24 12:59:58 ibm-505-lp1 kernel: GFS2 (built Mar 18 2008 18:27:16) installed
184:Mar 24 12:59:58 ibm-505-lp1 kernel: GFS2: fsid=: Trying to join cluster
"lock_nolock", "dm-0"
185:Mar 24 12:59:58 ibm-505-lp1 kernel: GFS2: fsid=dm-0.0: Joined cluster. Now
mounting FS...
186:Mar 24 12:59:58 ibm-505-lp1 kernel: GFS2: fsid=dm-0.0: jid=0, already locked
for use
187:Mar 24 12:59:59 ibm-505-lp1 kernel: GFS2: fsid=dm-0.0: jid=0: Looking at
journal...
188:Mar 24 12:59:59 ibm-505-lp1 kernel: GFS2: fsid=dm-0.0: jid=0: Done


In discussion with Chris Feist, the lock_nolock.ko module should not be loaded
before gfs2.ko.  Investigating the module load order as defined by the mkinitrd
'init' script ...

Additionally, during install the following error message appears during %post on
the kernel scriptlet:

Installing kernel - 2.6.18-86.el5.ppc64
cpio: ./sbin: Invalid argument
cpio: ./dev/ram: Invalid argument
cpio: ./bin/modprobe: Invalid argument

(full install.log available at
http://hank.test.redhat.com/autotest/testcases/rel-eng_RHEL5.2-Server-20080320.0_5-ppc/gfs2-distill-english-http-VNC/anamon/install.log)

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

RHEL5.2-Server-20080320.0
 - anaconda-11.1.2.108-1
 - kernel-2.6.18-86.el5
 - mkinitrd-5.1.19.6-25

How reproducible:
100% so far 


Steps to Reproduce:
1. perform kickstart install with root as a logical volume formatted as gfs2
  
Actual results:
Error messages observed during bootup, and in install.log 

Expected results:
No error messages during bootup and correct module load order defined in the
initrd.img.


Additional info:

Comment 1 James Laska 2008-03-24 20:10:25 UTC
Created attachment 298938 [details]
/var/log/messages

Comment 2 James Laska 2008-03-24 20:11:10 UTC
Created attachment 298939 [details]
/init (from /boot/initrd-2.6.18-86.el5.img)

Comment 3 James Laska 2008-03-24 20:12:24 UTC
Catching this during install shows that the %post is taking a *long* time and
chewing up a lot of cpu in generating all those 6000 module entries :)

  PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
  678 0        S       147M   487  0.0  3.7 anaconda
 1440 0        R      62464  1431 99.7  1.5 mkinitrd


Comment 4 James Laska 2008-03-24 20:14:14 UTC
Doing the same test on x86_64 ends differently ... I see the following on the
console...

 /sbin/new-kernel-pkg: line 242: 12326 Segmentation fault      /sbin/mkinitrd
--allow-missing -f $initrdfile $version
mkinitrd failed
sending termination signals...done
sending kill signals...done
disabling swap...
        /tmp/cciss/c0d0p3
unmounting filesystems...


Comment 6 James Laska 2008-03-28 12:05:48 UTC
Looks like a similar problem surfacing in bug#439371

Comment 9 James Laska 2008-03-28 17:02:03 UTC
tburke: Customer will see this issue as follows:

* Kernel panic on post-install bootup on i386, ia64, x86_64
* Delayed install on ppc

Comment 12 Peter Jones 2008-03-28 21:37:09 UTC
Fixed in mkinitrd-5.1.19.6-28 .

Comment 14 James Laska 2008-03-31 13:36:17 UTC
VERIFIED in RHEL5.2-Server-20080331.nightly (mkinitrd-5.1.19.6-28)

# grep -n "\(gfs2\|lock\)" ./init 
41:echo Creating block device nodes.
50:echo "Loading gfs2.ko module"
51:insmod /lib/gfs2.ko 
52:echo "Loading lock_nolock.ko module"
53:insmod /lib/lock_nolock.ko 
73:lvm vgscan --ignorelockingfailure
75:lvm vgchange -ay --ignorelockingfailure  vg01
78:mkrootdev -t gfs2 -o defaults,ro /dev/vg01/lv_root


Comment 16 errata-xmlrpc 2008-05-21 15:26:43 UTC
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.

http://rhn.redhat.com/errata/RHBA-2008-0437.html