understand kernel panic - mehome/openthos GitHub Wiki
对于linux睡眠及崩溃相关bug的调试方法
kernel 配置打开:
PM_DEBUG
CRASH_DUMP
(打印的崩溃信息还没能保存下来)
kernel启动参数增加:
ignore_loglevel
忽略log等级打印所有kernel log
no_console_suspend
在睡眠和休眠时不会挂起console
initcall_debug
在启动、挂起、恢复时跟踪记录PM会调用的驱动
panic=N N秒后重启
panic=0 不重启
panic=-N 立即重启
Enabling in Kernel Config
To enable the dump_stack() function in the kernel config the following options must be set. You can use make menuconfig or make xconfig to do this.
- Kernel hacking -> Kernel debugging
- Kernel hacking -> Verbose kernel error messages
Enabling these two options will change the dump_stack() function from a do nothing function to dumping the stack.
You need to rebuild your Linux kernel image after enabling these options.
Referance: https://01.org/zh/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues