LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-04-2008, 09:37 AM   #1
mek1
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 0
Question RHEL 5, Libdl.so.2 and Kernel panic at boot


My RHEL5 server locked up overnight, when I restart it I get the following;

Code:
/sbin/init: error while loading shared libraries: /lib/libdl.so.2: invalid ELF header

kernel panic - not syncing: attempted to kill init!
It locks up and gets no further. Keep in mind this is hosted on an ESX server as I saw other kernel panic's attributed to hardware.

So I went into linux restore and can get to the /lib/ folder and see libdl.so.2, just not sure what I should try to correct this error.

Any suggestions?
Thanks
 
Old 09-04-2008, 04:41 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you 'rpm -qf /lib/libdl.so.2' you'll see it's the Glibc package you could use rpm --verify on to start with. before you reinstall Glibc it would be good to look at other things. Are there or have there been any other logged errors leading up to this?
 
Old 09-04-2008, 05:33 PM   #3
mek1
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
unfortunately, from linux rescue shell;
'rpm -qf /lib/libdl.so.2' returns 'file /lib/libdl.so.2 is not owned by any package'

'rpm --verify Glibc' returns 'package glibc is not installed'.

Very odd. Any other suggestions?
 
Old 09-05-2008, 01:30 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by mek1 View Post
unfortunately, from linux rescue shell;
'rpm -qf /lib/libdl.so.2' returns 'file /lib/libdl.so.2 is not owned by any package'

'rpm --verify Glibc' returns 'package glibc is not installed'.

Very odd. Any other suggestions?
It should be not 'rpm --verify Glibc', but 'rpm --verify glibc'

Anyway instead of chasing what wrong on your system I think it's much simpler just reinstall it
 
Old 09-06-2008, 10:07 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Valery Reznic View Post
Anyway instead of chasing what wrong on your system I think it's much simpler just reinstall it
I disagree strongly. About the only time errors like ELF header corruption could happen on GNU/Linux systems is when package contents are written to (as in update). The rest of the time the library file is accessed but not modified. If this was not due to an update then not knowing the source of corruption means it can occur again. Running GNU/Linux is all about performance, protecting assets and providing services in a continuous, stable and secure way so you should not deliberately neglect signals like that. Besides that the "re-install and all will be fine" mantra is reminiscent of working with products from this particular vendor founded to develop and sell BASIC interpreters for the Altair 8800 and doesn't solve anything. Work on the cause, not the symptoms.
 
Old 09-07-2008, 01:30 AM   #6
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by unSpawn View Post
I disagree strongly. About the only time errors like ELF header corruption could happen on GNU/Linux systems is when package contents are written to (as in update). The rest of the time the library file is accessed but not modified. If this was not due to an update then not knowing the source of corruption means it can occur again. Running GNU/Linux is all about performance, protecting assets and providing services in a continuous, stable and secure way so you should not deliberately neglect signals like that. Besides that the "re-install and all will be fine" mantra is reminiscent of working with products from this particular vendor founded to develop and sell BASIC interpreters for the Altair 8800 and doesn't solve anything. Work on the cause, not the symptoms.
The question was (As I see it ) about making system work again, not about investigation. It can be any number of reason why it's happened - from hardware failure to rootkit and to occasional bug in some process running as root. While it's interesting HOW system got into this state it's not always possible to find it out. Sure it's have nothing to do with making system work again, but can help to avoid next breakage.
 
Old 09-07-2008, 04:25 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Valery Reznic View Post
While it's interesting HOW system got into this state it's not always possible to find it out.
Sure, but there's a difference between actually trying to find the root cause and saying "oh, well, just reinstall whatever it is that's b0rken". If this was a production environment where an informed management decision was made (weighing all risks, consequences et cetera) to trade in diagnosis for uptime, then I would agree. Business requirements just bring a different type of "clarity" to things. But otherwise it is a perfect example of human nature to seek the path of least resistance (like by just reinstalling software). The point is there's nothing to be learnt from that approach and it does not solve anything.
 
