Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR - Input dispatching timed out #1675

Closed
SponsorAds opened this issue Feb 18, 2022 · 4 comments
Closed

ANR - Input dispatching timed out #1675

SponsorAds opened this issue Feb 18, 2022 · 4 comments
Labels

Comments

@SponsorAds
Copy link

SponsorAds commented Feb 18, 2022

One more for you, maybe you can get an idea what might be causing this ANR. This ANR is happening on multiple apps (similar codebase) thousands of times (we are at 6% ANR rate). Sadly I can't reproduce it myself at all.

We are not using any sound or video through AIR, but use distriqts ANE for that.

AIR 33.1.1.743

"main" prio=5 tid=1 Native
  #00  pc 000000000084d65c  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000084e378  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000083ffe8  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 00000000008403ac  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000083f0fc  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000083f77c  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000084d98c  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000073944c  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000000f44c  <anonymous> (???)
  at com.adobe.air.customHandler.callTimeoutFunction (Native method)
  at com.adobe.air.customHandler.handleMessage (customHandler.java:28)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:246)
  at android.app.ActivityThread.main (ActivityThread.java:8633)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Typ
"Jit thread pool worker thread 0" daemon prio=5 tid=7 Native
  #00  pc 0000000000086b8c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #00  pc 00000000001b092c  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
  #00  pc 00000000005d485c  /apex/com.android.art/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+120)
  #00  pc 00000000005d3b00  /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Run()+144)
  #00  pc 00000000005d35b0  /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+192)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"ReferenceQueueDaemon" daemon prio=5 tid=8 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.Object.wait (Object.java:568)
  at java.lang.Daemons$ReferenceQueueDaemon.runInternal (Daemons.java:217)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:923)
Typ
"FinalizerWatchdogDaemon" daemon prio=5 tid=9 Sleeping
  at java.lang.Thread.sleep (Native method)
  at java.lang.Thread.sleep (Thread.java:442)
  at java.lang.Thread.sleep (Thread.java:358)
  at java.lang.Daemons$FinalizerWatchdogDaemon.sleepForNanos (Daemons.java:390)
  at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization (Daemons.java:419)
  at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:325)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:923)
Typ
"FinalizerDaemon" daemon prio=5 tid=10 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:190)
  at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:211)
  at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:273)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:923)
Typ
"Binder:17254_1" prio=5 tid=11 Native
  #00  pc 00000000000d69d4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #00  pc 0000000000093664  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
  #00  pc 00000000000529e4  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+296)
  #00  pc 0000000000052c98  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #00  pc 00000000000538d4  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+68)
  #00  pc 000000000007b554  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+388)
  #00  pc 00000000000154cc  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
  #00  pc 00000000000a5648  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
  #00  pc 0000000000014d90  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"Binder:17254_2" prio=5 tid=12 Native
  #00  pc 00000000000d69d4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #00  pc 0000000000093664  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
  #00  pc 00000000000529e4  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+296)
  #00  pc 0000000000052c98  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #00  pc 00000000000538d4  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+68)
  #00  pc 000000000007b554  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+388)
  #00  pc 00000000000154cc  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
  #00  pc 00000000000a5648  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
  #00  pc 0000000000014d90  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"Profile Saver" daemon prio=5 tid=14 Native
  #00  pc 0000000000086b8c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #00  pc 00000000001b092c  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
  #00  pc 000000000035cbf0  /apex/com.android.art/lib64/libart.so (art::ProfileSaver::Run()+484)
  #00  pc 0000000000361a08  /apex/com.android.art/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+180)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"Binder:17254_3" prio=5 tid=16 Native
  #00  pc 00000000000d69d4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #00  pc 0000000000093664  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
  #00  pc 00000000000529e4  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+296)
  #00  pc 0000000000052c98  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #00  pc 00000000000538d4  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+68)
  #00  pc 000000000007b554  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+388)
  #00  pc 00000000000154cc  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
  #00  pc 00000000000a5648  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
  #00  pc 0000000000014d90  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"AsyncTask #1" prio=5 tid=17 Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill (SynchronousQueue.java:459)
  at java.util.concurrent.SynchronousQueue$TransferStack.transfer (SynchronousQueue.java:362)
  at java.util.concurrent.SynchronousQueue.take (SynchronousQueue.java:920)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"queued-work-looper" prio=5 tid=19 Native
  #00  pc 00000000000d7998  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #00  pc 0000000000019acc  /system/lib64/libutils.so (android::Looper::pollInner(int)+184)
  #00  pc 00000000000199ac  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112)
  #00  pc 000000000011840c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:335)
  at android.os.Looper.loop (Looper.java:206)
  at android.os.HandlerThread.run (HandlerThread.java:67)
Typ
"OkHttp ConnectionPool" daemon prio=5 tid=23 TimedWaiting
  at java.lang.Object.wait (Native method)
  at com.android.okhttp.ConnectionPool$1.run (ConnectionPool.java:106)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"pool-8-thread-1" prio=5 tid=26 TimedWaiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1132)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:849)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"pool-9-thread-1" prio=5 tid=27 TimedWaiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at com.google.android.gms.common.BlockingServiceConnection.getServiceWithTimeout
  at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza (unavailable)
  at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza (unavailable)
  at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo (unavailable)
  at java.lang.reflect.Method.invoke (Native method)
  at com.facebook.internal.Utility.invokeMethodQuietly (Utility.kt:904)
  at com.facebook.internal.AttributionIdentifiers$Companion.getAndroidIdViaReflection (AttributionIdentifiers.kt:108)
  at com.facebook.internal.AttributionIdentifiers$Companion.getAndroidId (AttributionIdentifiers.kt:86)
  at com.facebook.internal.AttributionIdentifiers$Companion.getAttributionIdentifiers (AttributionIdentifiers.kt:167)
  at com.facebook.internal.AttributionIdentifiers.getAttributionIdentifiers (AttributionIdentifiers.kt)
  at com.facebook.appevents.AppEventCollection.getSessionEventsState (AppEventCollection.java:82)
  at com.facebook.appevents.AppEventCollection.addPersistedEvents (AppEventCollection.java:42)
  at com.facebook.appevents.AppEventQueue.flushAndWait (AppEventQueue.java:123)
  at com.facebook.appevents.AppEventQueue$1.run (AppEventQueue.java:67)
  at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:462)
  at java.util.concurrent.FutureTask.run (FutureTask.java:266)
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"GmsDynamite" prio=5 tid=28 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.Object.wait (Object.java:568)
  at cv.run (com.google.android.gms.dynamite_dynamiteloader@214815082@21.48.15 (150406-0):2)
Typ
"pool-12-thread-1" prio=5 tid=29 Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2067)
  at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"RenderThread" daemon prio=7 tid=31 Native
  #00  pc 00000000000d7998  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #00  pc 0000000000019acc  /system/lib64/libutils.so (android::Looper::pollInner(int)+184)
  #00  pc 00000000000199ac  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112)
  #00  pc 000000000039bf54  /system/lib64/libhwui.so (android::uirenderer::ThreadBase::waitForWork()+132)
  #00  pc 00000000003bd57c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+80)
  #00  pc 00000000000154cc  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
  #00  pc 0000000000014d90  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"pool-12-thread-2" prio=5 tid=32 Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2067)
  at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"pool-7-thread-1" prio=5 tid=33 TimedWaiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1132)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:849)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Typ
"Thread-7" prio=10 tid=37 Native
  #00  pc 0000000000086b8c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #00  pc 000000000008a938  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
  #00  pc 00000000000eab90  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+60)
  #00  pc 0000000000281230  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000037673c  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 0000000000280f60  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 0000000000280fd0  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 0000000000280d04  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"Thread-9" prio=10 tid=38 Native
  #00  pc 0000000000086b8c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #00  pc 000000000008a938  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
  #00  pc 00000000000eab90  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+60)
  #00  pc 0000000000281230  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 000000000037673c  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 0000000000280f60  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 0000000000280fd0  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 0000000000280d04  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"Signal Catcher" daemon prio=10 tid=3 Runnable
  #00  pc 00000000004a7ee8  /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
  #00  pc 00000000005b59dc  /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+376)
  #00  pc 00000000005d2b14  /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+924)
  #00  pc 00000000005cca54  /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+528)
  #00  pc 00000000005cbc20  /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+1920)
  #00  pc 00000000005cb0c0  /apex/com.android.art/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+776)
  #00  pc 0000000000576da8  /apex/com.android.art/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+196)
  #00  pc 000000000058c374  /apex/com.android.art/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1396)
  #00  pc 000000000058b32c  /apex/com.android.art/lib64/libart.so (art::SignalCatcher::Run(void*)+384)
  #00  pc 00000000000eb7a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000008bc8c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Typ
"HeapTaskDaemon" daemon prio=5 tid=13 WaitingForTaskProcessor
  #00  pc 0000000000086b8c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #00  pc 00000000001b092c  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
  #00  pc 00000000002e5f28  /apex/com.android.art/lib64/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+536)
  #00  pc 00000000002e6858  /apex/com.android.art/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+92)
  at dalvik.system.VMRuntime.runHeapTasks (Native method)
  at java.lang.Daemons$HeapTaskDaemon.runInternal (Daemons.java:531)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:923)
@SponsorAds SponsorAds added the Bug label Feb 18, 2022
@ajwfrost
Copy link
Collaborator

Hi
This one is fairly clear:
from

  #00  pc 000000000083f0fc  /data/app/~~4Dlag7M4AySAueHoa1zZ8Q==/-txv0E7dXLQzxQdmhn_lBXg==/split_config.arm64_v8a.apk!libCore.so (???)

we find

  83f0fc:       94000442        bl      840204 <_ZN4MMgc2GC5SweepEv>

So basically it's doing the "sweep" part of garbage collection. This means it's going through and cleaning up objects that are no longer used, executing all destructors, and generally tidying up. It can definitely cause glitches/stutters because it runs synchronously (the "mark" part of the GC process runs in small segments a little at a time, but "sweep" happens in one go..)

To try to minimize these:
a) try to ensure everything is kept reference counted. So e.g. avoid circular loops of objects that are referencing each other but are no longer used by the application (e.g. event listeners!).
b) try to trigger the sweep in advance when there's a "quiet" bit of the app, via https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/System.html#pauseForGCIfCollectionImminent()

You may be able to use Scout to spot things that can be improved: even if you don't see any ANRs, you may see that there are peaks in the frame times caused by garbage collection: if you then add in the memory profiling then you can see what sort of objects are being destroyed during this frame and can hopefully then work out a way to minimise that. Object pooling etc can also work sometimes... it depends a lot on what your application is doing and how it's doing it!

thanks

@SponsorAds
Copy link
Author

I would love to debug this in more detail, but I am not aware of a well made memory profiler.
The memory tool that came with Flash Builder was great. It showed every object allocation and deallocation, and even showed the objects class names. Very easy to spot any possible memory leaks or disposes not being triggered, right to the class causing it.

With Scout you get 70%-90% "onEnterFrame" allocations, you can't see allocations and deallocation together. You only see a percentage, not a number of allocations (which makes it extremely easy to compare on e.g. a page transition if something did no deallocate). Unless I missed something with Scout, that makes it quite impossible to pinpoint any objects that might cause leaks.

@ajwfrost
Copy link
Collaborator

I think with Scout you can see the number of allocations and the memory they've used, but yes I've tended to select a bunch of allocations and copy them into Excel, and then a bunch of deallocations and copy them as well, and then try to work out the difference there to see what's causing the most problem.

Would be nice if there was better object tracking here: the capabilities that the Flash Builder profiler had should still be built into the runtime so I don't know whether that tool itself is separate .. will dig out a machine with it on and have a look!

@SponsorAds
Copy link
Author

Would be surely nice to have, it helped me a lot years ago in my early AIR times.

I managed to get our ANR rate down to about 1.6%, with tendency towards 0.9%.
The biggest issue was a very simple animation that had a big xml garbage collection that also somehow leaked over time. Exactly this addition was done by a freelancer so it wasn't on my radar. I pooled it and issue is gone.

I'm currently experimenting with staggering content fetching on app start as every sqlite query causes String gc actions and we need to load quite some content on app start. I hope this will get ANR rates down to <0.4%.

Sadly this did not affect our 5% crash rate (nearly all Signal 11). But I'll open another issue for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants