2

I got a ANR report from user:

here is the traces.txt:

----- pid 2398 at 2015-11-09 20:34:06 -----
Cmd line: system_server

JNI: CheckJNI is off; workarounds are off; pins=5; globals=1465 (plus 72 weak)

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)

"main" prio=5 tid=1 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x41ba4578 self=0x41b876e8
  | sysTid=2398 nice=0 sched=0/0 cgrp=apps handle=1075064828
  | state=S schedstat=( 18535410714 5323845476 41281 ) utm=1502 stm=351 core=3
  #00  pc 0001b53c  /system/lib/libc.so (__ioctl+8)
  #01  pc 0002bccf  /system/lib/libc.so (ioctl+14)
  #02  pc 0001b929  /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
  #03  pc 0001c0c7  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+154)
  #04  pc 00001471  /system/lib/libsystem_server.so (system_init+408)
  #05  pc 0001e44c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #06  pc 0004e91b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
  #07  pc 00027860  /system/lib/libdvm.so
  #08  pc 0002be00  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #09  pc 00060d2b  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+350)
  #10  pc 000689ab  /system/lib/libdvm.so
  #11  pc 00027860  /system/lib/libdvm.so
  #12  pc 0002be00  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #13  pc 00060a6d  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+292)
  #14  pc 0004a4fb  /system/lib/libdvm.so
  #15  pc 00054afb  /system/lib/libandroid_runtime.so
  #16  pc 00056023  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+378)
  #17  pc 0000105b  /system/bin/app_process
  #18  pc 0000dc4f  /system/lib/libc.so (__libc_init+50)
  #19  pc 00000d7c  /system/bin/app_process
  at com.android.server.SystemServer.init1(Native Method)
  at com.android.server.SystemServer.main(SystemServer.java:2012)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:525)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
  at dalvik.system.NativeStart.main(Native Method)

traces.txt below are some other pids:

Cmd line: com.android.systemui
Cmd line: com.baidu.map.location
Cmd line: com.android.phone
Cmd line: com.sec.android.sCloudRelayData
Cmd line: com.sec.spp.push
Cmd line: com.tgrape.android.radar
Cmd line: android.process.acore
Cmd line: com.samsung.android.providers.context
Cmd line: com.sec.android.provider.logsprovider
Cmd line: com.sec.msc.nts.android.proxy
Cmd line: com.android.nfc
Cmd line: com.tencent.android.qqdownloader:connect
Cmd line: ***.myapplication.here***
----- pid 8404 at 2015-11-09 20:34:06 -----
Cmd line: com.tencent.tribe

JNI: CheckJNI is off; workarounds are off; pins=0; globals=239 (plus 3 weak)

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)

"main" prio=5 tid=1 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x41ba4578 self=0x41b876e8
  | sysTid=8404 nice=0 sched=0/0 cgrp=apps handle=1075064828
  | state=t schedstat=( 337010259402 60385639303 666839 ) utm=27266 stm=6434 core=3
  (native backtrace unavailable)
  at com.google.android.gles_jni.EGLImpl.eglMakeCurrent(Native Method)
  at android.view.HardwareRenderer$GlRenderer.checkCurrent(HardwareRenderer.java:1590)
  at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1348)
  at android.view.ViewRootImpl.draw(ViewRootImpl.java:2672)
  at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2538)
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2154)
  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6364)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
  at android.view.Choreographer.doCallbacks(Choreographer.java:591)
  at android.view.Choreographer.doFrame(Choreographer.java:561)
  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
  at android.os.Handler.handleCallback(Handler.java:730)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:176)
  at android.app.ActivityThread.main(ActivityThread.java:5419)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:525)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
  at dalvik.system.NativeStart.main(Native Method)

I have no idea how to solve this ANR, and find out the reason.

Since my application appear very far away from the first line of traces.txt, will that means that it is very rare that my application caused the ANR?

I don't know the processes dump order in traces.txt means, not find the relative documents.

Gohan
  • 2,422
  • 2
  • 26
  • 45
  • One of your .so libs is crashing, as the crashdump is showing a native (C/C++) crash. Mark the vendor of the user's phone and wait until it reproduces on some other vendor's device. That way you'll know if it's vendor-specific or not. – Shark Nov 09 '15 at 13:31
  • 1
    @Shark that's not an exception/crash stack I think, just system_server hang for some reason – Gohan Nov 10 '15 at 01:16
  • what makes you think it has anything to do with your app (or that your app causes it) then? – Shark Nov 10 '15 at 09:21
  • @Shark user ANR when use my app – Gohan Nov 12 '15 at 10:13
  • 1
    "user ANR when use my app" -- if it routinely happens when running your app, then your app must be involved somehow. That being said, I have no idea how you would go about addressing this if you cannot reproduce it in the lab. You might try to find out what sort of device this is, then try your app on it a virtual device lab. For example, the traces suggest that this is a Samsung model, and they run their own virtual device lab for developers. I am sorry that I don't have better advice. – CommonsWare Nov 12 '15 at 12:00
  • @CommonsWare thing is, emulators suck at reproducing device-specific problems because mostly, they don't have those device-specific problems. You need a real device from the same vendor to reproduce device-specific issues. And for finding decent workarounds. – Shark Nov 12 '15 at 13:51
  • @Shark: A virtual device lab is not an emulator. It is access to actual hardware, operated by remote. Samsung calls theirs the [Remote Test Lab](http://developer.samsung.com/remotetestlab/rtlDeviceList.action). My apologies for any confusion. – CommonsWare Nov 12 '15 at 13:54
  • @CommonsWare aaah, i understand; my bad for not getting it :) – Shark Nov 12 '15 at 14:13

0 Answers0