LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-14-2006, 02:57 AM   #1
rbh123
LQ Newbie
 
Registered: May 2005
Distribution: Redhat
Posts: 25

Rep: Reputation: 15
Debugging kernel panic


Hi,

I am interested in learning how-to debugg Kernel-panics,but I dont know how to start.So need help in understanding how to debug a kernel-panic ? how to find the code that is causing the panic?.I know that the first thing to do when there is a kernel panic is to capture the Oops.But its difficult for me to understand the Oops.

Thanks,
rbh
 
Old 05-15-2006, 01:15 PM   #2
pmarques
LQ Newbie
 
Registered: Jul 2003
Posts: 28

Rep: Reputation: 15
More information

To help you, I'll need more information:
- What kernel version are you using?
- Does the machine hang after the panic? I.e., is this just a oops or an actual panic?

If you're using a 2.6 kernel, make sure CONFIG_KALLSYMS is set on your configuration file.

If your machine didn't hang, then the oops is in your syslog somewhere. If this is the case, please post a copy of the trace here so that I can try to point you in the right direction...
 
Old 05-25-2006, 04:01 AM   #3
rbh123
LQ Newbie
 
Registered: May 2005
Distribution: Redhat
Posts: 25

Original Poster
Rep: Reputation: 15
Need help in understanding kernel panic messages

I am using a 2.6 kernel.
My question is when there is a kernel panic(System hang or Oops) we see messages like
1. value of EIP and other registers,
2. Call Trace
3. Stack contents
4. Panic message

So how to understand these messages and how to use them to find the code that is causing the kernel panic.

Thanks in advance,
-rbh
 
Old 05-25-2006, 08:22 AM   #4
pmarques
LQ Newbie
 
Registered: Jul 2003
Posts: 28

Rep: Reputation: 15
Oops tracing

You failed to reply to this part:

"If your machine didn't hang, then the oops is in your syslog somewhere. If this is the case, please post a copy of the trace here so that I can try to point you in the right direction..."

Even if the machine did hang, a picture taken with a digital camera of the oops text posted somewhere would be useful.

Anyway, if you're using a vanilla kernel, you can find all the information you need in the file "Documentation/oops-tracing.txt" that is bundled with th kernel sources.

If you're using a vendor kernel (redhat, suse, mandriva, etc.) you should report it to your vendor. Vendor kernels have specific patches that might cause problems and it is not the kernel developers responsability to track down every bug that every distro inserts into their custom kernels.

You can always try to replace your kernel with a vanilla one (the latest available) and if the problem persists, then inform the relevant kernel developers.
 
Old 05-25-2006, 09:14 AM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,141

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
Quote:
Originally Posted by rbh123
Hi,

I am interested in learning how-to debugg Kernel-panics, but I dont know how to start.So need help in understanding how to debug a kernel-panic ? how to find the code that is causing the panic?.I know that the first thing to do when there is a kernel panic is to capture the Oops.But its difficult for me to understand the Oops.

Thanks,
rbh
To which pmarques replied:
Quote:
To help you, I'll need more information:
- What kernel version are you using?
- Does the machine hang after the panic? I.e., is this just a oops or an actual panic?[snip]
and, later,
Quote:
Anyway, if you're using a vanilla kernel, you can find all the information you need in the file "Documentation/oops-tracing.txt" that is bundled with th kernel sources.
Clearly, what pmarques was answering was "How can I solve a specific kernel panic, whilst rbh123 was asking "How can I learn what to do when a kernel panic (or "oops") happens, and what to do about the error?"

The suggestion to look at the documentation that comes with the kernel source code is a place to start, although not all sources have the oops-tracing.txt file. (Note: You need to have downloaded the kernel sources for your distribution for this to be possible.)

Other things to try:

1) Review the log files in /var/logs
2) Google the error message.
3) Look for any bugzilla reports for the distribution and specific kernel that generated the message
4) And, simplest of all, read the error message. Most of the time the cause of the message is fairly clear from the text of the message and any error messages that preceeded it.

Last edited by PTrenholme; 05-25-2006 at 09:15 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel debugging wood@addanc Linux - General 1 04-01-2006 09:01 AM
Difference between kernel - debugging and application debugging topworld Linux - Software 2 03-30-2006 12:50 AM
Visual Debugging and Linux Kernel Debugging Igor007 Programming 0 09-30-2005 10:33 AM
Kernel Linux Debugging Igor007 Programming 2 09-05-2005 02:10 PM
kernel debugging - can't boot? andrewlkho Linux - General 4 05-31-2004 04:46 PM


All times are GMT -5. The time now is 02:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration