Hi, 1. I think oops and panic are both some way to deal with errors occurs in kernel space. Is there any relationship between them? 2. I make a NULL pointer reference deliberately in a kernel module and get an oops like: ... ... ... Aug 29 00:58:45 lfs kernel: Call Trace: Aug 29 00:58:45 lfs kernel: [<c100112d>] ? do_one_initcall+0x44/0x120 Aug 29 00:58:45 lfs kernel: [<c10517ce>] ? sys_init_module+0xa7/0x1d9 Aug 29 00:58:45 lfs kernel: [<c138d49d>] ? syscall_call+0x7/0xb ... ... ... I wonder what is the meaning of the tow numbers after a function name.
On Mon, Aug 29, 2011 at 2:19 AM, Parmenides <mobile.parmenides@gmail.com> wrote:
Hi,
1. I think oops and panic are both some way to deal with errors occurs in kernel space. Is there any relationship between them? AFAIK both are same.
2. I make a NULL pointer reference deliberately in a kernel module and get an oops like:
... ... ...
Aug 29 00:58:45 lfs kernel: Call Trace: Aug 29 00:58:45 lfs kernel: [<c100112d>] ? do_one_initcall+0x44/0x120 Aug 29 00:58:45 lfs kernel: [<c10517ce>] ? sys_init_module+0xa7/0x1d9 Aug 29 00:58:45 lfs kernel: [<c138d49d>] ? syscall_call+0x7/0xb
... ... ...
I wonder what is the meaning of the tow numbers after a function name. They are offsets in the function name from which next function in the call stack is called right ?
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
1. I think oops and panic are both some way to deal with errors occurs in kernel space. Is there any relationship between them? AFAIK both are same.
Really? I thought "oops" would be generated for critical errors like processor exceptions etc when a kernel CANNOT proceed further in a reliable way...whereas a "panic" was _artificially_ induced (?), eg: a missing 'init' to run (very common error, which I'm sure most of us here would've experienced :)), and the kernel _may_ proceed further with some reliability Wikipedia, has a decent explanation of it: http://en.wikipedia.org/wiki/Linux_kernel_oops HTH, -mandeep
On Mon, Aug 29, 2011 at 8:01 PM, Mandeep Sandhu <mandeepsandhu.chd@gmail.com> wrote:
1. I think oops and panic are both some way to deal with errors occurs in kernel space. Is there any relationship between them? AFAIK both are same.
Really? I thought "oops" would be generated for critical errors like processor exceptions etc when a kernel CANNOT proceed further in a reliable way...whereas a "panic" was _artificially_ induced (?), eg: a missing 'init' to run (very common error, which I'm sure most of us here would've experienced :)), and the kernel _may_ proceed further with some reliability Thanks for this but what i meant was that some developers uses oops and panic term interchangeably. Technically you are right.
Wikipedia, has a decent explanation of it:
http://en.wikipedia.org/wiki/Linux_kernel_oops
HTH, -mandeep
Hmm...there is a very subtle difference, ofcourse... Oops you will get, when you do a NULL pointer dereference (an exception may be software???).. Suppose when you try to insert a dynamic module(insmod xyz.ko), which refers to a NULL pointer, while installing that module, you will get oops. And you cant remove that module.(rmmod xyz.ko wont be successful) Only way you can do rmmod is, to restart the kernel to set things right. Panic is the severe condition, where kernel couldnot proceed its execution furthur. It can be hardware specific also. for eg: When you try to set a physical parameter of the hardware, which it could not capable of.. suppose setting a frequency limit of on clock, which it doesnot support..and some action done manipulating certain CPU specific control registers which might cause abnormal behaviour...etc.., In these conditions the kernel has no other go but stop its execution..then it will call the panic handler(panic("string")).. Hope this makes a little more sense & You can grep for the panic() calls in the kernel source code, which might give you better insight.. On Mon, Aug 29, 2011 at 4:21 PM, anish singh <anish198519851985@gmail.com>wrote:
On Mon, Aug 29, 2011 at 2:19 AM, Parmenides <mobile.parmenides@gmail.com> wrote:
Hi,
1. I think oops and panic are both some way to deal with errors occurs in kernel space. Is there any relationship between them? AFAIK both are same.
2. I make a NULL pointer reference deliberately in a kernel module and get an oops like:
... ... ...
Aug 29 00:58:45 lfs kernel: Call Trace: Aug 29 00:58:45 lfs kernel: [<c100112d>] ? do_one_initcall+0x44/0x120 Aug 29 00:58:45 lfs kernel: [<c10517ce>] ? sys_init_module+0xa7/0x1d9 Aug 29 00:58:45 lfs kernel: [<c138d49d>] ? syscall_call+0x7/0xb
... ... ...
I wonder what is the meaning of the tow numbers after a function name. They are offsets in the function name from which next function in the call stack is called right ?
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- With regards, Sandeep Kumar Anantapalli,
On 08/28/2011 08:19 PM, Parmenides wrote:
Hi,
1. I think oops and panic are both some way to deal with errors occurs in kernel space. Is there any relationship between them? afaik, the difference is that the panic is non-recoverable, and occurs only in certain very critical situations
2. I make a NULL pointer reference deliberately in a kernel module and get an oops like:
... ... ...
Aug 29 00:58:45 lfs kernel: Call Trace: Aug 29 00:58:45 lfs kernel: [<c100112d>] ? do_one_initcall+0x44/0x120 Aug 29 00:58:45 lfs kernel: [<c10517ce>] ? sys_init_module+0xa7/0x1d9 Aug 29 00:58:45 lfs kernel: [<c138d49d>] ? syscall_call+0x7/0xb
... ... ...
I wonder what is the meaning of the tow numbers after a function name. the first one is the offset within the function that the error occurred, and the second one I think it is the function size (you'll usually need only the first one for debugging)
-- Stratos Psomadakis <s.psomadakis@gmail.com>
On Mon, 29 Aug 2011 01:19:00 +0800, Parmenides wrote:
Hi,
[snip]
Aug 29 00:58:45 lfs kernel: Call Trace: Aug 29 00:58:45 lfs kernel: [<c100112d>] ? do_one_initcall+0x44/0x120 Aug 29 00:58:45 lfs kernel: [<c10517ce>] ? sys_init_module+0xa7/0x1d9 Aug 29 00:58:45 lfs kernel: [<c138d49d>] ? syscall_call+0x7/0xb
... ... ...
I wonder what is the meaning of the tow numbers after a function name.
You can use objdump -dSl foo.ko to get the exact line that failed. Look at the left hand column of the dump and match it with the first hex number in your trace. The objdump command may take a while if your module is large. Obviously you'll need debugging symbols built into the ko.
participants (6)
-
anish singh -
Christopher Harvey -
Mandeep Sandhu -
Parmenides -
sandeep kumar -
Stratos Psomadakis