Open taschik opened 5 years ago
@taschik Since that is native crash, the crash information you provided is not enough for troubleshooting.
Please refer Fabric Crashlytics NDK setup guide to capture native crashes. https://docs.fabric.io/android/crashlytics/ndk.html You may still need to upload external debug symbols from libv8.
The debug symbols for libv8 you could get it from:
wget https://registry.npmjs.org/v8-android/-/v8-android-7.5.1.tgz
tar xf v8-android-7.5.1.tgz
tar xf package/dist/lib.unstripped/v8-android/7.5.1/libs.tar.xz
file {armeabi-v7a,arm64-v8a,x86,x86_64}/libv8.so
Thanks @Kudo! I added Crashlytics NDK but need to wait for a new release and users experiencing the crash to share more details. I will keep you posted.
Thanks and feel free to let me know if you need any assistance.
@Kudo We have shifted to v8 from jsc because we were experiencing a lot of crashes. But the same is happening using v8. below is the log
Thank you @AmandeepSingh06. From the backtrace, it seems the crash happens at GC. For GC problem, it is really hard to troubleshoot if there are no reliable reproduce steps. However, I will try to upgrade and publish new V8 to see if that will overcome the crash issue.
According to our Android vitals that crash is seen only on 3 specific models: Redmi Note 7 (lavender) Redmi Note 5 Pro (whyred) ZTE B2017G (tulip)
(there are many more similar crashes on the same 3 models, google does not group it correctly)
I've found related issue https://discuss.cocos2d-x.org/t/cocos-creator-crash-on-device-xiaomi-redmi/47653
Here is the quote from one of the answers:
I got this too. and I gave the feedback to Google and XiaoMi about one year ago, but none of them could help to resolve this crash. There are lots of crashes happen every day in our game.
You could also refer to https://bugs.chromium.org/p/v8/issues/detail?id=9034&q=&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary%20HW%20OS%20Component%20Stars A core developer from Google V8 team said that it’s not a bug of v8, it’s the bug of kernel inside Redmi phone. It sucks for a year more without any one could help me. A developer from XiaoMi said that they made some kernel optimization for memory and may probably trigger this issue, he told me to close JIT to avoid this crash on Redmi phone. I did that, but still get tons of these crashes every day.
I am not entirely sure that bug in chromium tracker is the same with ours / the one reported at discuss.cocos2d-x.org, as I see crashes exactly on 3 models I've listed above, and the guy whom I quoted shows screenshot with more affected models, but that looks related
@biomancer These information is great, I will find a time to take a look. Do you mind to try newer react-native-v8? I've disabled JIT for v8-android arm64.
https://github.com/Kudo/v8-android-buildscripts/releases/tag/v7.8.0
Upgrade V8 to 7.8.279.17 Use V8 lite mode for all platforms (including arm64-v8a) Built by NDK r19c Breaking Changes Since V8 did change their embedder API interface, original react-native-v8 will access to non existing symbol and crash. Please upgrade react-native-v8 to one of these version.
v0.59.10-patch.3 v0.60.6-patch.1 v0.61.1-patch.2 v0.61.2-patch.0 v0.61.3-patch.0 v0.61.4-patch.0
Please use new version to prevent #29 crash issue.
https://github.com/Kudo/v8-android-buildscripts/releases/tag/v7.8.1
Breaking Changes Since libv8.so is renamed, this is yet another breaking changes. Please use one of these react-native-v8 versions.
v0.59.10-patch.4 v0.60.6-patch.2 v0.61.1-patch.3 v0.61.2-patch.1 v0.61.3-patch.1 v0.61.4-patch.1
@Kudo we've released an app version with the updated react-native-v8 (react-native-v8@0.60.6-patch.2, v8-android-nointl@7.8.1), that fixed https://github.com/Kudo/react-native-v8/issues/29, but this issue is not resolved, we continue to see the crashes on these particular devices in Android vitals.
Here are some examples:
Redmi Redmi Note 7 (lavender), Android 9
Report 1 of 2
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.azradio <<<
backtrace:
#00 pc 000000000001e0d4 /system/lib64/libc.so (memcpy+356)
#01 pc 000000000052b2e4 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so
#02 pc 000000000052dad4 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so
#03 pc 000000000052a178 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so
#04 pc 000000000052c4e0 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so
#05 pc 000000000052c224 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so
#06 pc 00000000004ef644 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Task::RunInternal()+28)
#07 pc 0000000000393aec /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so (v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()+64)
#08 pc 0000000000390688 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so
#09 pc 0000000000090328 /system/lib64/libc.so (__pthread_start(void*)+36)
#10 pc 0000000000023a28 /system/lib64/libc.so (__start_thread+68)
Xiaomi Redmi Note 5 Pro (whyred), Android 8.1
Report 1 of 1
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.azradio <<<
backtrace:
#00 pc 000000000052b210 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so
#01 pc 000000000052dad4 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so
#02 pc 000000000052a178 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so
#03 pc 000000000052c4e0 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so
#04 pc 000000000052c224 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so
#05 pc 00000000004ef644 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Task::RunInternal()+28)
#06 pc 0000000000393aec /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so (v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()+64)
#07 pc 0000000000390688 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so
#08 pc 0000000000067ec4 /system/lib64/libc.so (__pthread_start(void*)+36)
#09 pc 000000000001f2f4 /system/lib64/libc.so (__start_thread+68)
Xiaomi Redmi Note 5 Pro (whyred), Android 9
Report 1 of 1
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.azradio <<<
backtrace:
#00 pc 000000000052b210 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#01 pc 000000000052a8dc /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#02 pc 000000000052c480 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#03 pc 000000000052c35c /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#04 pc 00000000004ef644 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Task::RunInternal()+28)
#05 pc 00000000004ef9e0 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Run()+640)
#06 pc 0000000000528188 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#07 pc 00000000004d3d24 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#08 pc 00000000004d14c4 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#09 pc 00000000004cff08 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)+1056)
#10 pc 00000000004d95a8 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#11 pc 00000000004d963c /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#12 pc 00000000004b8168 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Factory::NewDescriptorArray(int, int, v8::internal::AllocationType)+68)
#13 pc 0000000000642110 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#14 pc 0000000000623588 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#15 pc 0000000000623308 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Map::CopyWithField(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag)+432)
#16 pc 0000000000629000 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Map::TransitionToDataProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::StoreOrigin)+684)
#17 pc 000000000061dd48 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::StoreOrigin)+204)
#18 pc 000000000063f6d0 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#19 pc 000000000063ea2c /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>)+148)
#20 pc 0000000000729d90 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>)+244)
#21 pc 000000000072cfdc /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
#22 pc 0000000000b668c8 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
@biomancer From the crash backtrace, it is the same GC problem again. Besides the link you shared, I also found another one: https://groups.google.com/forum/#!searchin/v8-dev/ScavengeObject%7Csort:date/v8-dev/o3Prlv_TZVk/nTnEBadYCgAJ
It seems the crash happens on Chromium based browser too. Unfortunately, there is no update from Chromium and RedMi team. I am afraid that cannot do anything for the crash in the meantime.
@Kudo we've released an app version with the updated react-native-v8 (react-native-v8@0.60.6-patch.2, v8-android-nointl@7.8.1), that fixed #29, but this issue is not resolved, we continue to see the crashes on these particular devices in Android vitals.
Here are some examples:
Redmi Redmi Note 7 (lavender), Android 9 Report 1 of 2 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid: 0, tid: 0 >>> com.azradio <<< backtrace: #00 pc 000000000001e0d4 /system/lib64/libc.so (memcpy+356) #01 pc 000000000052b2e4 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so #02 pc 000000000052dad4 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so #03 pc 000000000052a178 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so #04 pc 000000000052c4e0 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so #05 pc 000000000052c224 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so #06 pc 00000000004ef644 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Task::RunInternal()+28) #07 pc 0000000000393aec /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so (v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()+64) #08 pc 0000000000390688 /data/app/com.azradio-VSC9zB8Yf7_cbRdi_ug_cQ==/lib/arm64/libv8android.so #09 pc 0000000000090328 /system/lib64/libc.so (__pthread_start(void*)+36) #10 pc 0000000000023a28 /system/lib64/libc.so (__start_thread+68)
Xiaomi Redmi Note 5 Pro (whyred), Android 8.1 Report 1 of 1 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid: 0, tid: 0 >>> com.azradio <<< backtrace: #00 pc 000000000052b210 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so #01 pc 000000000052dad4 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so #02 pc 000000000052a178 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so #03 pc 000000000052c4e0 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so #04 pc 000000000052c224 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so #05 pc 00000000004ef644 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Task::RunInternal()+28) #06 pc 0000000000393aec /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so (v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()+64) #07 pc 0000000000390688 /data/app/com.azradio-5ujwryYLYySIOpk8yW6qXA==/lib/arm64/libv8android.so #08 pc 0000000000067ec4 /system/lib64/libc.so (__pthread_start(void*)+36) #09 pc 000000000001f2f4 /system/lib64/libc.so (__start_thread+68)
Xiaomi Redmi Note 5 Pro (whyred), Android 9 Report 1 of 1 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** pid: 0, tid: 0 >>> com.azradio <<< backtrace: #00 pc 000000000052b210 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #01 pc 000000000052a8dc /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #02 pc 000000000052c480 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #03 pc 000000000052c35c /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #04 pc 00000000004ef644 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Task::RunInternal()+28) #05 pc 00000000004ef9e0 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::ItemParallelJob::Run()+640) #06 pc 0000000000528188 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #07 pc 00000000004d3d24 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #08 pc 00000000004d14c4 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #09 pc 00000000004cff08 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)+1056) #10 pc 00000000004d95a8 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #11 pc 00000000004d963c /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #12 pc 00000000004b8168 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Factory::NewDescriptorArray(int, int, v8::internal::AllocationType)+68) #13 pc 0000000000642110 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #14 pc 0000000000623588 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #15 pc 0000000000623308 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Map::CopyWithField(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag)+432) #16 pc 0000000000629000 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Map::TransitionToDataProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::StoreOrigin)+684) #17 pc 000000000061dd48 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::StoreOrigin)+204) #18 pc 000000000063f6d0 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #19 pc 000000000063ea2c /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>)+148) #20 pc 0000000000729d90 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so (v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>)+244) #21 pc 000000000072cfdc /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so #22 pc 0000000000b668c8 /data/app/com.azradio-bexux3N5FsiUz6236YsIcA==/lib/arm64/libv8android.so
Hello @biomancer did you find any solution for this? We meet the same problem that make us crazy!Any help is appreciate. Thank you
@taschik Since that is native crash, the crash information you provided is not enough for troubleshooting.
Please refer Fabric Crashlytics NDK setup guide to capture native crashes. https://docs.fabric.io/android/crashlytics/ndk.html You may still need to upload external debug symbols from libv8.
The debug symbols for libv8 you could get it from:
wget https://registry.npmjs.org/v8-android/-/v8-android-7.5.1.tgz tar xf v8-android-7.5.1.tgz tar xf package/dist/lib.unstripped/v8-android/7.5.1/libs.tar.xz file {armeabi-v7a,arm64-v8a,x86,x86_64}/libv8.so
For version 11.1000.4, it does not contain lib.unstripped. Where should I get debug symbols?
@Kudo For version 11.1000.4, it does not contain lib.unstripped. Where should I get debug symbols?
Hi,
we rolled out our RN app using v8 and seeing some crashes like the following. Unfortunately, Crashlytics doesn't give us more information so I wanted to ask if anyone has experience with this or seen this before:
Affected Device: Xiaomi Affected OS: Android 9
Our environment is: