应用挂了
android如何分析进程被杀问题
Crash
tagNum | 关键字 | 参数说明 | 简要说明 |
---|
30039 | am_crash | (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Exception|3),(Message|3),(File|3),(Line|1|5) | # Unhandled exception |
ANR
tagNum | 关键字 | 参数说明 | 简要说明 |
---|
30008 | am_anr | (User|1|5),(pid|1|5),(Package Name|3),(Flags|1|5),(reason|3) | # Application Not Responding |
am_proc_died
tagNum | 关键字 | 参数说明 | 简要说明 |
---|
30011 | am_proc_died | (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(ProcState|1|5) | # Application process died | 30023 | am_kill | (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(Reason|3) | # Kill a process to reclaim memory. |
frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
frameworks/base/core/java/android/app/ApplicationExitInfo.java
- 上面是明显的crash、anr,相关
ApplicationExitInfo.REASON_ANR 、ApplicationExitInfo.REASON_CRASH - 有时只有
am_proc_died 和wm_finish_activity
案例
crash\anr
低内存查杀(LowMemoryKiller)
CPU占用率过高
am_kill : [0,22157,com.ximalaya.ting.android,900,excessive cpu 16720 during 300044 dur=2221553 limit=2]
ActivityManager: Killing 22157:com.ximalaya.ting.android/u0a239 (adj 900): excessive cpu 16720 during 300044 dur=2221553 limit=2
Zygote : Process 22157 exited due to signal 9 (Killed)
进程自己退出
正常查杀
installPackageLI/ deletePackageX等查杀关联进程
Signal 9自杀
09-07 16:53:03.027 1000 2566 2582 I Process : Sending signal. PID: 2566 SIG: 9
09-07 16:53:03.154 root 681 681 I Zygote : Process 2566 exited due to signal 9 (Killed)
09-07 16:53:03.167 1000 1734 4006 I ActivityManager: Process com.android.systemui (pid 2566) has died: pers PER
|