Hi , What are the best tools to trace linux kernel panics and system hangs for linux kernel . please recommend for x86 as well as arm platforms . regards Amit Nagal
Hi, objdump and instruction set of the platform (e.g., x86, arm, mips) are your friends. Regards. On 19 Haz 2011, at 09:33, Amit Nagal <helloin.amit@gmail.com> wrote:
Hi ,
What are the best tools to trace linux kernel panics and system hangs for linux kernel . please recommend for x86 as well as arm platforms .
regards Amit Nagal
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
BTW, for code tracing Kscope would be helpfull. On 19 Haz 2011, at 09:33, Amit Nagal <helloin.amit@gmail.com> wrote:
Hi ,
What are the best tools to trace linux kernel panics and system hangs for linux kernel . please recommend for x86 as well as arm platforms .
regards Amit Nagal
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Sun, Jun 19, 2011 at 13:33, Amit Nagal <helloin.amit@gmail.com> wrote:
Hi ,
What are the best tools to trace linux kernel panics and system hangs for linux kernel . please recommend for x86 as well as arm platforms .
I think, stack dump function inside magic sysrq is your first bet here... of course, it might not working on some cases (e.g: too much stack corruption). And don't forget to compile your kernel with debug info and frame pointer enabled...without that, stack dump will have hard time to convert addresses into meaningful symbols and back tracking stack frames. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
On Sun, Jun 19, 2011 at 9:33 AM, Amit Nagal <helloin.amit@gmail.com> wrote:
Hi ,
What are the best tools to trace linux kernel panics and system hangs for linux kernel . please recommend for x86 as well as arm platforms .
Look under kernel hacking. There are a lot of useful tools like: kmemcheck, lockdep, slab debug. thanks, Daniel.
- Enable CONFIG_KALLSYMS in kernel configuration. - And the rest is here: http://www.xml.com/ldd/chapter/book/ch04.html Regards. On 19 Haz 2011, at 14:43, Daniel Baluta <daniel.baluta@gmail.com> wrote:
On Sun, Jun 19, 2011 at 9:33 AM, Amit Nagal <helloin.amit@gmail.com> wrote:
Hi ,
What are the best tools to trace linux kernel panics and system hangs for linux kernel . please recommend for x86 as well as arm platforms .
Look under kernel hacking. There are a lot of useful tools like: kmemcheck, lockdep, slab debug.
thanks, Daniel.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Sun, Jun 19, 2011 at 5:31 PM, Metin KAYA <kayameti@gmail.com> wrote:
- Enable CONFIG_KALLSYMS in kernel configuration. - And the rest is here: http://www.xml.com/ldd/chapter/book/ch04.html Regards.
Thanx for all the replies and facts . Actually my main concern is regarding identifying kernel panics and system hangs on embedded arm targets where i have access to only one serial port used primarily for reporting debug messages . Also wrt x86 , i tried to use gdb - kgdb interface using 2 PCs , but communication used to break too often . Then i tried ftrace which i found quite convinient to use on x86 till now except sometimes when ftrace takes too much time to print complete trace on console in case of crash . Can crash utility be used for arm targets as well ? Regards Amit Nagal
Hi Amit, On Sun, Jun 19, 2011 at 8:22 AM, Amit Nagal <helloin.amit@gmail.com> wrote:
On Sun, Jun 19, 2011 at 5:31 PM, Metin KAYA <kayameti@gmail.com> wrote:
- Enable CONFIG_KALLSYMS in kernel configuration. - And the rest is here: http://www.xml.com/ldd/chapter/book/ch04.html Regards.
Thanx for all the replies and facts . Actually my main concern is regarding identifying kernel panics and system hangs on embedded arm targets where i have access to only one serial port used primarily for reporting debug messages .
Also wrt x86 , i tried to use gdb - kgdb interface using 2 PCs , but communication used to break too often .
Then i tried ftrace which i found quite convinient to use on x86 till now except sometimes when ftrace takes too much time to print complete trace on console in case of crash .
Can crash utility be used for arm targets as well ?
The magic-SysRq stuff works on the ARM. You need to enable it (as Mulyadi mentions). You initiate the SysRq through your serial terminal by sending a BREAK followed by a single character. How you send a break will depend on the terminal emulator software you're using. I normally do BREAK-Space which prints a little help menu to show the other single character codes which are available. The SysRq stuff works as long as interrupts are still enabled. If they're not enabled, then the serial port driver never gets notified of the BREAK and can't initiate the processing. So it doesn't work 100% of the time, but often enough to still be useful. Also, if you have klogd/syslogd running, they'll mess up some of the output (like SySRq-T which does a stack crawl for every task in the system). I find I tend to run with klogd/syslogd disabled when I'm working at that level. If you're in a situation where they are running, you may need to tweak the printk level (using SysRq-0 to 9) in order to see all of your output. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com
Amit, I suggest you to read the "oops messages" part of the document shown in the link of the previous mail. Oops messages give crucial clues in order to debug the crashes. Find out the crash point from the oops output, then trace it via objdump. Other utilities, including jtag, *at most* do not work sanely. Thus, you have to be patient and intuitive while debugging :) BTW, please keep in mind that printk() affects the timing of the crash so it should not be used ASAP. HTH. On 19 Haz 2011, at 18:22, Amit Nagal <helloin.amit@gmail.com> wrote:
On Sun, Jun 19, 2011 at 5:31 PM, Metin KAYA <kayameti@gmail.com> wrote:
- Enable CONFIG_KALLSYMS in kernel configuration. - And the rest is here: http://www.xml.com/ldd/chapter/book/ch04.html Regards.
Thanx for all the replies and facts . Actually my main concern is regarding identifying kernel panics and system hangs on embedded arm targets where i have access to only one serial port used primarily for reporting debug messages .
Also wrt x86 , i tried to use gdb - kgdb interface using 2 PCs , but communication used to break too often .
Then i tried ftrace which i found quite convinient to use on x86 till now except sometimes when ftrace takes too much time to print complete trace on console in case of crash .
Can crash utility be used for arm targets as well ?
Regards Amit Nagal
participants (5)
-
Amit Nagal -
Daniel Baluta -
Dave Hylands -
Metin KAYA -
Mulyadi Santosa