一次ANR分析:CPU爆炸引起的ANR

(1)首先分析 trace文件

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x75058f60 self=0x558090fcd0
  | sysTid=3803 nice=0 cgrp=default sched=0/0 handle=0x7f9c4b8fe8
  | state=S schedstat=( 0 0 0 ) utm=5225 stm=848 core=3 HZ=100
  | stack=0x7fca9fa000-0x7fca9fc000 stackSize=8MB
  | held mutexes=
  kernel: __switch_to+0x74/0x8c
  kernel: futex_wait_queue_me+0xe8/0x178
  kernel: futex_wait+0xe4/0x240
  kernel: do_futex+0x198/0x9e0
  kernel: SyS_futex+0x114/0x198
  kernel: cpu_switch_to+0x48/0x4c
  native: #00 pc 0000000000019900  /system/lib64/libc.so (syscall+28)
  native: #01 pc 000000000013a654  /system/lib64/libart.so (art::ConditionVariable::Wait(art::Thread*)+136)
  native: #02 pc 0000000000534848  /system/lib64/libart.so (art::GoToRunnable(art::Thread*)+680)
  native: #03 pc 000000000011cdac  /system/lib64/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+24)
  native: #04 pc 000000000048f960  /data/dalvik-cache/arm64/system@[email protected] (Java_dalvik_system_VMDebug_countInstancesOfClass__Ljava_lang_Class_2Z+180)
  at dalvik.system.VMDebug.countInstancesOfClass(Native method)
  at android.os.StrictMode.decrementExpectedActivityCount(StrictMode.java:2260)
  at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3838)
  at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3849)
  at android.app.ActivityThread.-wrap5(ActivityThread.java:-1)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:148)
  at android.app.ActivityThread.main(ActivityThread.java:5417)
  at java.lang.reflect.Method.invoke!(Native method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:731)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621)


(2)

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x741edf60 self=0x55a02f2cd0
  | sysTid=3098 nice=0 cgrp=default sched=0/0 handle=0x7fa3340fe8
  | state=S schedstat=( 0 0 0 ) utm=385 stm=82 core=0 HZ=100
  | stack=0x7fcf023000-0x7fcf025000 stackSize=8MB
  | held mutexes=
  kernel: __switch_to+0x74/0x8c
  kernel: futex_wait_queue_me+0xe8/0x178
  kernel: futex_wait+0xe4/0x240
  kernel: do_futex+0x198/0x9e0
  kernel: SyS_futex+0x114/0x198
  kernel: cpu_switch_to+0x48/0x4c
  native: #00 pc 0000000000019900  /system/lib64/libc.so (syscall+28)
  native: #01 pc 000000000013a654  /system/lib64/libart.so (art::ConditionVariable::Wait(art::Thread*)+136)
  native: #02 pc 000000000035f3a0  /system/lib64/libart.so (art::JNI::CallObjectMethod(_JNIEnv*, _jobject*, _jmethodID*, ...)+1124)
  native: #03 pc 00000000000bc0f4  /system/lib64/libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync(long, int, unsigned int)+48)
  native: #04 pc 00000000000bc520  /system/lib64/libandroid_runtime.so (android::NativeDisplayEventReceiver::handleEvent(int, int, void*)+84)
  native: #05 pc 000000000001b0a4  /system/lib64/libutils.so (android::Looper::pollInner(int)+960)
  native: #06 pc 000000000001b154  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+80)
  native: #07 pc 00000000000
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值