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

Android Not Responding with [split_config.arm64_v8a.apk!libmonosgen-2.0.so] mono_threads_attach_coop #111485

Open
SejalH96 opened this issue Jan 16, 2025 · 33 comments
Labels
area-VM-meta-mono needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration
Milestone

Comments

@SejalH96
Copy link

SejalH96 commented Jan 16, 2025

Description

split_config.arm64_v8a.apk!libmonosgen-2.0.so

Reproduction Steps

Random Behaviour and it is observed in release build frequently as many issues reported in play console
Observed after migrating xamarin native application to .Net for Android

Expected behavior

Behaviour of application should remain same as it is before migration

Actual behavior

Random behaviour observed. Some time app got crashed and some time ANR generated while there are no changes in the code after migration

Regression?

Observed after migrating xamarin native application to .Net for Android
We have tried .Net 8 and .Net 9 both and issue observed in both version
Xamarin project does not have this issues.

Known Workarounds

No response

Configuration

No response

Other information

Here is the stack trace reported in play console

"id.satatyasight" tid=19235 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x0000000000094ff0  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
  #02  pc 0x00000000000a36e0  /apex/com.android.runtime/lib64/bionic/libc.so (sem_wait+112)
  #03  pc 0x00000000001ee8d0  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #04  pc 0x00000000001f48d0  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #05  pc 0x000000000027725c  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #06  pc 0x0000000000277290  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_threads_attach_coop+24) (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #07  pc 0x0000000000009fa0 

"Signal Catcher" tid=19238 Native
  #00  pc 0x00000000000ed7e8  /apex/com.android.runtime/lib64/bionic/libc.so (__rt_sigtimedwait+8)
  #01  pc 0x00000000000a4840  /apex/com.android.runtime/lib64/bionic/libc.so (sigwait64+96)
  #02  pc 0x00000000006750bc  /apex/com.android.art/lib64/libart.so (art::SignalCatcher::Run(void*)+304)
  #03  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #04  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"perfetto_hprof_" tid=19239 Native
  #00  pc 0x00000000000ecae4  /apex/com.android.runtime/lib64/bionic/libc.so (read+4)
  #01  pc 0x000000000002b9c0  /apex/com.android.art/lib64/libperfetto_hprof.so (void* std::__1::__thread_proxy[abi:nn180000]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, ArtPlugin_Initialize::$_7> >(void*)+308)
  #02  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #03  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Jit thread pool" tid=19240 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000022a220  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+136)
  #02  pc 0x000000000065940c  /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Run()+208)
  #03  pc 0x0000000000675c4c  /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+164)
  #04  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #05  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"HeapTaskDaemon" tid=19241 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000022a220  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+136)
  #02  pc 0x0000000000302e00  /apex/com.android.art/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+912)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000694f28  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$HeapTaskDaemon.runInternal+184)
  #05  pc 0x000000000066bfd4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$Daemon.run+116)
  #06  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #07  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #08  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #09  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #10  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #11  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #12  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #13  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"ReferenceQueueD" tid=19242 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000022a220  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+136)
  #02  pc 0x000000000042df7c  /apex/com.android.art/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+7244)
  #03  pc 0x00000000003832a8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+88)
  #04  pc 0x00000000006950d0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$ReferenceQueueDaemon.runInternal+400)
  #05  pc 0x000000000066bfd4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$Daemon.run+116)
  #06  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #07  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #08  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #09  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #10  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #11  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #12  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #13  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"FinalizerDaemon" tid=19243 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000022a220  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+136)
  #02  pc 0x000000000042df7c  /apex/com.android.art/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+7244)
  #03  pc 0x00000000003832a8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+88)
  #04  pc 0x000000000044065c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.ref.ReferenceQueue.remove+268)
  #05  pc 0x0000000000440538  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.ref.ReferenceQueue.remove+40)
  #06  pc 0x0000000000693cf8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$FinalizerDaemon.runInternal+408)
  #07  pc 0x000000000066bfd4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$Daemon.run+116)
  #08  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #09  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #10  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #11  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #12  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #13  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #14  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #15  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"FinalizerWatchd" tid=19244 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000022a220  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+136)
  #02  pc 0x000000000042df7c  /apex/com.android.art/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+7244)
  #03  pc 0x00000000003832a8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+88)
  #04  pc 0x0000000000694ce4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$FinalizerWatchdogDaemon.runInternal+100)
  #05  pc 0x000000000066bfd4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Daemons$Daemon.run+116)
  #06  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #07  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #08  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #09  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #10  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #11  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #12  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #13  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"binder:19235_1" tid=19248 Native
  #00  pc 0x00000000000ece08  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+8)
  #01  pc 0x000000000009ed0c  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
  #02  pc 0x000000000005f4d8  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+280)
  #03  pc 0x000000000005f838  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x0000000000060210  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+112)
  #05  pc 0x000000000006a260  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+128)
  #06  pc 0x000000000001430c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
  #07  pc 0x00000000000ed94c  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #09  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"binder:19235_2" tid=19249 Native
  #00  pc 0x00000000000ece08  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+8)
  #01  pc 0x000000000009ed0c  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
  #02  pc 0x000000000005f4d8  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+280)
  #03  pc 0x000000000005f838  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x0000000000060210  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+112)
  #05  pc 0x000000000006a260  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+128)
  #06  pc 0x000000000001430c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
  #07  pc 0x00000000000ed94c  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #09  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"binder:19235_3" tid=19252 Native
  #00  pc 0x00000000000ece08  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+8)
  #01  pc 0x000000000009ed0c  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
  #02  pc 0x000000000005f4d8  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+280)
  #03  pc 0x000000000005f838  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x0000000000060210  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+112)
  #05  pc 0x000000000006a260  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+128)
  #06  pc 0x000000000001430c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
  #07  pc 0x00000000000ed94c  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #09  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Profile Saver" tid=19254 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000022a220  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+136)
  #02  pc 0x0000000000557040  /apex/com.android.art/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+1164)
  #03  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #04  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"SGen worker" tid=19257 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x0000000000094ff0  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
  #02  pc 0x0000000000101128  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+72)
  #03  pc 0x00000000002fb1a8  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #04  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #05  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Finalizer" tid=19259 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x0000000000094ff0  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
  #02  pc 0x0000000000103400  /apex/com.android.runtime/lib64/bionic/libc.so (NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+368)
  #03  pc 0x00000000002c2d60  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #04  pc 0x00000000002c2be4  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #05  pc 0x000000000029b7e4  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #06  pc 0x00000000002779ac  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
  #07  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #08  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Firebase-Messag" tid=19262 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063d3f4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take+132)
  #06  pc 0x000000000063d354  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat ([DEDUPED]+36)
  #07  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #08  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #09  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #10  pc 0x00000000000afa3c  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.android.gms.common.util.concurrent.zza.run+76)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Firebase-Messag" tid=19263 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063d3f4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take+132)
  #06  pc 0x000000000063d354  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat ([DEDUPED]+36)
  #07  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #08  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #09  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #10  pc 0x00000000000afa3c  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.android.gms.common.util.concurrent.zza.run+76)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Firebase Backgr" tid=19264 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063a3b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.LinkedBlockingQueue.take+120)
  #06  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #07  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #08  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #09  pc 0x000000000011bfa0  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$com-google-firebase-concurrent-CustomThreadFactory+240)
  #10  pc 0x000000000011be14  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.firebase.concurrent.CustomThreadFactory$$ExternalSyntheticLambda0.run+52)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"FirebaseInstanc" tid=19268 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063d3f4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take+132)
  #06  pc 0x000000000063d354  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat ([DEDUPED]+36)
  #07  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #08  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #09  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #10  pc 0x00000000000afa3c  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.android.gms.common.util.concurrent.zza.run+76)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"queued-work-loo" tid=19269 Native
  #00  pc 0x00000000000eddc8  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #01  pc 0x0000000000018a4c  /system/lib64/libutils.so (android::Looper::pollInner(int)+188)
  #02  pc 0x000000000001892c  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+124)
  #03  pc 0x000000000018b10c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
  #04  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #05  pc 0x0000000000a67028  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.MessageQueue.next+280)
  #06  pc 0x0000000000a63f78  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loopOnce+88)
  #07  pc 0x0000000000a63e84  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loop+916)
  #08  pc 0x0000000000a62d58  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.HandlerThread.run+1000)
  #09  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #10  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #11  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #12  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #13  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #14  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #15  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Firebase Backgr" tid=19271 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063a3b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.LinkedBlockingQueue.take+120)
  #06  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #07  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #08  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #09  pc 0x000000000011bfa0  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$com-google-firebase-concurrent-CustomThreadFactory+240)
  #10  pc 0x000000000011be14  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.firebase.concurrent.CustomThreadFactory$$ExternalSyntheticLambda0.run+52)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Firebase Backgr" tid=19272 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063a3b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.LinkedBlockingQueue.take+120)
  #06  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #07  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #08  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #09  pc 0x000000000011bfa0  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$com-google-firebase-concurrent-CustomThreadFactory+240)
  #10  pc 0x000000000011be14  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.firebase.concurrent.CustomThreadFactory$$ExternalSyntheticLambda0.run+52)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"MessengerIpcCli" tid=19274 Native
  #00  pc 0x000000000009013c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000004315d0  /apex/com.android.art/lib64/libart.so (art::Thread::Park(bool, long)+668)
  #02  pc 0x0000000000431024  /apex/com.android.art/lib64/libart.so (art::Unsafe_park(_JNIEnv*, _jobject*, unsigned char, long) (.__uniq.319429422067363160645159987129209045680)+164)
  #03  pc 0x00000000003833c0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
  #04  pc 0x0000000000535fa0  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await+880)
  #05  pc 0x000000000063d3f4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take+132)
  #06  pc 0x000000000063d354  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat ([DEDUPED]+36)
  #07  pc 0x0000000000607348  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.getTask+472)
  #08  pc 0x0000000000608730  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+384)
  #09  pc 0x00000000006061b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+56)
  #10  pc 0x00000000000afa3c  /data/app/~~oUTncEOHQ_iuVpKFjkffow==/com.matrixcomsec.android.satatyasight-9hTeXRRMe6iW_TCYc4G4TQ==/oat/arm64/base.odex (com.google.android.gms.common.util.concurrent.zza.run+76)
  #11  pc 0x00000000004e0b50  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+64)
  #12  pc 0x000000000036d574  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #13  pc 0x0000000000358bc0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #14  pc 0x0000000000944608  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #15  pc 0x0000000000625d24  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #16  pc 0x00000000006257d4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
  #17  pc 0x0000000000101e5c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #18  pc 0x0000000000095ae0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 16, 2025
@vitek-karas
Copy link
Member

@BrzVlad - this seems GC related

@steveisok
Copy link
Member

Likely a duplicate of #109921

@SejalH96 the guidance is to try again with the latest 9.0 or 8.0.

@steveisok steveisok added needs-author-action An issue or pull request that requires more info or actions from the author. and removed untriaged New issue has not been triaged by the area owner labels Jan 19, 2025
@steveisok steveisok added this to the 10.0.0 milestone Jan 19, 2025
@SejalH96
Copy link
Author

We have tried it using both 8.0 and 9.0 and issue is there. We are currently using .Net 9

@dotnet-policy-service dotnet-policy-service bot added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed needs-author-action An issue or pull request that requires more info or actions from the author. labels Jan 20, 2025
@steveisok
Copy link
Member

We have tried it using both 8.0 and 9.0 and issue is there. We are currently using .Net 9

To confirm, are you using either 9.0.1 or 8.0.12?

@SejalH96
Copy link
Author

We are previously using 9.0.0 and now we have also tried by using 9.0.1 and the ANR still observed

@steveisok
Copy link
Member

Can you try to symbolicate following the steps in #109921 (comment) ?

Either that or provide a repro.

@SejalH96
Copy link
Author

We have tried different GC related configurations as well

  1. AndroidEnableSGenConcurrent with true and false both value and issue observed in both
  2. true -Xlinker -z -Xlinker noexecstack 1

We have tried different gcLatency mode and issue observed in all the mode

  1. Created runtimeconfig.template.json file
    {
    "runtimeOptions": {
    "configProperties": {
    "System.GC.Server": true,
    "System.GC.Concurrent": true,
    "System.GC.DynamicAdjustment": false,
    "System.Runtime.TieredCompilation": true,
    "System.Runtime.TieredCompilation.QuickJitForLoops": false,
    "System.GC.HeapHardLimit": 1073741824,
    "System.GC.HeapHardLimitPercent": 75
    }
    }
    }

How to check if it is actually applying or not as we found only the property for IsServerGC and it is false even when setting it to true. (We have checked runtimeconfig.json created in bin folder and it has this value but in log when we printed IsServerGC it displayed false.)

Issue is observed with this config as well

Let me know if there is any other flags related to GC to try and which is the ideal configuration for GC

@SejalH96
Copy link
Author

Symbolicate the trace which is as follows:
sejal@Sejals-Mac-mini arm64-v8a % /opt/homebrew/Cellar/llvm/19.1.7/bin/llvm-addr2line -aCifp -e libmonosgen-2.0.so 1ee890
0x1ee890: mono_os_sem_post at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:279
(inlined by) mono_threads_notify_initiator_of_resume at /__w/1/s/src/mono/mono/utils/mono-threads.c:123
sejal@Sejals-Mac-mini arm64-v8a % /opt/homebrew/Cellar/llvm/19.1.7/bin/llvm-addr2line -aCifp -e libmonosgen-2.0.so 1f48d0
0x1f48d0: mono_threads_enter_gc_unsafe_region_unbalanced_with_info at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:498
sejal@Sejals-Mac-mini arm64-v8a % /opt/homebrew/Cellar/llvm/19.1.7/bin/llvm-addr2line -aCifp -e libmonosgen-2.0.so 27725c
0x27725c: mono_threads_attach_coop_internal at /__w/1/s/src/mono/mono/metadata/threads.c:4719
sejal@Sejals-Mac-mini arm64-v8a % /opt/homebrew/Cellar/llvm/19.1.7/bin/llvm-addr2line -aCifp -e libmonosgen-2.0.so 277290
0x277290: mono_threads_attach_coop at /__w/1/s/src/mono/mono/metadata/threads.c:4738

@SejalH96
Copy link
Author

@steveisok Is there any update or any other details required by my side

@steveisok
Copy link
Member

@steveisok Is there any update or any other details required by my side

No, this does seem different than the issue I linked to. Any chance you can provide a repro?

@SejalH96
Copy link
Author

No, we can't provide that directly but can you check the configurations I have tried and let me know if there is any other area where I look into code if you think any particular component causing this issue

@SejalH96
Copy link
Author

@steveisok Let me know if there is something i can try on at my end to find root cause asap

@rkops-bd
Copy link

We have exact te same problems with our app. For us it since the .net9 release. We can't find the root cause.
@jfversluis any thought how to investigate where the problem is coming from?

@steveisok
Copy link
Member

@lateralusX @kg can you please look into this and see what might be wrong?

@kg
Copy link
Member

kg commented Feb 1, 2025

Actual behavior

Random behaviour observed. Some time app got crashed and some time ANR generated while there are no changes in the code after migration

You mention sometimes the app crashes instead of ANRing. Do you have stack traces for any of those crashes?

@SejalH96
Copy link
Author

SejalH96 commented Feb 3, 2025

Yes, In one of our application crash is also reported multiple times and here is the stacktrace which is reported in play console


pid: 0, tid: 24209 >>> com.matrix.essapp <<<

backtrace:
#00 pc 0x00000000000d7714 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#1 pc 0x00000000000ca3b4 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#2 pc 0x00000000000e3e7c /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#3 pc 0x00000000000bb2b0 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#4 pc 0x00000000000bd8ec /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#5 pc 0x00000000000c25b8 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#6 pc 0x00000000000c1a24 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#7 pc 0x0000000000152130 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#8 pc 0x0000000000151c94 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617)
#9 pc 0x0000000000004300

@rkops-bd
Copy link

rkops-bd commented Feb 3, 2025


pid: 0, tid: 28274 >>> [Redacted] <<<

backtrace:
#00 pc 0x00000000001ddc78 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#2 pc 0x00000000000d24c8 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#3 pc 0x00000000000ca414 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#4 pc 0x00000000000e4500 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#5 pc 0x00000000000ca414 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#1 pc 0x000000000025ef0c /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_metadata_parse_mh_full+76) (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#6 pc 0x00000000000e4500 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#7 pc 0x00000000000ca414 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#8 pc 0x00000000000e4500 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#9 pc 0x00000000000bb244 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#10 pc 0x00000000000bd7f4 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#11 pc 0x00000000000c26bc /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#12 pc 0x00000000000c1a58 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#13 pc 0x0000000000152f44 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#14 pc 0x0000000000152aa8 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206)
#15 pc 0x00000000000042e8

@lateralusX
Copy link
Member

Yes, In one of our application crash is also reported multiple times and here is the stacktrace which is reported in play console

pid: 0, tid: 24209 >>> com.matrix.essapp <<<

backtrace: #00 pc 0x00000000000d7714 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #1 pc 0x00000000000ca3b4 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #2 pc 0x00000000000e3e7c /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #3 pc 0x00000000000bb2b0 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #4 pc 0x00000000000bd8ec /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #5 pc 0x00000000000c25b8 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #6 pc 0x00000000000c1a24 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #7 pc 0x0000000000152130 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #8 pc 0x0000000000151c94 /data/app/~~F07wX6Es__7aqpt1l8VlcQ==/com.matrix.essapp-lpmST97Lqx0eIo9QSZkdaQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 48e3f0902f459e3d303103a665474210c2406617) #9 pc 0x0000000000004300

I symbolicated this callstack and come up with the following (looks like its using 8.0.8):

0xd7714: try_prepare_objaddr_callvirt_optimization at /__w/1/s/src/mono/mono/mini/method-to-ir.c:0
(inlined by) mono_method_to_ir at /__w/1/s/src/mono/mono/mini/method-to-ir.c:7132
0xca3b4: inline_method at /__w/1/s/src/mono/mono/mini/method-to-ir.c:4820
0xe3e7c: mono_method_to_ir at /__w/1/s/src/mono/mono/mini/method-to-ir.c:7868
0xbb2b0: mini_method_compile at /__w/1/s/src/mono/mono/mini/mini.c:3498
0xbd8ec: mono_jit_compile_method_inner at /__w/1/s/src/mono/mono/mini/mini.c:4132
0xc25b8: mono_jit_compile_method_with_opt at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2813
(inlined by) jit_compile_method_with_opt_cb at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2868
(inlined by) jit_compile_method_with_opt at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2884
0xc1a24: mono_jit_compile_method at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2903
0x152130: common_call_trampoline at /__w/1/s/src/mono/mono/mini/mini-trampolines.c:628
0x151c94: mono_magic_trampoline at /__w/1/s/src/mono/mono/mini/mini-trampolines.c:769

and a crash in try_prepare_objaddr_callvirt_optimization lines up with the fix for #109921 that should be included in 8.0.12 and 9.0.1.

@lateralusX
Copy link
Member

lateralusX commented Feb 4, 2025

pid: 0, tid: 28274 >>> [Redacted] <<<

backtrace: #00 pc 0x00000000001ddc78 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #2 pc 0x00000000000d24c8 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #3 pc 0x00000000000ca414 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #4 pc 0x00000000000e4500 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #5 pc 0x00000000000ca414 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #1 pc 0x000000000025ef0c /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_metadata_parse_mh_full+76) (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #6 pc 0x00000000000e4500 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #7 pc 0x00000000000ca414 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #8 pc 0x00000000000e4500 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #9 pc 0x00000000000bb244 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #10 pc 0x00000000000bd7f4 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #11 pc 0x00000000000c26bc /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #12 pc 0x00000000000c1a58 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #13 pc 0x0000000000152f44 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #14 pc 0x0000000000152aa8 /data/app/[Redacted]-MkFBj3OUUSB5p-POsfc-bg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 5c0f30dec901885b27282d3532d8efe2d5d00206) #15 pc 0x00000000000042e8

If I'm going to successfully symbolicate this callstack I would need to know what version its coming from, doesn't seem to match 8.0.8 as other stack traces in this issue.

@SejalH96
Copy link
Author

SejalH96 commented Feb 4, 2025

@lateralusX Ok, we will check it by using 9.0.1 in that application for crash reported in play console

@lateralusX Can you also check the symbolicate I have provided for ANR as it is major issue in our app

@lateralusX
Copy link
Member

lateralusX commented Feb 4, 2025

I also symbolicated the original stack traces reported in this issue for application hang using 8.0.8, mainly looking at threads that had any Mono related frames on stack traces and come up with the following three threads:

"id.satatyasight" tid=19235 Native

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
sem_wait+112
mono_os_sem_wait at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:204
(inlined by) mono_thread_info_wait_for_resume at /__w/1/s/src/mono/mono/utils/mono-threads.c:238
mono_threads_enter_gc_unsafe_region_unbalanced_with_info at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:498
mono_threads_attach_coop_internal at /__w/1/s/src/mono/mono/metadata/threads.c:4719
mono_threads_attach_coop at /__w/1/s/src/mono/mono/metadata/threads.c:4738

"SGen worker" tid=19257 Native

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
pthread_cond_wait+72
mono_os_cond_wait at /__w/1/s/src/mono/mono/sgen/../../mono/utils/mono-os-mutex.h:219
(inlined by) get_work at /__w/1/s/src/mono/mono/sgen/sgen-thread-pool.c:164
(inlined by) thread_func at /__w/1/s/src/mono/mono/sgen/sgen-thread-pool.c:195
__pthread_start(void*)+204
__start_thread+64

"Finalizer" tid=19259 Native

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+368
mono_os_mutex_lock at /__w/1/s/src/mono/mono/sgen/../../mono/utils/mono-os-mutex.h:105
(inlined by) mono_coop_mutex_lock at /__w/1/s/src/mono/mono/sgen/../../mono/utils/mono-coop-mutex.h:57
(inlined by) sgen_gc_lock at /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3922
sgen_gc_invoke_finalizers at /__w/1/s/src/mono/mono/sgen/sgen-gc.c:2855
mono_runtime_do_background_work at /__w/1/s/src/mono/mono/metadata/gc.c:859
(inlined by) finalizer_thread at /__w/1/s/src/mono/mono/metadata/gc.c:905
start_wrapper_internal at /__w/1/s/src/mono/mono/metadata/threads.c:1202
(inlined by) start_wrapper at /__w/1/s/src/mono/mono/metadata/threads.c:1271
__pthread_start(void*)+204
__start_thread+64

At a first glance this doesn't look suspicious if it was a regular snapshot, but if thread 19235 gets stuck in that location it means it waits for runtime to resume it, since it probably hit a case where it attached while runtime was doing a GC.

There is also a similar issue reported here, dotnet/android#9365, in those ANR's there are callstacks of GC blocking on stop the world, but couldn't find any stack trace in above dump that indicates that, have other ANR's included threads that blocks on sgen_stop_world ? For thread 19259, do you see similar waiting on the same lock in other ANR's as well? If that thread blocks on that lock (gc lock) it normally means a GC is running and that would explain why 19235 waits, but then we should have one thread running with a callstack similar to this:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
sem_wait+104
mono_os_sem_timedwait+204
mono_threads_wait_pending_operations+329
unified_suspend_stop_world+349
sgen_client_stop_world+159
sgen_stop_world+3988
sgen_perform_collection+2637
...

Do you get any output in any of the regular output logs?

What kind of app is this a MAUI Android app or just using Android SDK? Does the app use any specific features, like calling runtime using unmanaged thunks, reverse delegates (managed delegates passed to native code) or managed functions marked as unmanaged callers only, attaching threads to the runtime using any of the embedding API's, or calling any other mono_* embedding API's? I try to understand where the call to mono_threads_attach_coop originates from.

@SejalH96
Copy link
Author

SejalH96 commented Feb 5, 2025

@lateralusX I have uploaded the full stacktrace of latest ANR reported in PlayConsole here https://drive.google.com/drive/folders/1NoteQYQPBRfCCFrmhuC3kzQ_q_y6MJp-?usp=drive_link

Application Details:

Platform: .Net for Android
Issue occurs in: Live view streaming

