* question about oops and panic
@ 2011-08-28 17:19 Parmenides
2011-08-29 10:51 ` anish singh
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Parmenides @ 2011-08-28 17:19 UTC (permalink / raw)
To: kernelnewbies
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.
^ permalink raw reply [flat|nested] 7+ messages in thread* question about oops and panic 2011-08-28 17:19 question about oops and panic Parmenides @ 2011-08-29 10:51 ` anish singh 2011-08-29 11:01 ` Mandeep Sandhu 2011-08-29 11:14 ` sandeep kumar 2011-08-29 11:01 ` Stratos Psomadakis 2011-08-29 13:49 ` Christopher Harvey 2 siblings, 2 replies; 7+ messages in thread From: anish singh @ 2011-08-29 10:51 UTC (permalink / raw) To: kernelnewbies 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 at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ^ permalink raw reply [flat|nested] 7+ messages in thread
* question about oops and panic 2011-08-29 10:51 ` anish singh @ 2011-08-29 11:01 ` Mandeep Sandhu 2011-08-29 11:05 ` anish singh 2011-08-29 11:14 ` sandeep kumar 1 sibling, 1 reply; 7+ messages in thread From: Mandeep Sandhu @ 2011-08-29 11:01 UTC (permalink / raw) To: 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* question about oops and panic 2011-08-29 11:01 ` Mandeep Sandhu @ 2011-08-29 11:05 ` anish singh 0 siblings, 0 replies; 7+ messages in thread From: anish singh @ 2011-08-29 11:05 UTC (permalink / raw) To: kernelnewbies 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 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* question about oops and panic 2011-08-29 10:51 ` anish singh 2011-08-29 11:01 ` Mandeep Sandhu @ 2011-08-29 11:14 ` sandeep kumar 1 sibling, 0 replies; 7+ messages in thread From: sandeep kumar @ 2011-08-29 11:14 UTC (permalink / raw) To: kernelnewbies 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 at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- With regards, Sandeep Kumar Anantapalli, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110829/a50f27f2/attachment-0001.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* question about oops and panic 2011-08-28 17:19 question about oops and panic Parmenides 2011-08-29 10:51 ` anish singh @ 2011-08-29 11:01 ` Stratos Psomadakis 2011-08-29 13:49 ` Christopher Harvey 2 siblings, 0 replies; 7+ messages in thread From: Stratos Psomadakis @ 2011-08-29 11:01 UTC (permalink / raw) To: kernelnewbies 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> ^ permalink raw reply [flat|nested] 7+ messages in thread
* question about oops and panic 2011-08-28 17:19 question about oops and panic Parmenides 2011-08-29 10:51 ` anish singh 2011-08-29 11:01 ` Stratos Psomadakis @ 2011-08-29 13:49 ` Christopher Harvey 2 siblings, 0 replies; 7+ messages in thread From: Christopher Harvey @ 2011-08-29 13:49 UTC (permalink / raw) To: kernelnewbies 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-29 13:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-28 17:19 question about oops and panic Parmenides 2011-08-29 10:51 ` anish singh 2011-08-29 11:01 ` Mandeep Sandhu 2011-08-29 11:05 ` anish singh 2011-08-29 11:14 ` sandeep kumar 2011-08-29 11:01 ` Stratos Psomadakis 2011-08-29 13:49 ` Christopher Harvey
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.