Understanding ANR logs provided by Android Vitals in the Play Store Console
Asked Answered
N

0

6

I am getting an instance of a telephonymanager (single or multisim devices) and got several ANRs. I have managed to work through most of them but this one persists:

*Broadcast of Intent { act=android.intent.action.SCREEN_OFF flg=0x50000010 (has extras)

What's the best way to deal with this? Some of these were only reproducible when leaving the app open and the device's screen on for several hours. This makes it difficult to debug ANRs such as these.

There is a part in the report that says that the running is "locked". How do I distinguish if this is a deadlock or when the thread is waiting for the current operation to complete? The callbackDataConnectionStateChanged(), refreshTelephonyState() methods are synchronized

"main" tid=1 Native
"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x75bf6598 self=0xb87af970
  | sysTid=7874 nice=0 cgrp=default sched=0/0 handle=0xb6f90b4c
  | state=S schedstat=( 54620404003 32316399006 164607 ) utm=3795 stm=1667 core=1 HZ=100
  | stack=0xbe13c000-0xbe13e000 stackSize=8MB
  | held mutexes=

  #00  pc 0000000000016978  /system/lib/libc.so (syscall+28)

  #01  pc 00000000000f5e43  /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+82)

  #02  pc 00000000003e4da3  /system/lib/libart.so (_ZN3artL12GoToRunnableEPNS_6ThreadE+502)

  #03  pc 00000000000e541d  /system/lib/libart.so (_ZN3art12JniMethodEndEjPNS_6ThreadE+8)

  #04  pc 0000000000f31ddd  /system/framework/arm/boot.oat (Java_android_os_BinderProxy_transactNative__ILandroid_os_Parcel_2Landroid_os_Parcel_2I+152)

  at android.os.BinderProxy.transactNative (Native method)

  at android.os.BinderProxy.transact (Binder.java:503)

  at com.android.internal.telephony.ISub$Stub$Proxy.getDefaultSubId (ISub.java:893)

  at android.telephony.SubscriptionManager.getDefaultSubId (SubscriptionManager.java:992)

  at android.telephony.TelephonyManager.getDefaultPhone (TelephonyManager.java:3995)

  at android.telephony.TelephonyManager.getSimOperatorName (TelephonyManager.java:2152)

  at com.test.api.tools.testTelephonyManager.getSimOperatorName (testTelephonyManager.java:434)

  at com.test.api.DataCollector.refreshTelephonyState (DataCollector.java:1520)
- **locked** <0x0fdf1bd6> (a com.test.api.DataCollector)

  at com.test.api.DataCollector.callbackDataConnectionStateChanged (DataCollector.java:675)
- **locked** <0x0fdf1bd6> (a com.test.api.DataCollector)

  at com.test.api.DataCollectorSystemListener$MccServicePhoneStateListener.onDataConnectionStateChanged (DataCollectorSystemListener.java:241)
- locked <0x09fe3e57> (a com.test.api.DataCollectorSystemListener$MccServicePhoneStateListener)

  at com.test.api.tools.MultiSimListener.onDataConnectionStateChanged (MultiSimListener.java:70)

  at android.telephony.PhoneStateListener$1.handleMessage (PhoneStateListener.java:326)

  at android.os.Handler.dispatchMessage (Handler.java:102)

  at android.os.Looper.loop (Looper.java:158)

  at android.app.ActivityThread.main (ActivityThread.java:7231)

  at java.lang.reflect.Method.invoke! (Native method)

  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)

  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
Nyssa answered 18/6, 2018 at 13:27 Comment(1)
Have you found an answer? I am facing a similar issue.Vuong

© 2022 - 2024 — McMap. All rights reserved.