低内存引起的死机和冻机的分析

来源:互联网 发布:淘宝 店招 显示代码 编辑:程序博客网 时间:2024/06/09 17:38

Kernel处于LMK频繁select进程去杀、但又找不到可以杀的进程的状态中,因某个最合适的进程已被发送SIGKILL。

在遍历所有进程的时候,遍历到倒数第二个进程的时候没有问题,在遍历最后一个进程的时候,如下代码:

if (test_tsk_thread_flag(p, TIF_MEMDIE) &&    time_before_eq(jiffies, lowmem_deathpending_timeout)) {task_unlock(p);rcu_read_unlock();return 0;}
该这个进程的SIGKILL信号还没处理完.

查看当前的task信息

((struct task_struct)*0xC2262D80).pending.signal = (0x0100, 0x0 
pending signal是SIGKILL

查看他的栈,处于ptrace_stop的状态中,因其tombstone需要debuggerd dump该进程堆栈

在debuggerd接管某task的时候,所有信号都会被ptrace截获,所以当给该task发送SIGKILL的时候,不会被该task处理。


去掉debuggerd进行复测,故障不复现。


机器配置:512ram+7x27a+android4.1

0 0
原创粉丝点击