[Android稳定性] 第045篇 [问题篇] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 3月前查看 评论
[Android稳定性] 第045篇 [问题篇] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00

本文分析了在测试DDR TT和Reboot测试专项过程中机器出现dump的问题。通过panic现场和加debug patch的分析,发现死机原因是ufs没有初始化成功,函数`ufshcd_complete_dev_init`耗时过长。进一步分析发现,`kworker/6:1`线程在执行`kfree_rcu_monitor()`时被调度出去,并长时间卡在`schedule()`中,最终导致死机。根本原因是在ufs函数执行时被串口输出调度出去,而串口输出调度优先级很高,执行console_unlock()时持锁状态下运行,不允许调度,且阻塞式串口写函数`qcom_geni_serial_poll_tx_done`会造成长时间占用CPU。