Old 09-07-2008, 08:26 AM   #8
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by unSpawn View Post
Sure, but there's a difference between actually trying to find the root cause and saying "oh, well, just reinstall whatever it is that's b0rken". If this was a production environment where an informed management decision was made (weighing all risks, consequences et cetera) to trade in diagnosis for uptime, then I would agree. Business requirements just bring a different type of "clarity" to things. But otherwise it is a perfect example of human nature to seek the path of least resistance (like by just reinstalling software). The point is there's nothing to be learnt from that approach and it does not solve anything.
I see two different problems: 1) Repair damaged system. 2) Understand what caused damage.
My initial post was related to the first problem: if system is damaged I find it that usually it simpler just re-install it, than fix problem after problem.
And how one proceed with repair in quite unrelated to the second problem - understand what caused damage. If investigate problem is important, than re-installation can be done on the different hard drive (or different computer).
 
Old 09-07-2008, 04:36 PM   #9
mek1
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Well, this has certainly turned into an interesting discussion.

Regarding the initial question, as a new guy to RHEL I really have no idea what caused it. Luckily this was a testing system as compared to our actual production environment we are moving towards. I had applied updates that RH deemed worth while just prior to the crash. While i did bring the system back to life via rolling back the virtual server to an earlier instance i still have nothing on the problem. Luckily, again this was a testing enviroment (I needed to test badly enough to roll back pre-error).

In the meantime I'm going to look into a reading more documentation on RH in general so that if this were to happen to our physical server I've got some direction on how to correct it.

thanks
 
0 members found this post helpful.
Old 10-23-2010, 11:16 PM   #10
RootAround
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Rep: Reputation: 0
For what it’s worth, here are my fix procedures using the CentOS5.5 Live CD.
The CD works nicely with my cable modem.

WHAT WORKED.

1. Loaded linux from the Live CD. Logged in as root (a must).

2. Edited the Live CD’s /etc/fstab file. Located the /dev/hdaN entry associated
with the hard drive of the damaged linux home. changed ro (read)
parameter to rw (read-write).

Note: -N- is an integer

3. invoked yum at the Live Cd's command prompt:
yum --installroot=/mnt/disc/hdaN reinstall glibc
Note: -N- is the same integer as above.

I got a message complaining about libXmuu.so.1 being unable to link.

4. Rebooted linux from hard drive. There was no kernel panic, but a libXmuu.so.1 message reappeared:

/sbin/libconfig: can’t link /usr/lib/libXmuu.so.1 to libXmuu.so.1.0.0


I replied -yes- to a deletion request.

5. I got into the desktop, but many of the menu items and desktop icons were unusable, so I repeated steps 1-3, but using libXmuu.so.1 instead of glibc in the Yum command. Yum found the appropriate package (libXmuu.so.1 is a link) and installed it. I was back up.


WHAT DIDN’T WORK.

1. Manually repairing libdl.so.2. It’s a link to /lib/libdl-2.5.so in the same directory.
Copying/recreating the link didn’t work for me.
Note: I found it’s location by entering:

locate libdl.so.2

at the command prompt.


2. Booting GRUB in emergency mode. Followed

26.4. Booting into Emergency Mode of the CentOS manual

to append emergency to the kernel line. Got same kernel panic.

Last edited by RootAround; 10-24-2010 at 12:22 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic while booting custom compiled 2.6.24 kernel on RHEL 4 AS samkraju Red Hat 4 02-10-2008 12:55 AM
kernel panic while trying to boot into my freshly brewed 2.6.22 kernel adityavpratap Debian 8 08-31-2007 09:53 PM
Kernel panic-on RHEL-4 amitava Linux - Enterprise 4 05-16-2007 10:40 PM
Kernel panic on RHEL 3 after 2 days of operation jalsk Red Hat 13 12-30-2004 05:38 PM
Kernel Panic at boot from Promise ATA100 w/ Kernel 2.6 MikTheUser Linux - Hardware 9 07-24-2004 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration