I have written an app which displays html pages in Webviews, which are managed in a ViewPager. All working ok, but I have had a few ANRs when swiping from one page to another. The ANR data dump shows that the main thread has called through ThreadedRenderer.nSyncAndDrawFrame() which calls a native method, which apparently communicates with the Renderer thread, and waits for that thread to complete drawing the view. Since both of these are executing native code it's hard to work out what's going on but it appears the Renderer thread has never signalled the main thread to resume, hence causing the ANR. There is nothing in the logcat prior to the ANR report that suggests any problem.
Does anyone have suggestions for how to troubleshoot this? I am assuming that the call to ThreadedRenderer.nSyncAndDrawFrame() is associated with the Webview, but I don't actually have anything to confirm that.
The problem is not repeatable, in the sense that if I restart the app and navigate to the same page that was showing when the ANR occurred, it doesn't happen again. Device is a Nexus 7 running Android 5.1.
ANR stacktrace for main and renderer threads:
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x73547000 self=0xb4827800
| sysTid=1248 nice=-6 cgrp=default sched=0/0 handle=0xb6fd6bec
| state=S schedstat=( 0 0 0 ) utm=6035 stm=1406 core=0 HZ=100
| stack=0xbe5a6000-0xbe5a8000 stackSize=8MB
| held mutexes=
kernel: (couldn't read /proc/self/task/1248/stack)
native: #00 pc 000133b8 /system/lib/libc.so (syscall+28)
native: #01 pc 00016a81 /system/lib/libc.so (__pthread_cond_timedwait_relative(pthread_cond_t*, pthread_mutex_t*, timespec const*)+56)
native: #02 pc 0003c73b /system/lib/libhwui.so (???)
native: #03 pc 0003c771 /system/lib/libhwui.so (???)
native: #04 pc 0083fd83 /data/dalvik-cache/arm/system#framework#boot.oat (Java_android_view_ThreadedRenderer_nSyncAndDrawFrame__JJJF+134)
at android.view.ThreadedRenderer.nSyncAndDrawFrame(Native method)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:340)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2530)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2352)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1982)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke!(Native method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
"RenderThread" prio=5 tid=26 Native
| group="main" sCount=1 dsCount=0 obj=0x12c07820 self=0xa1c30800
| sysTid=1303 nice=-4 cgrp=default sched=0/0 handle=0xa1c44c00
| state=S schedstat=( 0 0 0 ) utm=8314 stm=1817 core=0 HZ=100
| stack=0xa0cc2000-0xa0cc4000 stackSize=1012KB
| held mutexes=
kernel: (couldn't read /proc/self/task/1303/stack)
native: #00 pc 000133b8 /system/lib/libc.so (syscall+28)
native: #01 pc 0001741b /system/lib/libc.so (__futex_wait_ex+42)
native: #02 pc 00017761 /system/lib/libc.so (pthread_mutex_lock+230)
native: #03 pc 0001d767 /system/vendor/lib/libgsl.so (os_mutex_lock+6)
native: #04 pc 0001ea88 /system/vendor/lib/egl/libEGL_adreno.so (egliDoDestroyEGLImage+180)
native: #05 pc 0008698d /system/vendor/lib/egl/libGLESv2_adreno.so (rb_image_try_release+32)
native: #06 pc 00086acf /system/vendor/lib/egl/libGLESv2_adreno.so (rb_destroy_resource_updates_pure+136)
native: #07 pc 00085491 /system/vendor/lib/egl/libGLESv2_adreno.so (rb_perform_resolve+276)
native: #08 pc 00085761 /system/vendor/lib/egl/libGLESv2_adreno.so (rb_resolve+464)
native: #09 pc 0008a891 /system/vendor/lib/egl/libGLESv2_adreno.so (rb_surface_swap+228)
native: #10 pc 0006af89 /system/vendor/lib/egl/libGLESv2_adreno.so (gl2_surface_swap+76)
native: #11 pc 0005d12b /system/vendor/lib/egl/libGLESv2_adreno.so (oglSwapBuffer+194)
native: #12 pc 00013ddc /system/vendor/lib/egl/libEGL_adreno.so (qeglDrvAPI_eglSwapBuffers+1776)
native: #13 pc 00007b60 /system/vendor/lib/egl/libEGL_adreno.so (eglSwapBuffers+16)
native: #14 pc 0001237f /system/lib/libEGL.so (eglSwapBuffers+290)
native: #15 pc 0003d291 /system/lib/libhwui.so (???)
native: #16 pc 0003bd05 /system/lib/libhwui.so (???)
native: #17 pc 0003beb5 /system/lib/libhwui.so (???)
native: #18 pc 0003caed /system/lib/libhwui.so (???)
native: #19 pc 0003e743 /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+66)
native: #20 pc 000104d5 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
native: #21 pc 0005f839 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
native: #22 pc 00010045 /system/lib/libutils.so (???)
native: #23 pc 00016baf /system/lib/libc.so (__pthread_start(void*)+30)
native: #24 pc 00014af3 /system/lib/libc.so (__start_thread+6)
It may be a bug on Android 7.0 WebView, you can fix it by two ways below:
1、webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
2、android:hardwareAccelerated="false"
I faced with this issue too Seems that Chromium bug, that is related with latest Chromium Webview 43.0.23567.121. You could try to rollback webview on your app and check it again. For me issue reproducable only at latest Webview version.
This maybe a driver and chromium bug, see
https://bugs.chromium.org/p/chromium/issues/detail?id=501901
Related
i trying to fix this errors
this error occur after adding fcm 17.+.+~18.0.0
in previous version, this anr error not occur
could i know why did this error occur?
this is main thread code
p.s) i'm using navermap sdk,too
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x76024db0 self=0x7e75814c00
| sysTid=11665 nice=0 cgrp=default sched=0/0 handle=0x7efb8be548
| state=S schedstat=( 113364872507 54406457631 191892 ) utm=7848 stm=3488 core=2 HZ=100
| stack=0x7fd7d7f000-0x7fd7d81000 stackSize=8MB
| held mutexes=
#00 pc 000000000001f2ac /system/lib64/libc.so (syscall+28)
#01 pc 00000000000228f4 /system/lib64/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+140)
#02 pc 000000000009246c /system/lib64/libc.so (pthread_cond_wait+60)
#03 pc 00000000006c0734 /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (std::__ndk1::condition_variable::wait(std::__ndk1::unique_lock<std::__ndk1::mutex>&)+20)
#04 pc 00000000006c15c8 /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (std::__ndk1::__assoc_sub_state::wait()+84)
#05 pc 00000000004adcc0 /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (???)
#06 pc 0000000000095d38 /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (???)
#07 pc 0000000000095efc /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (???)
#08 pc 00000000004b3a6c /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (???)
#09 pc 00000000004b3b74 /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (???)
#10 pc 00000000004bbeec /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/lib/arm64/libnavermap.so (???)
#11 pc 000000000000062c /data/app/com.parkingbrother.parkingbrother-6hDptlHuJuICXkJB1RjLpg==/oat/arm64/base.odex (deleted) (offset 3b000) (Java_com_naver_maps_map_NativeMapView_nativeDestroy__+124)
at com.naver.maps.map.NativeMapView.nativeDestroy (Native method)
at com.naver.maps.map.NativeMapView.d (SourceFile:119)
at com.naver.maps.map.MapView.onDestroy (SourceFile:294)
at com.naver.maps.map.MapFragment.onDestroyView (SourceFile:167)
at android.support.v4.app.Fragment.performDestroyView (Fragment.java:2678)
at android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1533)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1784)
at android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1852)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange (FragmentManager.java:3269)
at android.support.v4.app.FragmentManagerImpl.dispatchDestroy (FragmentManager.java:3260)
at android.support.v4.app.FragmentController.dispatchDestroy (FragmentController.java:274)
at android.support.v4.app.FragmentActivity.onDestroy (FragmentActivity.java:419)
at android.support.v7.app.AppCompatActivity.onDestroy (AppCompatActivity.java:210)
at com.parkingbrother.parkingbrother.Main.MainActivity.Controller.MainActivity.onDestroy (MainActivity.java:92)
at android.app.Activity.performDestroy (Activity.java:7410)
I'm getting the below output in my code randomly (not related to any action that I can identify) when my application crashes. Can some one help me decipher what this logcat output means?
I've truncated a large portion of the text that seems to list out the various threads along with their States (waiting, timed-waiting, blocked, etc. . ) along with the stacktrace for the method calls on that thread.
07-31 14:39:40.455 942-947/com.salesrabbit.android.sales.universal A/art: art/runtime/jdwp/jdwp_event.cc:681] Check failed: threadId != 0u (threadId=0, 0u=0)
07-31 14:39:43.283 942-947/com.salesrabbit.android.sales.universal A/art: art/runtime/runtime.cc:422] Runtime aborting...
art/runtime/runtime.cc:422] Aborting thread:
art/runtime/runtime.cc:422] "Jit thread pool worker thread 0" prio=5 tid=2 WaitingForDebuggerSend (still starting up)
art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x0 self=0xa8617000
art/runtime/runtime.cc:422] | sysTid=947 nice=9 cgrp=default sched=0/0 handle=0xaf2a3920
art/runtime/runtime.cc:422] | state=R schedstat=( 8833095069 6087499776 14348 ) utm=557 stm=325 core=2 HZ=100
art/runtime/runtime.cc:422] | stack=0xaf1a5000-0xaf1a7000 stackSize=1022KB
art/runtime/runtime.cc:422] | held mutexes= "abort lock"
art/runtime/runtime.cc:422] native: #00 pc 00351069 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
art/runtime/runtime.cc:422] native: #01 pc 00331729 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
art/runtime/runtime.cc:422] native: #02 pc 003247a1 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+24)
art/runtime/runtime.cc:422] native: #03 pc 00324629 /system/lib/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+424)
art/runtime/runtime.cc:422] native: #04 pc 0031b351 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+92)
art/runtime/runtime.cc:422] native: #05 pc 000b526b /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1134)
art/runtime/runtime.cc:422] native: #06 pc 00240305 /system/lib/libart.so (_ZN3art4JDWP9JdwpState19SetWaitForJdwpTokenEy+708)
art/runtime/runtime.cc:422] native: #07 pc 0023fb51 /system/lib/libart.so (_ZN3art4JDWP9JdwpState24AcquireJdwpTokenForEventEy+76)
art/runtime/runtime.cc:422] native: #08 pc 0023f5e1 /system/lib/libart.so (_ZN3art4JDWP9JdwpState29SendRequestAndPossiblySuspendEPNS0_9ExpandBufENS0_17JdwpSuspendPolicyEy+180)
art/runtime/runtime.cc:422] native: #09 pc 0024301b /system/lib/libart.so (_ZN3art4JDWP9JdwpState16PostClassPrepareEPNS_6mirror5ClassE+914)
art/runtime/runtime.cc:422] native: #10 pc 000e4db5 /system/lib/libart.so (_ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE+560)
art/runtime/runtime.cc:422] native: #11 pc 000e4a15 /system/lib/libart.so (_ZN3art11ClassLinker26FindClassInPathClassLoaderERNS_33ScopedObjectAccessAlreadyRunnableEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEEPPNS8_5ClassE+1016)
art/runtime/runtime.cc:422] native: #12 pc 000e55ef /system/lib/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE+658)
art/runtime/runtime.cc:422] native: #13 pc 000d2a3d /system/lib/libart.so (_ZN3art11ClassLinker11ResolveTypeERKNS_7DexFileEtNS_6HandleINS_6mirror8DexCacheEEENS4_INS5_11ClassLoaderEEE+132)
art/runtime/runtime.cc:422] native: #14 pc 001354bd /system/lib/libart-compiler.so (_ZNK3art19HInstructionBuilder25IsOutermostCompilingClassEt+528)
art/runtime/runtime.cc:422] native: #15 pc 00134e5b /system/lib/libart-compiler.so (_ZN3art19HInstructionBuilder16BuildNewInstanceEtj+626)
art/runtime/runtime.cc:422] native: #16 pc 0012ffe7 /system/lib/libart-compiler.so (_ZN3art19HInstructionBuilder21ProcessDexInstructionERKNS_11InstructionEj+3522)
art/runtime/runtime.cc:422] native: #17 pc 0012ece9 /system/lib/libart-compiler.so (_ZN3art19HInstructionBuilder5BuildEv+1176)
art/runtime/runtime.cc:422] native: #18 pc 00113b79 /system/lib/libart-compiler.so (_ZN3art13HGraphBuilder10BuildGraphEv+84)
art/runtime/runtime.cc:422] native: #19 pc 00157ea9 /system/lib/libart-compiler.so (_ZNK3art18OptimizingCompiler10TryCompileEPNS_14ArenaAllocatorEPNS_19CodeVectorAllocatorEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS5_NS_6HandleINS_6mirror8DexCacheEEEPNS_9ArtMethodEb+2452)
art/runtime/runtime.cc:422] native: #20 pc 00159ae3 /system/lib/libart-compiler.so (_ZN3art18OptimizingCompiler10JitCompileEPNS_6ThreadEPNS_3jit12JitCodeCacheEPNS_9ArtMethodEb+330)
art/runtime/runtime.cc:422] native: #21 pc 00108e1f /system/lib/libart-compiler.so (_ZN3art3jit11JitCompiler13CompileMethodEPNS_6ThreadEPNS_9ArtMethodEb+194)
art/runtime/runtime.cc:422] native: #22 pc 00250473 /system/lib/libart.so (_ZN3art3jit3Jit13CompileMethodEPNS_9ArtMethodEPNS_6ThreadEb+318)
art/runtime/runtime.cc:422] native: #23 pc 00251b97 /system/lib/libart.so (_ZN3art3jit14JitCompileTask3RunEPNS_6ThreadE+430)
art/runtime/runtime.cc:422] native: #24 pc 003445a1 /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+44)
art/runtime/runtime.cc:422] native: #25 pc 003440d9 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+64)
art/runtime/runtime.cc:422] native: #26 pc 00047093 /system/lib/libc.so (_ZL15__pthread_startPv+22)
art/runtime/runtime.cc:422] native: #27 pc 00019bdd /system/lib/libc.so (__start_thread+6)
art/runtime/runtime.cc:422] (no managed stack frames)
art/runtime/runtime.cc:422] Dumping all threads without appropriate locks held: thread list lock mutator lock
art/runtime/runtime.cc:422] All threads:
07-31 14:39:43.285 942-947/com.salesrabbit.android.sales.universal A/art: art/runtime/runtime.cc:422] DALVIK THREADS (470):
art/runtime/runtime.cc:422] "Jit thread pool worker thread 0" prio=5 tid=2 Runnable (still starting up)
art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x0 self=0xa8617000
art/runtime/runtime.cc:422] | sysTid=947 nice=9 cgrp=default sched=0/0 handle=0xaf2a3920
art/runtime/runtime.cc:422] | state=R schedstat=( 9523364645 6173422596 15193 ) utm=559 stm=392 core=0 HZ=100
art/runtime/runtime.cc:422] | stack=0xaf1a5000-0xaf1a7000 stackSize=1022KB
art/runtime/runtime.cc:422] | held mutexes= "abort lock" "mutator lock"(shared held)
art/runtime/runtime.cc:422] native: #00 pc 00351069 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
art/runtime/runtime.cc:422] native: #01 pc 00331729 /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
art/runtime/runtime.cc:422] native: #02 pc 0034382f /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6T
I've truncated a bunch of other threads:
--------- beginning of crash
07-31 14:39:43.630 942-947/com.salesrabbit.android.sales.universal A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 947 (Jit thread pool)
EDIT 1
I updated my android studio from 3.0.1 to 3.1.3 (as well as gradle) yesterday and the issue went away until today after lunch it randomly came back. I tried invalidating the cache and restating android studio but it did not have any affect. I still get this crash about 2 minutes after building/installing the app on a test device. It happens on all of our test devices.
EDIT 2
I just discovered that if I turned off all my breakpoints the crash goes away. If I put the break point back the crash come back. This is very annoying!
In the code below, if I put a break point on db.endTransaction(), the app crashes. Why? How can I fix this?
return Single.just(page)
.map {
val db: Database = daoSession.database
db.beginTransaction()
. . . .
db.setTransactionSuccessful()
db.endTransaction()
return#map page
}
.map {
geoCodeAsNeeded(page.addressToGeoCode)
return#map page
}
.map {
return someMethod()
}
.subscribeOn(Schedulers.io())
As this line from stack trace says:
Fatal signal 6 (SIGABRT), code -6 in tid 8509 (Jit thread pool)
your error is SIGABRT signal.
1) Do not block the UI thread, this can cause a SIGABRT as the OS will
kill a non-responsive app.
2) Make sure that in your OnDestroy within your Activity you are
cleaning up after yourself. i.e. Removing all your Listeners/Events
and then calling the Base.OnDestory.
3) An external (i.e. BluetoothLeService) service calling back into
your app with listeners that now null/nil will cause hangs and thus a
SIGABRT, see #2
more answers: What is fatal signal 6 in android logcat
if you could not find error location you have to find it by changing parts of your code to comment to see if problem solves.
Just turn off your windows defender. Turn off all switches of defender.
I followed this tutorial in order to capture a video of my game, and it's working. I tested on several devices, and it's working. But it fails with a Nexus 7 (2012). The game freezes.
Debugging the library, I found that the call to EGL14.eglMakeCurrent in line 143 of this file is causing it.
Why EGL14.eglMakeCurrent call may block the execution?
EDIT: There is nothing in logcat when game freezes. I can only get this information from adb bugreport:
"Thread-597" prio=5 tid=76 Native
| group="main" sCount=1 dsCount=0 obj=0x12d44190 self=0x80858858
| sysTid=7984 nice=0 cgrp=apps sched=0/0 handle=0x80858d38
| state=S schedstat=( 43302000 35740000 115 ) utm=2 stm=2 core=3 HZ=100
| stack=0x80c74000-0x80c76000 stackSize=1036KB
| held mutexes=
native: #00 pc 00012444 /system/lib/libc.so (syscall+28)
native: #01 pc 0001641b /system/lib/libc.so (???)
native: #02 pc 000167b1 /system/lib/libc.so (pthread_mutex_lock+310)
native: #03 pc 00005b5c /system/lib/libnvos.so (???)
native: #04 pc 0000a7d8 /system/lib/egl/libGLESv2_tegra.so (???)
native: #05 pc 00006ee3 /system/lib/egl/libEGL_tegra.so (???)
native: #06 pc 00006f8f /system/lib/egl/libEGL_tegra.so (???)
native: #07 pc 000077db /system/lib/egl/libEGL_tegra.so (eglMakeCurrent+34)
native: #08 pc 0000ffc1 /system/lib/libEGL.so (android::egl_display_t::makeCurrent(android::egl_context_t*, android::egl_context_t*, void*, void*, void*, void*, void*, void*)+142)
native: #09 pc 000125cf /system/lib/libEGL.so (eglMakeCurrent+266)
native: #10 pc 0005fffb /system/lib/libandroid_runtime.so (???)
native: #11 pc 00271ed3 /data/dalvik-cache/arm/system#framework#boot.oat (Java_com_google_android_gles_1jni_EGLImpl_eglMakeCurrent__Ljavax_microedition_khronos_egl_EGLDisplay_2Ljavax_microedition_khronos_egl_EGLSurface_2Ljavax_microedition_khronos_egl_EGLSurface_2Ljavax_microedition_khronos_egl_EGLContext_2+178)
at com.google.android.gles_jni.EGLImpl.eglMakeCurrent(Native method)
at com.mycopmany.mypackage.androidvideocapture.SharedContext.doneCurrent(SharedContext.java:104)
at com.mycopmany.mypackage.androidvideocapture.Capturing$EncodeThread.run(Capturing.java:104)
- locked <#addr=0x12f01780> (a com.mycopmany.mypackage.androidvideocapture.VideoCapture)
"Thread-602" prio=5 tid=82 Native
| group="main" sCount=1 dsCount=0 obj=0x12dd5c50 self=0x7f2c42b0
| sysTid=6302 nice=0 cgrp=apps sched=0/0 handle=0x7f2d5020
| state=S schedstat=( 17164000 17265000 48 ) utm=0 stm=1 core=1 HZ=100
| stack=0x81402000-0x81404000 stackSize=1036KB
| held mutexes=
native: #00 pc 00012444 /system/lib/libc.so (syscall+28)
native: #01 pc 0001641b /system/lib/libc.so (???)
native: #02 pc 000167b1 /system/lib/libc.so (pthread_mutex_lock+310)
native: #03 pc 00005b5c /system/lib/libnvos.so (???)
native: #04 pc 0000b64c /system/lib/egl/libGLESv2_tegra.so (???)
native: #05 pc 00007219 /system/lib/egl/libEGL_tegra.so (???)
native: #06 pc 000077db /system/lib/egl/libEGL_tegra.so (eglMakeCurrent+34)
native: #07 pc 0000ff93 /system/lib/libEGL.so (android::egl_display_t::makeCurrent(android::egl_context_t*, android::egl_context_t*, void*, void*, void*, void*, void*, void*)+96)
native: #08 pc 000125cf /system/lib/libEGL.so (eglMakeCurrent+266)
native: #09 pc 00061845 /system/lib/libandroid_runtime.so (???)
native: #10 pc 009bf213 /data/dalvik-cache/arm/system#framework#boot.oat (Java_android_opengl_EGL14_eglMakeCurrent__Landroid_opengl_EGLDisplay_2Landroid_opengl_EGLSurface_2Landroid_opengl_EGLSurface_2Landroid_opengl_EGLContext_2+178)
at android.opengl.EGL14.eglMakeCurrent(Native method)
at org.m4m.android.InputSurface.makeCurrent(InputSurface.java:145)
at org.m4m.android.Surface.<init>(Surface.java:34)
at org.m4m.android.MediaCodecEncoderPlugin.createInputSurface(MediaCodecEncoderPlugin.java:133)
at org.m4m.domain.Encoder.getSurface(Encoder.java:34)
at org.m4m.domain.pipeline.PluginConnector$26.onSurfaceAvailable(PluginConnector.java:354)
at org.m4m.android.GameCapturerSource.setSurfaceSize(GameCapturerSource.java:52)
at org.m4m.GLCapture.setSurfaceSize(GLCapture.java:89)
at com.mycopmany.mypackage.androidvideocapture.VideoCapture.configure(VideoCapture.java:93)
at com.mycopmany.mypackage.androidvideocapture.VideoCapture.beginCaptureFrame(VideoCapture.java:104)
at com.mycopmany.mypackage.androidvideocapture.Capturing$EncodeThread.run(Capturing.java:96)
- locked <#addr=0x12db64a0> (a com.mycopmany.mypackage.androidvideocapture.VideoCapture)
Finally I found the problem. There is a bug in Tegra drivers that causes a deadlock when using shared contexts. More info:
https://devtalk.nvidia.com/default/topic/523619/opengl-es/threaded-texture-creation-under-android/
https://bugzilla.mozilla.org/show_bug.cgi?id=759225
https://devtalk.nvidia.com/default/topic/544779/opengl-es/eglmakecurrent-is-crashing-in-libnvos-so/
https://bugs.chromium.org/p/webrtc/issues/detail?id=5702
I am getting the Stack trace shown below when I startup my application. I'm at a loss for how to find out what is causing. It. I look at all the entry points into my application, but while they stay in the same classes the entry point moves around. It leads me to believe that the way to interpret this is as a dump of all the active running threads? Is this correct?
Some background about what is going on, this only seems to happen when my application is downloading a bunch of files it needs via OkHttp. So there are 2-3 files it downloads in parallel and unzips to start up. If I have already processed these files on a previous run I don't have the issues.
Another thing to note, this only seems to happen, when the device is being launched and debugged from Android Studio (2.2). It's possible that it happens when not attached, but I have not seen it.
Last, this is also only a problem on Android N
Runtime aborting...
Aborting thread:
"Jit thread pool worker thread 0" prio=5 tid=2 WaitingForDebuggerSend (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7f74c0e000
| sysTid=23054 nice=9 cgrp=default sched=0/0 handle=0x7f7bb07450
| state=R schedstat=( 686048383 171778965 676 ) utm=58 stm=9 core=4 HZ=100
| stack=0x7f7ba09000-0x7f7ba0b000 stackSize=1021KB
| held mutexes= "abort lock"
native: #00 pc 0000000000479ebc /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
native: #01 pc 0000000000479eb8 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
native: #02 pc 000000000044e260 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+480)
native: #03 pc 000000000043c33c /system/lib64/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+56)
native: #04 pc 000000000043c1b8 /system/lib64/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+668)
native: #05 pc 000000000042fd34 /system/lib64/libart.so (_ZN3art7Runtime5AbortEv+144)
native: #06 pc 00000000000e4d78 /system/lib64/libart.so (_ZN3art10LogMessageD2Ev+1208)
native: #07 pc 00000000002f5f48 /system/lib64/libart.so (_ZN3art4JDWP9JdwpState19SetWaitForJdwpTokenEm+1000)
native: #08 pc 00000000002f5468 /system/lib64/libart.so (_ZN3art4JDWP9JdwpState24AcquireJdwpTokenForEventEm+124)
native: #09 pc 00000000002f4d20 /system/lib64/libart.so (_ZN3art4JDWP9JdwpState29SendRequestAndPossiblySuspendEPNS0_9ExpandBufENS0_17JdwpSuspendPolicyEm+248)
native: #10 pc 00000000002f9d0c /system/lib64/libart.so (_ZN3art4JDWP9JdwpState16PostClassPrepareEPNS_6mirror5ClassE+1380)
native: #11 pc 0000000000123ba4 /system/lib64/libart.so (_ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcmNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE+804)
native: #12 pc 00000000001236e4 /system/lib64/libart.so (_ZN3art11ClassLinker26FindClassInPathClassLoaderERNS_33ScopedObjectAccessAlreadyRunnableEPNS_6ThreadEPKcmNS_6HandleINS_6mirror11ClassLoaderEEEPPNS8_5ClassE+1484)
native: #13 pc 0000000000124674 /system/lib64/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE+944)
native: #14 pc 000000000010bfb4 /system/lib64/libart.so (_ZN3art11ClassLinker11ResolveTypeERKNS_7DexFileEtNS_6HandleINS_6mirror8DexCacheEEENS4_INS5_11ClassLoaderEEE+200)
native: #15 pc 00000000001910a0 /system/lib64/libart-compiler.so (_ZNK3art19HInstructionBuilder25IsOutermostCompilingClassEt+732)
native: #16 pc 0000000000190810 /system/lib64/libart-compiler.so (_ZN3art19HInstructionBuilder16BuildNewInstanceEtj+852)
native: #17 pc 000000000018aa6c /system/lib64/libart-compiler.so (_ZN3art19HInstructionBuilder21ProcessDexInstructionERKNS_11InstructionEj+3436)
native: #18 pc 0000000000189534 /system/lib64/libart-compiler.so (_ZN3art19HInstructionBuilder5BuildEv+1600)
native: #19 pc 00000000001626b8 /system/lib64/libart-compiler.so (_ZN3art13HGraphBuilder10BuildGraphEv+136)
native: #20 pc 00000000001c113c /system/lib64/libart-compiler.so (_ZNK3art18OptimizingCompiler10TryCompileEPNS_14ArenaAllocatorEPNS_19CodeVectorAllocatorEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS5_NS_6HandleINS_6mirror8DexCacheEEEPNS_9ArtMethodEb+3280)
native: #21 pc 00000000001c35d8 /system/lib64/libart-compiler.so (_ZN3art18OptimizingCompiler10JitCompileEPNS_6ThreadEPNS_3jit12JitCodeCacheEPNS_9ArtMethodEb+472)
native: #22 pc 0000000000151bb8 /system/lib64/libart-compiler.so (_ZN3art3jit11JitCompiler13CompileMethodEPNS_6ThreadEPNS_9ArtMethodEb+284)
native: #23 pc 000000000030d0b8 /system/lib64/libart.so (_ZN3art3jit3Jit13CompileMethodEPNS_9ArtMethodEPNS_6ThreadEb+492)
native: #24 pc 000000000030efa4 /system/lib64/libart.so (_ZN3art3jit14JitCompileTask3RunEPNS_6ThreadE+656)
native: #25 pc 0000000000466dd4 /system/lib64/libart.so (_ZN3art16ThreadPoolWorker3RunEv+88)
native: #26 pc 000000000046671c /system/lib64/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+116)
native: #27 pc 000000000006863c /system/lib64/libc.so (_ZL15__pthread_startPv+208)
native: #28 pc 000000000001d9fc /system/lib64/libc.so (__start_thread+16)
(no managed stack frames)
Dumping all threads without appropriate locks held: thread list lock mutator lock
All threads:
DALVIK THREADS (30):
"OkHttp http://172.31.6.143:8000/file/get/%7B%22ESN%22%3A%2235362607888370%22%2C%22Type%22%3A%22vPack%22%2C%22FolderName%22%3A%22ASR%7CEngine4%22%2C%22FileName%22%3A%22myFile1.dat%22%7D" prio=5 tid=22 Runnable
| group="" sCount=0 dsCount=0 obj=0x12e54310 self=0x7f5fe82c00
| sysTid=23374 nice=0 cgrp=default sched=0/0 handle=0x7f5eb1d450
| state=R schedstat=( 894025544 158405362 948 ) utm=76 stm=12 core=1 HZ=100
| stack=0x7f5ea1b000-0x7f5ea1d000 stackSize=1037KB
| held mutexes= "mutator lock"(shared held)
native: #00 pc 0000000000479ebc /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
native: #01 pc 0000000000479eb8 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
native: #02 pc 000000000044e260 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+480)
native: #03 pc 0000000000465ba8 /system/lib64/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+832)
native: #04 pc 000000000044f1c4 /system/lib64/libart.so (_ZN3art6Thread21RunCheckpointFunctionEv+192)
native: #05 pc 00000000005483cc /system/lib64/libart.so (_ZN3art14JniMethodStartEPNS_6ThreadE+176)
native: #06 pc 0000000000b29074 /system/framework/arm64/boot-framework.oat (Java_android_util_Log_println_1native__IILjava_lang_String_2Ljava_lang_String_2+128)
at android.util.Log.println_native(Native method)
at android.util.Log.i(Log.java:164)
at com.dematic.shared.common.Logger.i(Logger.java:236)
at com.dematic.workflow.requests.iws.FileDownloadRequest$1.onResponse(FileDownloadRequest.java:285)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177)
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
"WelcomeActivity-Callback Executor" prio=5 tid=13 Runnable
| group="" sCount=0 dsCount=0 obj=0x12d20670 self=0x7f6201fe00
| sysTid=23344 nice=0 cgrp=default sched=0/0 handle=0x7f61898450
| state=R schedstat=( 2195523146 66879832 461 ) utm=219 stm=0 core=5 HZ=100
| stack=0x7f61796000-0x7f61798000 stackSize=1037KB
| held mutexes= "mutator lock"(shared held)
native: #00 pc 0000000000479ebc /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
native: #01 pc 0000000000479eb8 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
native: #02 pc 000000000044e260 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+480)
native: #03 pc 0000000000465ba8 /system/lib64/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+832)
native: #04 pc 000000000044f1c4 /system/lib64/libart.so (_ZN3art6Thread21RunCheckpointFunctionEv+192)
native: #05 pc 00000000002a66a8 /system/lib64/libart.so (_ZN3art11interpreter17ExecuteSwitchImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_b+2672)
native: #06 pc 0000000000260a80 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+484)
native: #07 pc 000000000026670c /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+184)
native: #08 pc 0000000000286a7c /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+568)
native: #09 pc 00000000002b8da4 /system/lib64/libart.so (_ZN3art11interpreterL8DoInvokeILNS_10InvokeTypeE4ELb0ELb0EEEbPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+1216)
native: #10 pc 00000000002b4ddc /system/lib64/libart.so (_ZN3art11interpreter17ExecuteSwitchImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_b+61860)
native: #11 pc 0000000000260a80 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+484)
native: #12 pc 00000000005497d8 /system/lib64/libart.so (artQuickToInterpreterBridge+832)
native: #13 pc 00000000000db2ac /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
native: #14 pc 00000000000d1bb4 /system/lib64/libart.so (art_quick_invoke_stub+580)
native: #15 pc 00000000000de87c /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+208)
native: #16 pc 000000000042974c /system/lib64/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+108)
native: #17 pc 000000000042aa50 /system/lib64/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+372)
native: #18 pc 000000000044a040 /system/lib64/libart.so (_ZN3art6Thread14CreateCallbackEPv+1100)
native: #19 pc 000000000006863c /system/lib64/libc.so (_ZL15__pthread_startPv+208)
native: #20 pc 000000000001d9fc /system/lib64/libc.so (__start_thread+16)
at com.dematic.workflow.activities.CommunicationFragment$5.run(CommunicationFragment.java:510)
at java.lang.Thread.run(Thread.java:761)
"Jit thread pool worker thread 0" prio=5 tid=2 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7f74c0e000
| sysTid=23054 nice=9 cgrp=default sched=0/0 handle=0x7f7bb07450
| state=R schedstat=( 713413070 174046620 681 ) utm=60 stm=10 core=4 HZ=100
| stack=0x7f7ba09000-0x7f7ba0b000 stackSize=1021KB
| held mutexes= "abort lock" "mutator lock"(shared held)
native: #00 pc 0000000000479ebc /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
native: #01 pc 0000000000479eb8 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
native: #02 pc 000000000044e260 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+480)
native: #03 pc 0000000000465ba8 /system/lib64/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+832)
native: #04 pc 000000000045dd90 /system/lib64/libart.so (_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureE+476)
native: #05 pc 000000000045d98c /system/lib64/libart.so (_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb+288)
native: #06 pc 000000000043c16c /system/lib64/libart.so (_ZNK3art10AbortState4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+592)
native: #07 pc 000000000042fd34 /system/lib64/libart.so (_ZN3art7Runtime5AbortEv+144)
native: #08 pc 00000000000e4d78 /system/lib64/libart.so (_ZN3art10LogMessageD2Ev+1208)
native: #09 pc 00000000002f5f48 /system/lib64/libart.so (_ZN3art4JDWP9JdwpState19SetWaitForJdwpTokenEm+1000)
native: #10 pc 00000000002f5468 /system/lib64/libart.so (_ZN3art4JDWP9JdwpState24AcquireJdwpTokenForEventEm+124)
native: #11 pc 00000000002f4d20 /system/lib64/libart.so (_ZN3art4JDWP9JdwpState29SendRequestAndPossiblySuspendEPNS0_9ExpandBufENS0_17JdwpSuspendPolicyEm+248)
native: #12 pc 00000000002f9d0c /system/lib64/libart.so (_ZN3art4JDWP9JdwpState16PostClassPrepareEPNS_6mirror5ClassE+1380)
native: #13 pc 0000000000123ba4 /system/lib64/libart.so (_ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcmNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE+804)
native: #14 pc 00000000001236e4 /system/lib64/libart.so (_ZN3art11ClassLinker26FindClassInPathClassLoaderERNS_33ScopedObjectAccessAlreadyRunnableEPNS_6ThreadEPKcmNS_6HandleINS_6mirror11ClassLoaderEEEPPNS8_5ClassE+1484)
native: #15 pc 0000000000124674 /system/lib64/libart.so (_ZN3art11ClassLinker9FindClassEPNS_6ThreadEPKcNS_6HandleINS_6mirror11ClassLoaderEEE+944)
native: #16 pc 000000000010bfb4 /system/lib64/libart.so (_ZN3art11ClassLinker11ResolveTypeERKNS_7DexFileEtNS_6HandleINS_6mirror8DexCacheEEENS4_INS5_11ClassLoaderEEE+200)
native: #17 pc 00000000001910a0 /system/lib64/libart-compiler.so (_ZNK3art19HInstructionBuilder25IsOutermostCompilingClassEt+732)
native: #18 pc 0000000000190810 /system/lib64/libart-compiler.so (_ZN3art19HInstructionBuilder16BuildNewInstanceEtj+852)
native: #19 pc 000000000018aa6c /system/lib64/libart-compiler.so (_ZN3art19HInstructionBuilder21ProcessDexInstructionERKNS_11InstructionEj+3436)
native: #20 pc 0000000000189534 /system/lib64/libart-compiler.so (_ZN3art19HInstructionBuilder5BuildEv+1600)
native: #21 pc 00000000001626b8 /system/lib64/libart-compiler.so (_ZN3art13HGraphBuilder10BuildGraphEv+136)
native: #22 pc 00000000001c113c /system/lib64/libart-compiler.so (_ZNK3art18OptimizingCompiler10TryCompileEPNS_14ArenaAllocatorEPNS_19CodeVectorAllocatorEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS5_NS_6HandleINS_6mirror8DexCacheEEEPNS_9ArtMethodEb+3280)
native: #23 pc 00000000001c35d8 /system/lib64/libart-compiler.so (_ZN3art18OptimizingCompiler10JitCompileEPNS_6ThreadEPNS_3jit12JitCodeCacheEPNS_9ArtMethodEb+472)
native: #24 pc 0000000000151bb8 /system/lib64/libart-compiler.so (_ZN3art3jit11JitCompiler13CompileMethodEPNS_6ThreadEPNS_9ArtMethodEb+284)
native: #25 pc 000000000030d0b8 /system/lib64/libart.so (_ZN3art3jit3Jit13CompileMethodEPNS_9ArtMethodEPNS_6ThreadEb+492)
native: #26 pc 000000000030efa4 /system/lib64/libart.so (_ZN3art3jit14JitCompileTask3RunEPNS_6ThreadE+656)
native: #27 pc 0000000000466dd4 /system/lib64/libart.so (_ZN3art16ThreadPoolWorker3RunEv+88)
native: #28 pc 000000000046671c /system/lib64/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+116)
native: #29 pc 000000000006863c /system/lib64/libc.so (_ZL15__pthread_startPv+208)
native: #30 pc 000000000001d9fc /system/lib64/libc.so (__start_thread+16)
(no managed stack frames)
"main" prio=5 tid=1 Native
| group="" sCount=1 dsCount=0 obj=0x749f7f58 self=0x7f7c495a00
| sysTid=23048 nice=0 cgrp=default sched=0/0 handle=0x7f8041da98
| state=S schedstat=( 1739699657 190601242 967 ) utm=160 stm=13 core=2 HZ=100
| stack=0x7ff8da1000-0x7ff8da3000 stackSize=8MB
| held mutexes=
kernel: __switch_to+0x8c/0x98
kernel: futex_wait_queue_me+0xd4/0x130
kernel: futex_wait+0xfc/0x210
kernel: do_futex+0xe0/0x920
kernel: SyS_futex+0x11c/0x1b0
kernel: cpu_switch_to+0x48/0x4c
native: #00 pc 000000000001bc6c /system/lib64/libc.so (syscall+28)
native: #01 pc 00000000000e70c8 /system/lib64/libart.so (_ZN3art17ConditionVariable16WaitHoldingLocksEPNS_6ThreadE+156)
native: #02 pc 00000000005486a0 /system/lib64/libart.so (_ZN3artL12GoToRunnableEPNS_6ThreadE+328)
native: #03 pc 0000000000548514 /system/lib64/libart.so (_ZN3art12JniMethodEndEjPNS_6ThreadE+28)
native: #04 pc 0000000000c2999c /system/framework/arm64/boot-framework.oat (Java_android_view_ThreadedRenderer_nSyncAndDrawFrame__J_3JI+184)
at android.view.ThreadedRenderer.nSyncAndDrawFrame(Native method)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:789)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2796)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2604)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2211)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
at android.view.Choreographer.doCallbacks(Choreographer.java:683)
at android.view.Choreographer.doFrame(Choreographer.java:619)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke!(Native method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
"Signal Catcher" prio=5 tid=3 WaitingInMainSignalCatcherLoop
| group="" sCount=1 dsCount=0 obj=0x12cb9160 self=0x7f721a0000
| sysTid=23055 nice=0 cgrp=default sched=0/0 handle=0x7f7ba06450
| state=S schedstat=( 3247347 22885365 73 ) utm=0 stm=0 core=3 HZ=100
| stack=0x7f7b90c000-0x7f7b90e000 stackSize=1005KB
| held mutexes=
kernel: __switch_to+0x8c/0x98
kernel: do_sigtimedwait+0xec/0x1dc
kernel: SyS_rt_sigtimedwait+0xd8/0x134
kernel: cpu_switch_to+0x48/0x4c
native: #00 pc 000000000006ac54 /system/lib64/libc.so (__rt_sigtimedwait+8)
native: #01 pc 0000000000024d00 /system/lib64/libc.so (sigwait+120)
native: #02 pc 000000000044093c /system/lib64/libart.so (_ZN3art9SignalSet4WaitEv+48)
native: #03 pc 00000000004403f8 /system/lib64/libart.so (_ZN3art13SignalCatcher13WaitForSignalEPNS_6ThreadERNS_9SignalSetE+232)
native: #04 pc 000000000043e98c /system/lib64/libart.so (_ZN3art13SignalCatcher3RunEPv+400)
native: #05 pc 000000000006863c /system/lib64/libc.so (_ZL15__pthread_startPv+208)
native: #06 pc 000000000001d9fc /system/lib64/libc.so (__start_thread+16)
(no managed stack frames)
"OkHttp http://172.31.6.143:8000/file/get/%7B%22ESN%22%3A%2235362607888370%22%2C%22Type%22%3A%22vPack%22%2C%22FolderName%22%3A%22Files%22%2C%22FileName%22%3A%22my_file2.zip%22%7D" prio=5 tid=28 Runnable
| group="" sCount=0 dsCount=0 obj=0x12e544c0 self=0x7f5fe83600
| sysTid=23376 nice=0 cgrp=default sched=0/0 handle=0x7f5dc8f450
| state=R schedstat=( 855558938 180884175 597 ) utm=80 stm=4 core=2 HZ=100
| stack=0x7f5db8d000-0x7f5db8f000 stackSize=1037KB
| held mutexes= "mutator lock"(shared held)
at java.util.Calendar.setFieldsComputed(Calendar.java:1596)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2257)
at java.util.Calendar.setTimeInMillis(Calendar.java:1122)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:622)
at java.util.Calendar.createCalendar(Calendar.java:1025)
at java.util.Calendar.getInstance(Calendar.java:1019)
at okio.AsyncTimeout$Watchdog.run(AsyncTimeout.java:286)
"AsyncTask #1" prio=5 tid=18 TimedWaiting
| group="" sCount=1 dsCount=0 obj=0x12cfa9d0 self=0x7f62100600
| sysTid=23353 nice=0 cgrp=default sched=0/0 handle=0x7f60d7f450
| state=S schedstat=( 3985209 2741668 39 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7f60c7d000-0x7f60c7f000 stackSize=1037KB
| held mutexes=
kernel: __switch_to+0x8c/0x98
kernel: futex_wait_queue_me+0xd4/0x130
kernel: futex_wait+0xfc/0x210
kernel: futex_wait_restart+0x54/0x80
kernel: sys_restart_syscall+0x18/0x24
kernel: cpu_switch_to+0x48/0x4c
native: #00 pc 000000000001bc70 /system/lib64/libc.so (syscall+32)
native: #01 pc 00000000000e7668 /system/lib64/libart.so (_ZN3art17ConditionVariable9TimedWaitEPNS_6ThreadEli+176)
native: #02 pc 000000000037947c /system/lib64/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadElibNS_11ThreadStateE+676)
native: #03 pc 0000000000000980 /system/framework/arm64/boot.oat (Java_java_lang_Object_wait__JI+140)
at java.lang.Object.wait!(Native method)
- waiting on <0x0eb4e8d7> (a java.lang.Object)
at java.lang.Thread.parkFor$(Thread.java:2127)
- locked <0x0eb4e8d7> (a java.lang.Object)
at sun.misc.Unsafe.park(Unsafe.java:325)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:201)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2077)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:438)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1057)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1118)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
"AsyncTask #2" prio=5 tid=19 TimedWaiting
| group="" sCount=1 dsCount=0 obj=0x12cfaa60 self=0x7f74c2e600
| sysTid=23354 nice=0 cgrp=default sched=0/0 handle=0x7f60c7a450
| state=S schedstat=( 3302761 2719690 40 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7f60b78000-0x7f60b7a000 stackSize=1037KB
| held mutexes=
kernel: __switch_to+0x8c/0x98
kernel: futex_wait_queue_me+0xd4/0x130
kernel: futex_wait+0xfc/0x210
kernel: futex_wait_restart+0x54/0x80
kernel: sys_restart_syscall+0x18/0x24
kernel: cpu_switch_to+0x48/0x4c
native: #00 pc 000000000001bc70 /system/lib64/libc.so (syscall+32)
native: #01 pc 00000000000e7668 /system/lib64/libart.so (_ZN3art17ConditionVariable9TimedWaitEPNS_6ThreadEli+176)
native: #02 pc 000000000037947c /system/lib64/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadElibNS_11ThreadStateE+676)
native: #03 pc 0000000000000980 /system/framework/arm64/boot.oat (Java_java_lang_Object_wait__JI+140)
at java.lang.Object.wait!(Native method)
- waiting on <0x0f42d5c4> (a java.lang.Object)
at java.lang.Thread.parkFor$(Thread.java:2127)
- locked <0x0f42d5c4> (a java.lang.Object)
at sun.misc.Unsafe.park(Unsafe.java:325)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:201)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2077)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:438)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1057)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1118)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
"hwuiTask1" prio=5 tid=20 Native
| group="" sCount=1 dsCount=0 obj=0x12d854c0 self=0x7f74d58a00
| sysTid=23355 nice=-2 cgrp=default sched=0/0 handle=0x7f60b55450
| state=S schedstat=( 1874432 2351405 40 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7f60a5b000-0x7f60a5d000 stackSize=1005KB
| held mutexes=
kernel: __switch_to+0x8c/0x98
kernel: futex_wait_queue_me+0xd4/0x130
kernel: futex_wait+0xfc/0x210
I'm having a very hard time debugging an Android ANR problem.
This is what I get in logcat:
I/art﹕ Thread[2,tid=29718,WaitingInMainSignalCatcherLoop,Thread*=0xaf40e400,peer=0x12c39080,"Signal Catcher"]: reacting to signal 3
Heres what I get in the traces.txt file
"Signal Catcher" daemon prio=5 tid=2 Runnable
| group="system" sCount=0 dsCount=0 obj=0x12c57080 self=0xaf40e400
| sysTid=29718 nice=0 cgrp=apps sched=0/0 handle=0xafb18d80
| state=R schedstat=( 32478966 17635623 73 ) utm=1 stm=2 core=1 HZ=100
| stack=0xb466d000-0xb466f000 stackSize=1012KB
| held mutexes= "thread list lock" "mutator lock"(exclusive held)
native: #00 pc 00004640 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
native: #01 pc 00002e8d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
native: #02 pc 002453c1 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
native: #03 pc 00229f47 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+146)
native: #04 pc 00232ddf /system/lib/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+142)
native: #05 pc 00218da7 /system/lib/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+66)
native: #06 pc 0021ed13 /system/lib/libart.so (art::SignalCatcher::HandleSigQuit()+774)
native: #07 pc 0021f3cb /system/lib/libart.so (art::SignalCatcher::Run(void*)+322)
native: #08 pc 000137bb /system/lib/libc.so (__pthread_start(void*)+30)
native: #09 pc 0001189b /system/lib/libc.so (__start_thread+6)
(no managed stack frames)
Does anyone know what can usually cause these sorts of errors? I can't pinpoint it to any particular line of code but it does seem to happen on starting the app sometimes.
Thanks