Bug 230874

Summary: kernel panic caused by a missing libm
Product: [Fedora] Fedora Reporter: Ronald Warsow <rwarsow>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: atkac, k.georgiou, mishu, nphilipp, redhat-bugzilla, sven
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: 2007-05-21 15:59:01 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:
Bug Depends On: 235251    
Bug Blocks: 150226    

Description Ronald Warsow 2007-03-04 03:37:43 UTC
Description of problem:
kernel panics caused by a missing libm.so.6.
exact message:
"/bin/nash: error while loading shared libraries: libm.so.6: cannot open shared
object file: No such file or directory"

Version-Release number of selected component (if applicable):
mkinitrd-6.0.8-1
kernel-2.6.20-1.2962.fc7
kernel-xen-2.6.19-1.2898.2.3.fc7

How reproducible:

Steps to Reproduce:
1. install a non-xen 2.6.20.x.y kernel on a fresh installed f7-test2 box
2. boot the non-xen kernel.
3.
  
Actual results:
panic

Expected results:

Additional info:
i installed the box new (test 6.91), cause i got this panic with each kernel i
could find on the mirrors (oldest: 2925) and i thought there is something more
wrong with it. (it was an upgrade from fc6 to devel)

comparing each initrd's shows that the xen-kernel has the missing libm under
directory /lib, whereas 2962 has this lib under /lib/i686/nosegneg/.

if i copy all under /lib/i686/nosegneg (and of cause the missing libm) from the
unpacked initrd-file under /lib and build a new initrd the box boots fine. 

this is an intel p4 box and there is a related bz 221804, but i can't see how
it's fixed. my box has the same controller (Intel Corporation 82801BA)
disk has labels ( / is labeled /DEVEL), so i exclude pata issues (changes
hda->sda). / is laying on an LVM-Volume. grub has several chainloader entries.
disk layout:
hda1 /boot
hda2 /DEVEL (chainloaded)
hda3 gentoo (no label)
hda4 lvm with fc6 and a big /opt and swap

what i can't understand. the default settings are:
init-file from xen-kernel:    mkrootdev ... sda2 (from fresh installation)
init-file from 2962-kernel:   mkrootdev ... hda2 (from update afterwards)

it seems it makes absolutely no difference if i put hda2 or sda2 in the new home
brewed init-file for this mkrootdev line, as long as i copy the libm .

Comment 1 Ronald Warsow 2007-03-04 04:13:12 UTC
if i run the scripts (preuninstall and afterwards postinstall) from the 2962
kernel.x.y.rpm:
/sbin/new-kernel-pkg --rminitrd ...
/sbin/new-kernel-pkg --package ...

the initrd file is build without a /i686/nosegneg directory under /lib.
booted was a non-xen kernel.

seems it's a xen-kernel -> non-xen-kernel install/update issue only...




Comment 2 Will Woods 2007-03-20 16:50:03 UTC
Confirmed - seeing the same problem here on my test machine. 

Here's the root of the problem. We're using shared libraries in initrd now, so
mkinitrd basically needs to run ldd on each binary that's going into the initrd.
Unfortunately, /etc/ld.so.conf.d/kernelcap-*.conf does some magical stuff so
that when you are running a Xen kernel, you get the following:

[wwoods@norfair ~]$ ldd /sbin/nash | grep libm
        libm.so.6 => /lib/i686/nosegneg/libm.so.6 (0x00a25000)

But if you were running a normal kernel, you would get /lib/libm.so.6 instead. 

So when you boot into the non-xen kernel, it expects /lib/libm.so.6, but that's
not there, so nash fails to start.

We may need a way to disable this nosegneg stuff when building an initrd for a
non-xen kernel, or we might need to create extra symlinks after creating it, or
we might need to force mkinitrd to only fetch /lib/$(basename $library). I'm not
really sure what the right answer is.

Comment 3 Will Woods 2007-03-30 21:58:29 UTC
A further note - the variable LD_HWCAP_MASK is supposed to let you mess with the
hwcap stuff (see /etc/ld.so.conf.d/kernelcap-*.conf in the Xen kernels), but I
can't find a way to make it mask the nosegneg bit.

Comment 4 Ronald Warsow 2007-04-07 17:10:50 UTC
today i do a fresh test install with a xen-kernel first and a update/install to
a non-xen-kernel afterwards.

seem's to be fixed !

thx.

Comment 5 Nils Philippsen 2007-04-16 15:14:49 UTC
I just tried it with 6.0.8-4 and it doesn't seem to be fixed here (started with
a problematic kernel-xen-2.6.20-2925.5.fc7.i686, installed
kernel-2.6.20-1.3071.fc7 on top of it, initrd had libs in /lib/i686/nosegneg).

Comment 6 Adam Tkac 2007-05-04 15:52:22 UTC
I have same problems. When I updated (yum update) from fc6 xen system to non-xen
rawhide non-xen kernel isn't able to boot.

-A-

Comment 7 Jeremy Katz 2007-05-21 15:59:01 UTC
With the change proposed in bug 235251 (and included in mkinitrd-6.0.9-4), this
shoudl be resolved