Tutorial :Kernel panic seems to be unrelated to the changes



Question:

I made changes in sched.c in Linux kernel 2.4 (homework), and now the system goes into kernel panic. The strange thing is: it seems to pass A LOT of booting checks and initializations, and panics only at the very end, showing hte following stack trace:

update_process_times  do_timer  timer_interrupt  handle_IRQ_event  do_IRQ  call_do_IRQ  do)wp_page  handle_mm_fault  do_page_fault  do_sigaction  sys_rt_sigaction  do_page_fault  error_code  

And the error is: "In interrupt handler - not synching"

I know it's hard to tell without any code, but can anybody make an educated guess to point me in the right direction?


Solution:1

I can give you my own personal mantra when debugging kernel problems: "it's always your fault."

I often see issues due to overwriting memory outside where I'm working -- if I feed hardware an incorrect address for DMA for example. You may be screwing up a lock somehow; that seems possible in this case if you are seeing a timeout: a forgotten locked lock is causing a timeout to occur due to a hang.

To me, a panic in update_process_times might suggest a problem with the task struct pointer... but I really have no idea.

Keep in mind that things in the kernel often go wrong long before a failure occurs, so a wrong bit anywhere in your code may be to blame, even if it doesn't seem like it should have an effect. If you can, I recommend incrementally adding or removing your code and checking for the problem to see if you can isolate it.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »