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

executing service com.onesignal.SyncJobService ANR #1487

Closed
connyduck opened this issue Nov 12, 2021 · 11 comments
Closed

executing service com.onesignal.SyncJobService ANR #1487

connyduck opened this issue Nov 12, 2021 · 11 comments

Comments

@connyduck
Copy link

connyduck commented Nov 12, 2021

Description:

We see a lot of ANRs reported through Google Play Console. Most of them do not have a stacktrace attached but the device information is very clear: >90% occur on Huawei devices running 8.
From the few stacktraces it looks like it could maybe be a bug in Google Cloud messaging?

Environment
OneSignal Gradle plugin 0.13.4
OneSignal 4.6.0
minSdk 21
targetSdk 30

Steps to Reproduce Issue:

Unfortunately I cannot reproduce this on any of my devices

Anything else:

stacktrace from a Samsung Galaxy A41 running Android 11
"main" prio=5 tid=1 Waiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt (AbstractQueuedSynchronizer.java:868)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued (AbstractQueuedSynchronizer.java:902)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire (AbstractQueuedSynchronizer.java:1227)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock (ReentrantLock.java:216)
at java.util.concurrent.locks.ReentrantLock.lock (ReentrantLock.java:294)
at com.google.android.gms.common.api.internal.zaau.resume
at com.google.android.gms.common.api.internal.zaau.zaa
at com.google.android.gms.common.api.internal.zaba.zaq
at com.google.android.gms.common.api.internal.zabo.onReceive
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args (LoadedApk.java:1666)
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run (lambda)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8595)
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)

Please let me know if you need more information

@RosHartigan
Copy link

We are also having this issue - many ANRs through console, and many complaints from users. Although we released the latest version of the app in July, this issue just cropped up in the last two weeks when we used OneSignal to announce a new version.

I can't replicate it, but our customer support person has been able to. It is somehow related to AssetPack management (our app has about 2 GB of associated data).

I believe that the AssetPack threads are locking up as a result of the notification, and returning incorrect information to the app - the end result is our app can't get any information about the installed AssetPacks and believes new AssetPacks should be downloaded (this is false). Since it is waiting for new AssetPacks to download, the app hangs.

Environment

  • OneSignal 4.2.0
  • AGP 4.0.1
  • Gradle 6.9
  • minSdkVersion 19
  • targetSdkVersion 29

Device Information

  • Android 8, 9, 10, 11
  • Many different kinds of devices, including Samsung and Google devices

Stack Information
The stack information is not particularly useful, but here is one:

Type "main" prio=5 tid=1 Waiting at sun.misc.Unsafe.park (Native method) at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt (AbstractQueuedSynchronizer.java:868) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued (AbstractQueuedSynchronizer.java:902) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire (AbstractQueuedSynchronizer.java:1227) at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock (ReentrantLock.java:216) at java.util.concurrent.locks.ReentrantLock.lock (ReentrantLock.java:294) at com.google.android.gms.common.api.internal.zaaz.zah at com.google.android.gms.common.api.internal.zaay.zaa at com.google.android.gms.common.api.internal.zabr.onReceive at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args (LoadedApk.java:1550) at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run (lambda) at android.os.Handler.handleCallback (Handler.java:883) at android.os.Handler.dispatchMessage (Handler.java:100) at android.os.Looper.loop (Looper.java:214) at android.app.ActivityThread.main (ActivityThread.java:7397) at java.lang.reflect.Method.invoke (Native method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:935)

Type "Jit thread pool worker thread 0" daemon prio=5 tid=2 Native #00 pc 000000000008033c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) #00 pc 000000000014c1f4 /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148) #00 pc 00000000005157c0 /apex/com.android.runtime/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+256) #00 pc 0000000000514b4c /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Run()+144) #00 pc 000000000051460c /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+148) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "ReferenceQueueDaemon" daemon prio=5 tid=9 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:215) at java.lang.Daemons$Daemon.run (Daemons.java:137) at java.lang.Thread.run (Thread.java:919)

Type "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:271) at java.lang.Daemons$Daemon.run (Daemons.java:137) at java.lang.Thread.run (Thread.java:919)

Type "FinalizerWatchdogDaemon" daemon prio=5 tid=11 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$FinalizerWatchdogDaemon.sleepUntilNeeded (Daemons.java:339) at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:319) at java.lang.Daemons$Daemon.run (Daemons.java:137) at java.lang.Thread.run (Thread.java:919)

Type "Binder:31712_1" prio=5 tid=12 Native #00 pc 00000000000d1094 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) #00 pc 000000000008b6b0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132) #00 pc 0000000000058d14 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244) #00 pc 0000000000058ef0 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) #00 pc 00000000000596c8 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+64) #00 pc 000000000007f7fc /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24) #00 pc 0000000000013654 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328) #00 pc 00000000000c2b8c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "Binder:31712_2" prio=5 tid=13 Native #00 pc 00000000000d1094 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) #00 pc 000000000008b6b0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132) #00 pc 0000000000058d14 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244) #00 pc 0000000000058ef0 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) #00 pc 00000000000596f4 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+108) #00 pc 000000000007f7fc /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24) #00 pc 0000000000013654 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328) #00 pc 00000000000c2b8c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "Binder:31712_3" prio=5 tid=14 Native #00 pc 00000000000d1094 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) #00 pc 000000000008b6b0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132) #00 pc 0000000000058d14 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244) #00 pc 0000000000058ef0 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) #00 pc 00000000000596f4 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+108) #00 pc 000000000007f7fc /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24) #00 pc 0000000000013654 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328) #00 pc 00000000000c2b8c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "Binder:31712_4" prio=5 tid=15 Native #00 pc 00000000000d1094 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) #00 pc 000000000008b6b0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132) #00 pc 0000000000058d14 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244) #00 pc 0000000000058ef0 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) #00 pc 00000000000596f4 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+108) #00 pc 000000000007f7fc /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24) #00 pc 0000000000013654 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328) #00 pc 00000000000c2b8c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "Profile Saver" daemon prio=5 tid=16 Native #00 pc 000000000008033c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) #00 pc 000000000014c1f4 /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148) #00 pc 0000000000347c1c /apex/com.android.runtime/lib64/libart.so (art::ProfileSaver::Run()+412) #00 pc 000000000034baf4 /apex/com.android.runtime/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+88) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "pool-2-thread-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.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:919)

Type "pool-2-thread-2" prio=5 tid=18 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:919)

Type "AssetPackBackgroundExecutor" prio=5 tid=19 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:919)

Type "AssetPackService" prio=5 tid=20 Native #00 pc 00000000000d0f58 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8) #00 pc 0000000000018120 /system/lib64/libutils.so (android::Looper::pollInner(int)+144) #00 pc 0000000000017ff0 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) #00 pc 000000000013b84c /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:336) at android.os.Looper.loop (Looper.java:174) at android.os.HandlerThread.run (HandlerThread.java:67)

Type "OSH_WritePrefs" prio=5 tid=21 Native #00 pc 00000000000d0f58 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8) #00 pc 0000000000018120 /system/lib64/libutils.so (android::Looper::pollInner(int)+144) #00 pc 0000000000017ff0 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) #00 pc 000000000013b84c /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:336) at android.os.Looper.loop (Looper.java:174) at android.os.HandlerThread.run (HandlerThread.java:67)

Type "pool-10-thread-1" prio=5 tid=24 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:919)

Type "OSH_NetworkHandlerThread" prio=5 tid=25 Native #00 pc 00000000000d0f58 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8) #00 pc 0000000000018120 /system/lib64/libutils.so (android::Looper::pollInner(int)+144) #00 pc 0000000000017ff0 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) #00 pc 000000000013b84c /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:336) at android.os.Looper.loop (Looper.java:174) at android.os.HandlerThread.run (HandlerThread.java:67)

Type "ExecutorQueue Global Timer" daemon prio=5 tid=26 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.util.TimerThread.mainLoop (Timer.java:533) at java.util.TimerThread.run (Timer.java:512)

Type "queued-work-looper" prio=10 tid=30 Native #00 pc 00000000000d0f58 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8) #00 pc 0000000000018120 /system/lib64/libutils.so (android::Looper::pollInner(int)+144) #00 pc 0000000000017ff0 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) #00 pc 000000000013b84c /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:336) at android.os.Looper.loop (Looper.java:174) at android.os.HandlerThread.run (HandlerThread.java:67)

Type "FileObserver" prio=10 tid=34 Native #00 pc 00000000000d1e34 /apex/com.android.runtime/lib64/bionic/libc.so (read+4) #00 pc 00000000001aa8f4 /system/lib64/libandroid_runtime.so (android::android_os_fileobserver_observe(_JNIEnv*, _jobject*, int)+260) at android.os.FileObserver$ObserverThread.observe (Native method) at android.os.FileObserver$ObserverThread.run (FileObserver.java:113)

Type "pool-5-thread-1" prio=5 tid=35 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:919)

Type "OS_SYNCSRV_BG_SYNC" prio=5 tid=36 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.ArrayBlockingQueue.take (ArrayBlockingQueue.java:387) at com.onesignal.OSSyncService$SyncRunnable.run (OSSyncService.java:172) at java.lang.Thread.run (Thread.java:919)

Type "OS_GMS_LOCATION_FALLBACK" prio=5 tid=38 Waiting at sun.misc.Unsafe.park (Native method) at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt (AbstractQueuedSynchronizer.java:868) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued (AbstractQueuedSynchronizer.java:902) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire (AbstractQueuedSynchronizer.java:1227) at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock (ReentrantLock.java:216) at java.util.concurrent.locks.ReentrantLock.lock (ReentrantLock.java:294) at com.google.android.gms.common.api.internal.zaaz.disconnect at java.lang.reflect.Method.invoke (Native method) at com.onesignal.GoogleApiClientCompatProxy.disconnect (GoogleApiClientCompatProxy.java:54) at com.onesignal.GMSLocationController.fireFailedComplete (GMSLocationController.java:101) at com.onesignal.LocationController.fireFailedComplete (LocationController.java:350) at com.onesignal.GMSLocationController$1.run (GMSLocationController.java:88) at java.lang.Thread.run (Thread.java:919)

Type "OSH_LocationHandlerThread" prio=5 tid=39 Blocked at com.onesignal.GMSLocationController.fireFailedComplete (GMSLocationController.java:99) at com.onesignal.GMSLocationController$GoogleApiClientListener.onConnectionSuspended (GMSLocationController.java:148) at com.google.android.gms.common.internal.zak.zad at com.google.android.gms.common.api.internal.zaaz.zac at com.google.android.gms.common.api.internal.zaag.zah at com.google.android.gms.common.api.internal.zabd.onConnectionSuspended at com.google.android.gms.common.api.internal.zas.onConnectionSuspended at com.google.android.gms.common.internal.zah.onConnectionSuspended at com.google.android.gms.common.internal.zzb.handleMessage at android.os.Handler.dispatchMessage (Handler.java:107) at android.os.Looper.loop (Looper.java:214) at android.os.HandlerThread.run (HandlerThread.java:67)

Type "ConnectivityThread" prio=10 tid=44 Native #00 pc 00000000000d0f58 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8) #00 pc 0000000000018120 /system/lib64/libutils.so (android::Looper::pollInner(int)+144) #00 pc 0000000000017ff0 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) #00 pc 000000000013b84c /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:336) at android.os.Looper.loop (Looper.java:174) at android.os.HandlerThread.run (HandlerThread.java:67)

Type "Okio Watchdog" daemon prio=5 tid=50 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 com.android.okhttp.okio.AsyncTimeout.awaitTimeout (AsyncTimeout.java:313) at com.android.okhttp.okio.AsyncTimeout.access$000 (AsyncTimeout.java:42) at com.android.okhttp.okio.AsyncTimeout$Watchdog.run (AsyncTimeout.java:288)

Type "Firebase-Messaging-Init" prio=5 tid=51 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.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120) 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 com.google.android.gms.common.util.concurrent.zza.run at java.lang.Thread.run (Thread.java:919)

Type "Firebase-Messaging-Topics-Io" prio=5 tid=53 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.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120) 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 com.google.android.gms.common.util.concurrent.zza.run at java.lang.Thread.run (Thread.java:919)

Type "Signal Catcher" daemon prio=5 tid=7 Runnable #00 pc 0000000000411c34 /apex/com.android.runtime/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 00000000004f9390 /apex/com.android.runtime/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+512) #00 pc 0000000000513d60 /apex/com.android.runtime/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+828) #00 pc 000000000050cb84 /apex/com.android.runtime/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+456) #00 pc 000000000050c068 /apex/com.android.runtime/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+1964) #00 pc 000000000050b748 /apex/com.android.runtime/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)+844) #00 pc 00000000004c6ac4 /apex/com.android.runtime/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)+200) #00 pc 00000000004daefc /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1352) #00 pc 00000000004d9fa8 /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::Run(void*)+252) #00 pc 00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) #00 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Type "HeapTaskDaemon" daemon prio=5 tid=8 WaitingForTaskProcessor #00 pc 000000000008033c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28) #00 pc 000000000014c1f4 /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148) #00 pc 00000000002901c8 /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+444) #00 pc 0000000000290a54 /apex/com.android.runtime/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:523) at java.lang.Daemons$Daemon.run (Daemons.java:137) at java.lang.Thread.run (Thread.java:919)

@jkasten2
Copy link
Member

@connyduck @RosHartigan Thanks for the full stack traces. They both contain com.google.android.gms.common.api.internal on the main thread. It isn't clear what exactly they are waiting on but that namespace is part of the com.google.android.gms:play-services-base library.
Could you let us know the exact version you are using? This normally isn't directly added in your project so you can run ./gradlew app:dependencies to get this and search for play-services-base. You can also try updating this library directly by adding it to your project but you may have to update other Google libraries to get the a newer version of play-services-base

@connyduck
Copy link
Author

We have com.google.android.gms:play-services-base:17.6.0, which is the newest version . But yes, it could also be a bug in there and not in OneSignal.

@RosHartigan
Copy link

We have com.google.android.gms:play-services-base:17.6.0 as well.

Since I suspect the asset-pack notifications/service is causing a conflict: com.google.android.play:core:1.10.0 is the version of play-core.

@JurajKuliska
Copy link

Just noticed this issue being reported in our bug reporting console. Were you able to identify what is causing this and mostly how to avoid this? I'm also using the latest play-services-base:17.6.0 and the latest version of OneSignal:4.6.3

Unfortunately I'm not able to reproduce it and don't even know how the issue manifests itself - if the app freezes for a long time and if it occurs multiple times during one run of the app

@jkasten2
Copy link
Member

jkasten2 commented Jan 4, 2022

@JurajKuliska @connyduck Could you share an ANR report with the stacktrace from all threads like #1487 (comment) above? This way we can check if this is due to any activity OneSignal is running on other threads.

@JurajKuliska
Copy link

@jkasten2 sure these are two different reports I was able to pull out from there... hope it helps

Crash#123.txt
Crash#122.txt

@jkasten2
Copy link
Member

@JurajKuliska Thanks for the logs. I see your app process was started by com.onesignal.FocusDelaySyncJobService noted by this line:

ANR executing service xx.myapp.com/com.onesignal.FocusDelaySyncJobService

however there isn't any OneSignal code running when the ANR happened.

Your crash 123.txt looks like it happens when your app is resumed and I see com.microsoft.appcenter in the stacktrace.
Your crash 122.txt has android.view.Choreographer in it so it is possible there was an issue loading a complex animation along with something else using a lot of CPU possibly.

Both your reports ANR reports have FocusDelaySyncJobService as the way the process started. We fix an issue where FocusDelaySyncJobService was started more often then it should have in PR #1515 and was released in 4.6.6. After upgrading your app to this version or newer most of the ANR reports that showed com.onesignal.FocusDelaySyncJobService as service that started your app should correctly show how the app was started.

@jkasten2
Copy link
Member

jkasten2 commented May 5, 2022

@JurajKuliska Did the above help with your issue? Either way let us know with any details you have. Thanks.

@JurajKuliska
Copy link

@jkasten2 thanks for getting back to this. I've checked after a longer time and the issue hasn't appeared again in the last two months and even then it was on the older version of the sdk so I would consider this to be resolved (at least for us)

@jkasten2
Copy link
Member

jkasten2 commented May 7, 2022

@JurajKuliska Thanks for letting us know, and good to hear it seems to be fixed for you.

Since a number of things have changed since the the original post I am closing this issue. However if the exact same ANR is happening feel free to reply here. However if the ANR is different in anyway please make a new issue, but feel free to refer to this one if you think it is related.

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

No branches or pull requests

4 participants