Used components for live view streamig

  • Socket communication: To fetch the data
  • FFMPEG: To decode the frames. FFmpeg is integrated as an Android native library. This involves data exchange between unmanaged (native c/c++) and managed (.NET c#) code. Issue occurs after 15 to 20 minutes in release mode.
  • OpenGL - To render frames

@SejalH96
Copy link
Author

@lateralusX Is there any update on this

@lateralusX
Copy link
Member

@SejalH96, been busy investigating #109921 as well fixing #112282. I will try to get your latest callstack symbolicate and see if they give some more clues, but it at least appears there are more Mono threads running in the latest set of callstacks.

@lateralusX
Copy link
Member

@SejalH96, started to look a little on your latest callstacks and I think I have a lead that could end up with a deadlock during GC, that seems to be validated by at least one of the latest dumps (I will look at the other one as well to see if it points in the same direction).

@SejalH96
Copy link
Author

@lateralusX According to our analysis, we also have doubt on GC as the Actual ANR displayed when we touch the screen but before that all processes are already stuck after gc call

For ex:
02-10 17:28:00.671 6150-6491 id.satatyasight com...ixcomsec.android.satatyasight I Explicit concurrent copying GC freed 32KB AllocSpace bytes, 0(0B) LOS objects, 49% free, 8014KB/15MB, paused 63us,41us total 19.278ms
2025-02-10 17:29:40.104 1586-2365 InputDispatcher system_server W Window 2d17dce com.matrixcomsec.android.satatyasight/crc64d1a58179591a9bcb.MxHomeActivity (server) is unresponsive: 2d17dce com.matrixcomsec.android.satatyasight/crc64d1a58179591a9bcb.MxHomeActivity (server) is not responding. Waited 5002ms for MotionEvent

As per the above log last call to gc is at 17:28:00.671 and after that there is no log till we touch the screen at 17:29:40.104 so it might points to the gc

@lateralusX
Copy link
Member

lateralusX commented Feb 10, 2025

Jupp, the logs you provided in the above google drive both points to the same thing, and it's a hang when we try to stop the world that happens when we are about to start a new GC. I will have a fix for that scenario during the day.

lateralusX added a commit to lateralusX/runtime that referenced this issue Feb 10, 2025
On Android we have seen ANR issues, like the one described in
dotnet#111485. After investigating
several different dumps including all threads it turns out that we
could end up in a deadlock when init a monitor since that code path
didn't use a coop mutex and owner of lock could end up in GC code
while holding that lock, leading to deadlock if another thread was
about to lock the same monitor init lock. In several dumps we see
the following two threads:

Thread 1:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+14
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+384
sgen_gc_lock+105
mono_gc_wait_for_bridge_processing_internal+70
sgen_gchandle_get_target+288
alloc_mon+358
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

Thread 2:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+652
alloc_mon+105
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

So in this scenario Thread 1 holds monitor_mutex that is not a coop
mutex and end up trying to take GC lock, since it calls,
mono_gc_wait_for_bridge_processing_internal, but since a GC is already
started (waiting on STW to complete), Thread 1 will block holding
monitor_mutex.

Thread 2 will try to lock monitor_mutex as well, and since its not a
coop mutex it will block on OS __futex_wait_ex without changing
Mono thread state to blocking, preventing the STW from processing.

Fix is to switch to coop aware implementation of monitor_mutex.

Normally this should have been resolved on Android since we run
hybrid suspend meaning we should be able to run a signal handler on the
blocking thread that would suspend it meaning that STW would continue,
but for some reason the signal can't have been executed in this case putting the app under coop suspend limitations.

This fix will take care of the deadlock, but if there are issues running
Signals on Android, then threads not attached to runtime using
coop attach methods could end up in similar situations
blocking STW.
steveisok pushed a commit that referenced this issue Feb 10, 2025
…id. (#112358)

On Android we have seen ANR issues, like the one described in
#111485. After investigating
several different dumps including all threads it turns out that we
could end up in a deadlock when init a monitor since that code path
didn't use a coop mutex and owner of lock could end up in GC code
while holding that lock, leading to deadlock if another thread was
about to lock the same monitor init lock. In several dumps we see
the following two threads:

Thread 1:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+14
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+384
sgen_gc_lock+105
mono_gc_wait_for_bridge_processing_internal+70
sgen_gchandle_get_target+288
alloc_mon+358
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

Thread 2:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+652
alloc_mon+105
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

So in this scenario Thread 1 holds monitor_mutex that is not a coop
mutex and end up trying to take GC lock, since it calls,
mono_gc_wait_for_bridge_processing_internal, but since a GC is already
started (waiting on STW to complete), Thread 1 will block holding
monitor_mutex.

Thread 2 will try to lock monitor_mutex as well, and since its not a
coop mutex it will block on OS __futex_wait_ex without changing
Mono thread state to blocking, preventing the STW from processing.

Fix is to switch to coop aware implementation of monitor_mutex.

Normally this should have been resolved on Android since we run
hybrid suspend meaning we should be able to run a signal handler on the
blocking thread that would suspend it meaning that STW would continue,
but for some reason the signal can't have been executed in this case putting the app under coop suspend limitations.

This fix will take care of the deadlock, but if there are issues running
Signals on Android, then threads not attached to runtime using
coop attach methods could end up in similar situations
blocking STW.
github-actions bot pushed a commit that referenced this issue Feb 10, 2025
On Android we have seen ANR issues, like the one described in
#111485. After investigating
several different dumps including all threads it turns out that we
could end up in a deadlock when init a monitor since that code path
didn't use a coop mutex and owner of lock could end up in GC code
while holding that lock, leading to deadlock if another thread was
about to lock the same monitor init lock. In several dumps we see
the following two threads:

Thread 1:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+14
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+384
sgen_gc_lock+105
mono_gc_wait_for_bridge_processing_internal+70
sgen_gchandle_get_target+288
alloc_mon+358
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

Thread 2:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+652
alloc_mon+105
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

So in this scenario Thread 1 holds monitor_mutex that is not a coop
mutex and end up trying to take GC lock, since it calls,
mono_gc_wait_for_bridge_processing_internal, but since a GC is already
started (waiting on STW to complete), Thread 1 will block holding
monitor_mutex.

Thread 2 will try to lock monitor_mutex as well, and since its not a
coop mutex it will block on OS __futex_wait_ex without changing
Mono thread state to blocking, preventing the STW from processing.

Fix is to switch to coop aware implementation of monitor_mutex.

Normally this should have been resolved on Android since we run
hybrid suspend meaning we should be able to run a signal handler on the
blocking thread that would suspend it meaning that STW would continue,
but for some reason the signal can't have been executed in this case putting the app under coop suspend limitations.

This fix will take care of the deadlock, but if there are issues running
Signals on Android, then threads not attached to runtime using
coop attach methods could end up in similar situations
blocking STW.
github-actions bot pushed a commit that referenced this issue Feb 10, 2025
On Android we have seen ANR issues, like the one described in
#111485. After investigating
several different dumps including all threads it turns out that we
could end up in a deadlock when init a monitor since that code path
didn't use a coop mutex and owner of lock could end up in GC code
while holding that lock, leading to deadlock if another thread was
about to lock the same monitor init lock. In several dumps we see
the following two threads:

Thread 1:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+14
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+384
sgen_gc_lock+105
mono_gc_wait_for_bridge_processing_internal+70
sgen_gchandle_get_target+288
alloc_mon+358
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

Thread 2:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+652
alloc_mon+105
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

So in this scenario Thread 1 holds monitor_mutex that is not a coop
mutex and end up trying to take GC lock, since it calls,
mono_gc_wait_for_bridge_processing_internal, but since a GC is already
started (waiting on STW to complete), Thread 1 will block holding
monitor_mutex.

Thread 2 will try to lock monitor_mutex as well, and since its not a
coop mutex it will block on OS __futex_wait_ex without changing
Mono thread state to blocking, preventing the STW from processing.

Fix is to switch to coop aware implementation of monitor_mutex.

Normally this should have been resolved on Android since we run
hybrid suspend meaning we should be able to run a signal handler on the
blocking thread that would suspend it meaning that STW would continue,
but for some reason the signal can't have been executed in this case putting the app under coop suspend limitations.

This fix will take care of the deadlock, but if there are issues running
Signals on Android, then threads not attached to runtime using
coop attach methods could end up in similar situations
blocking STW.
@SejalH96
Copy link
Author

@lateralusX Thank you for the update. Could you let me know when it will be available for testing?

@lateralusX
Copy link
Member

lateralusX commented Feb 11, 2025

@SejalH96 fix was merged yesterday for main, backport process started but will take some time before coming through all the way to SDK's. Do you have local repro to test this you could rebuild the runtime locally and test fix locally.

Having that said, the fix makes sure we handle the specific deadlock scenario you hit, but on Android, that scenario should have been resolved when runtime fallbacks to pre-emptive suspend mode for threads that are not responding and that indicates that our capabilities to send specific signals to threads has been limited inside this app. Mono relies on two signals for pre-emptive suspend to work on Android, SIGPWR and SIGXCPU and no other code in the process can replace our signal handlers with their own, or you will end up in deadlocks like this on Android in case runtime have threads that won't correctly respond to cooperate suspend orchestration. If threads are attached to the runtime compatible with cooperate suspend model then we would not need to revert back to pre-emptive suspend, but there are still cases where Android SDK as well as 3'rd party code could attach threads to runtime that might depend on pre-emptive suspend working meaning that the threads signal handler needs to point to Mono signal handler for SIGPWR and SIGXCPU. I will do some further investigation on this scenario to make sure our hybrid suspend wouldn't get into a bad situation when having threads that are not full cooperate suspend policy compliant.

What FFMPEG library are you using? I can see that FFMPEG sources hijacks one of the signal Mono uses, SIGXCPU and if that code is executed after runtime has been initialized, that will have impact on our pre-emptive suspend mechanism. I also see that other implementation of FFMPEG, like https://github.com/arthenica/ffmpeg-kit, actually have documentations on how to disable that signal when running the library together with Mono or Unity.

@lateralusX
Copy link
Member

Looked a little deeper related to hybrid suspend policy together with our stop the world (STW) implementation in Mono around its behavior in case a thread won't reply to our cooperate suspend request. Initially I believed that hybrid suspend would try to do a preemptive suspend if threads didn't respond to the cooperate suspend request, but it turns out that the first part of our STW implementation,

for (MonoThreadSuspendPhase phase = MONO_THREAD_SUSPEND_PHASE_INITIAL; phase < MONO_THREAD_SUSPEND_PHASE_COUNT; phase++) {
, will wait for all threads in RUNNING state here,
mono_threads_wait_pending_operations ();
and it will do that using an infinite timeout meaning that if a thread is in RUNNING state, but won't reach a safepoint, the STW will block on mono_threads_wait_pending_operations forever and never fallback to try to use preemptive suspend on threads not reaching safepoints in a timely manner. Looking at the definition of a thread in RUNNING it means thread is running managed or runtime code and the fix for the ANR reported in this issue, #112358, is part of runtime code, meaning that a thread that deadlocked on that mutex was in RUNNING state, meaning that it would never reach a safepoint in coop/hybrid suspend mode blocking the STW forever. If runtime had been executed using preemptive suspend mode, this deadlock would not occur since threads will be preemptive suspended regardless of what code they are executed, but preemptive suspend has other side effects that hybrid/coop suspend mode solve. Long story short, the fix will take care of this deadlock in runtime code fixing hybrid/coop suspend modes and its expected that runtime didn't fallback to preemptive suspend as an attempt to resolve the deadlock.

steveisok pushed a commit that referenced this issue Feb 12, 2025
…id. (#112373)

Backport of #112358 to release/9.0

On Android we have seen ANR issues, like the one described in
#111485. After investigating
several different dumps including all threads it turns out that we
could end up in a deadlock when init a monitor since that code path
didn't use a coop mutex and owner of lock could end up in GC code
while holding that lock, leading to deadlock if another thread was
about to lock the same monitor init lock. In several dumps we see
the following two threads:

Thread 1:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+14
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+384
sgen_gc_lock+105
mono_gc_wait_for_bridge_processing_internal+70
sgen_gchandle_get_target+288
alloc_mon+358
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

Thread 2:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+652
alloc_mon+105
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

So in this scenario Thread 1 holds monitor_mutex that is not a coop
mutex and end up trying to take GC lock, since it calls,
mono_gc_wait_for_bridge_processing_internal, but since a GC is already
started (waiting on STW to complete), Thread 1 will block holding
monitor_mutex.

Thread 2 will try to lock monitor_mutex as well, and since its not a
coop mutex it will block on OS __futex_wait_ex without changing
Mono thread state to blocking, preventing the STW from processing.

Fix is to switch to coop aware implementation of monitor_mutex.

Normally this should have been resolved on Android since we run
hybrid suspend meaning we should be able to run a signal handler on the
blocking thread that would suspend it meaning that STW would continue,
but for some reason the signal can't have been executed in this case putting the app under coop suspend limitations.

This fix will take care of the deadlock, but if there are issues running
Signals on Android, then threads not attached to runtime using
coop attach methods could end up in similar situations
blocking STW.

Co-authored-by: lateralusX <lateralusx.github@gmail.com>
steveisok pushed a commit that referenced this issue Feb 12, 2025
…id. (#112374)

Backport of #112358 to release/8.0

On Android we have seen ANR issues, like the one described in
#111485. After investigating
several different dumps including all threads it turns out that we
could end up in a deadlock when init a monitor since that code path
didn't use a coop mutex and owner of lock could end up in GC code
while holding that lock, leading to deadlock if another thread was
about to lock the same monitor init lock. In several dumps we see
the following two threads:

Thread 1:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+14
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+384
sgen_gc_lock+105
mono_gc_wait_for_bridge_processing_internal+70
sgen_gchandle_get_target+288
alloc_mon+358
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

Thread 2:

syscall+28
__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144
NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+652
alloc_mon+105
ves_icall_System_Threading_Monitor_Monitor_wait+452
ves_icall_System_Threading_Monitor_Monitor_wait_raw+583

So in this scenario Thread 1 holds monitor_mutex that is not a coop
mutex and end up trying to take GC lock, since it calls,
mono_gc_wait_for_bridge_processing_internal, but since a GC is already
started (waiting on STW to complete), Thread 1 will block holding
monitor_mutex.

Thread 2 will try to lock monitor_mutex as well, and since its not a
coop mutex it will block on OS __futex_wait_ex without changing
Mono thread state to blocking, preventing the STW from processing.

Fix is to switch to coop aware implementation of monitor_mutex.

Normally this should have been resolved on Android since we run
hybrid suspend meaning we should be able to run a signal handler on the
blocking thread that would suspend it meaning that STW would continue,
but for some reason the signal can't have been executed in this case putting the app under coop suspend limitations.

This fix will take care of the deadlock, but if there are issues running
Signals on Android, then threads not attached to runtime using
coop attach methods could end up in similar situations
blocking STW.

Co-authored-by: lateralusX <lateralusx.github@gmail.com>
@SejalH96
Copy link
Author

@lateralusX Since you mentioned that we can test this by building the .NET runtime locally, could you please provide the steps to build the runtime? Additionally, what changes are needed to ensure that our .NET 9 project uses the locally built runtime during the build process?

@SejalH96
Copy link
Author

@lateralusX I have also included other stack traces of ANRs or crashes with a higher report count at https://drive.google.com/drive/folders/1NoteQYQPBRfCCFrmhuC3kzQ_q_y6MJp-?usp=sharing. Could you please check if these are also resolved by this fix or analyze them further?

@SejalH96
Copy link
Author

@lateralusX Could you find some time to review the additional stack trace? Also, do you have an estimated release date?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-meta-mono needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration
Projects
None yet
Development

No branches or pull requests

6 participants