可能的死锁:ANR调试

时间:2014-02-20 05:25:50

标签: android android-anr-dialog

我最近才开始研究Android上的ANR问题。我对ANR可能是什么原因有很高的了解。然而,在我正在处理的问题中,我无法解释究竟是什么问题。 ANR痕迹的相关部分如下:

"main" prio=5 tid=1 MONITOR
  | group="main" sCount=1 dsCount=0 obj=0x415f6e58 self=0x41516828
  | sysTid=1035 nice=-2 sched=0/0 cgrp=apps handle=1074409812
  | state=S schedstat=( 2593876942 1100275957 4673 ) utm=190 stm=69 core=0
  at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:~13826)
  - waiting to lock <0x41a81f00> (a com.android.server.am.ActivityManagerService) held by tid=59 (Binder_C)
  at android.app.ActivityManagerNative.broadcastStickyIntent(ActivityManagerNative.java:96)
  at com.android.server.BatteryService$8.run(BatteryService.java:591)
  at android.os.Handler.handleCallback(Handler.java:733)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:136)
  at com.android.server.ServerThread.initAndLoop(SystemServer.java:1259)
  at com.android.server.SystemServer.main(SystemServer.java:1360)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)
  at dalvik.system.NativeStart.main(Native Method)


"Binder_C" prio=5 tid=59 WAIT
  | group="main" sCount=1 dsCount=0 obj=0x41ae9e00 self=0x6247bb78
  | sysTid=1508 nice=0 sched=0/0 cgrp=apps handle=1648867632
  | state=S schedstat=( 318123480 187097758 1551 ) utm=26 stm=5 core=1
  at java.lang.Object.wait(Native Method)
  - waiting on <0x41e6fc90> (a com.android.server.PermissionDialogResult$Result)
  at java.lang.Object.wait(Object.java:364)
  at com.android.server.PermissionDialogResult$Result.get(PermissionDialogResult.java:40)
  at com.android.server.AppOpsService.noteOperation(AppOpsService.java:651)
  at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java:778)
  at com.android.server.am.ActivityManagerService.finishReceiver(ActivityManagerService.java:13941)
  at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:383)
  at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2083)
  at android.os.Binder.execTransact(Binder.java:404)
  at dalvik.system.NativeStart.run(Native Method)

显然,主线程正在等待binder_C保持锁定,但我没有得到binder_C正在等待的内容。这可能是一个死锁问题吗?同样对于活页夹线程,“WAIT”标签(在第一行上)表示什么?

0 个答案:

没有答案