Lately, we're experiencing native crashes spike in production. All those crashes are related to rendering UI and happened mostly on Android 12 and vendors like Samsung. Some of them from Play Console are:
[libhwui.so] SkCanvas::restore()
SIGSEGV
backtrace:
#00 pc 0x000000000026c9d8 /system/lib64/libhwui.so (SkCanvas::restore()+344)
#01 pc 0x000000000026c73c /system/lib64/libhwui.so
(android::SkiaCanvas::restore()+52)
#02 pc 0x00000000002008e0 /system/lib64/libhwui.so
(android::CanvasJNI::restore(long)+56)
#03 pc 0x0000000000bef14c /data/misc/apexdata/com.android.art/dalvik-
cache/arm64/boot.oat (android.graphics.Canvas.restore+60)
or
[[vdso]] __kernel_rt_sigreturn
SIGSEGV
#00 pc 0x00000000001ac258 /apex/com.android.art/lib64/libart.so
(art::ArtMethod::GetOatQuickMethodHeader(unsigned long)+40)
#01 pc 0x0000000000597864 /apex/com.android.art/lib64/libart.so (void
art::StackVisitor::WalkStack<(art::StackVisitor::CountTransitions)0>(bool)+516)
#02 pc 0x000000000059a514 /apex/com.android.art/lib64/libart.so
(art::StackVisitor::GetVRegFromDebuggerShadowFrame(unsigned short, art::VRegKind,
unsigned int*) const+284)
#03 pc 0x000000000059a314 /apex/com.android.art/lib64/libart.so
(art::StackVisitor::GetVReg(art::ArtMethod*, unsigned short, art::VRegKind, unsigned
int*, std::__1::optional<art::DexRegisterLocation>) const+76)
But we cannot understand their cause because neither Firebase Crashlytics nor other third parties can catch native crashes. We've googled everything and found nothing about how to get more data for the native crashes to find the cause. Maybe somebody has an experience with it and can share.
Below error occurred to multiple users but once mostly per device. But it continuous to happen.
I have not used App bundle, but provided 2 separate APK for 32 bit and 64 bit phones.
All devices mentioned so far are at Android 9 level.
My build is taken with target SDK API 26 (due to the limitation present in Kony IDE). compiled using API 28.
What may cause this error?
I am unable to reproduce this issue. Any probable cause for this issue?
Devices in which this observed:
Samsung Galaxy A7 (2018) (a7y18lte), Android 9
Samsung Galaxy Note10+ (d2s), Android 9
Samsung Galaxy S10 (beyond1), Android 9
Samsung Galaxy S10+ (beyond2), Android 9
Samsung Galaxy Note9 (crownlte), Android 9
Samsung Galaxy Note8 (greatlte), Android 9
Samsung Galaxy S10 (beyond1), Android 9
Huawei P20 Pro (HWCLT), Android 9
Huawei P30 Pro (HWVOG), Android 9
Huawei Mate 20 Pro (HWLYA), Android 9
Error From Google Play Console
pid: 0, tid: 0
backtrace:
#00 pc 00000000003c3ef8 /system/lib64/libart.so (art::MonitorList::SweepMonitorList(art::IsMarkedVisitor*)+288)
#01 pc 0000000000469874 /system/lib64/libart.so (art::Runtime::SweepSystemWeaks(art::IsMarkedVisitor*)+40)
#02 pc 00000000001c1824 /system/lib64/libart.so (art::gc::collector::ConcurrentCopying::SweepSystemWeaks(art::Thread*)+192)
#03 pc 00000000001be504 /system/lib64/libart.so (art::gc::collector::ConcurrentCopying::MarkingPhase()+1928)
#04 pc 00000000001bc8b8 /system/lib64/libart.so (art::gc::collector::ConcurrentCopying::RunPhases()+1328)
#05 pc 00000000001d2be8 /system/lib64/libart.so (art::gc::collector::GarbageCollector::Run(art::gc::GcCause, bool)+320)
#06 pc 00000000001f5594 /system/lib64/libart.so (art::gc::Heap::CollectGarbageInternal(art::gc::collector::GcType, art::gc::GcCause, bool)+3408)
#07 pc 0000000000206b10 /system/lib64/libart.so (art::gc::Heap::ConcurrentGC(art::Thread*, art::gc::GcCause, bool)+128)
#08 pc 000000000020c178 /system/lib64/libart.so (art::gc::Heap::ConcurrentGCTask::Run(art::Thread*)+40)
#09 pc 000000000022ebb8 /system/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+68)
#10 pc 000000000007b56c /system/framework/arm64/boot-core-libart.oat (dalvik.system.VMRuntime.clampGrowthLimit [DEDUPED]+124)
#11 pc 00000000001845d4 /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$HeapTaskDaemon.runInternal+196)
#12 pc 0000000000111e7c /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$Daemon.run+76)
#13 pc 000000000025d068 /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
#14 pc 000000000055ab88 /system/lib64/libart.so (art_quick_invoke_stub+584)
#15 pc 00000000000d04c8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#16 pc 00000000004618ac /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#17 pc 0000000000462968 /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
#18 pc 000000000048dd88 /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
#19 pc 00000000000836c8 /system/lib64/libc.so (__pthread_start(void*)+196)
#20 pc 0000000000023bac /system/lib64/libc.so (__start_thread+68)
I get reports of these crashes from users of my app on Android 6.0 devices. The crash stack doesn't contain any keywords of my source code. I can't determined what caused the problem and don't know what to do. What's wrong with it? :(
SIGSEGV(SEGV_MAPERR):
#00 pc 0018b7fc /system/lib/libart.so (art::gc::collector::ConcurrentCopying::FillWithDummyObject(art::mirror::Object*, unsigned int)+1195) [armeabi-v7a::bd556bcd01d8c215f5cd133343e0a883]
#01 pc 0018ba89 /system/lib/libart.so (art::gc::collector::MarkSweep::ProcessMarkStack(bool)+100) [armeabi-v7a::bd556bcd01d8c215f5cd133343e0a883]
java:
java.lang.Daemons$HeapTaskDaemon.run(Daemons.java:386)
java.lang.Thread.run(Thread.java:818)
SIGSEGV(SEGV_MAPERR):
#00 pc 001976fc /system/lib/libart.so (art::gc::collector::ConcurrentCopying::Copy(art::mirror::Object*)+923) [armeabi-v7a::44966e008bb1c7f64243a7db7f321398]
#01 pc 001979a1 /system/lib/libart.so (art::gc::collector::MarkSweep::ProcessMarkStack(bool)+112) [armeabi-v7a::44966e008bb1c7f64243a7db7f321398]
……
#55 pc 001979a1 /system/lib/libart.so (art::gc::collector::MarkSweep::ProcessMarkStack(bool)+112) [armeabi-v7a::44966e008bb1c7f64243a7db7f321398]
#56 pc 001979a1 /system/lib/libart.so (_ZN3art2gc9collec
There are lots of native crashes in my app, only in 5.0 or 5.1 android system, the crash trace are bellow:
SIGBUS(BUS_ADRERR):
#00 pc 0022dece /system/lib/libart.so (art::StackVisitor::WalkStack(bool) +209)
#01 pc 00237915 /system/lib/libart.so (_jobject* art::Thread::CreateInternalStackTrace<false>(art::ScopedObjectAccessAlreadyRunnable const&) const +56)
#02 pc 002081b3 /system/lib/libart.so (art::Throwable_nativeFillInStackTrace(_JNIEnv*, _jclass*) +18)
#03 pc 00000c1d /data/dalvik-cache/arm/system#framework#boot.oat
Does anyone else have met this problem before ? what is /data/dalvik-cache/arm/system#framework#boot.oat ? Any help on how to proceed would be appreciated ! Thanks
We collected a lot of crashes on the Google Play console about native method of String_fastSubstring. Most crashes occur on Android 6.0 and 7.0.
What kind of string may cause this error?
/system/lib/libc.so (tgkill+12)
/system/lib/libc.so (pthread_kill+34)
/system/lib/libc.so (raise+10)
/system/lib/libc.so (__libc_android_abort+34)
/system/lib/libc.so (abort+4)
/system/lib/libart.so (_ZN3art7Runtime5AbortEv+252)
/system/lib/libart.so (_ZN3art10LogMessageD2Ev+866)
/system/lib/libart.so(_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+194)
/system/lib/libart.so (_ZN3artL20String_fastSubstringEP7_JNIEnvP8_jobjectii+162)
/system/framework/arm/boot.oat (java.lang.String.fastSubstring+92)
/system/framework/arm/boot.oat (java.lang.String.substring+140)
/system/framework/arm/boot.oat (java.util.regex.Pattern.fastSplit+542)
/system/framework/arm/boot.oat (java.lang.String.split+64)
/system/framework/arm/boot.oat (java.lang.String.split+40)
/system/framework/arm/boot.oat (java.util.UUID.fromString+56)
/data/app/com.igg.android.wegamers-1/oat/arm/base.odex
Image on below Link:
Android 6.0
Android 7.0