EsxFramebufferObject::DetachAll Segfault Crash for Android 9
See original GitHub issueSo we’re seeing this Segfault crash showing up in Google Play Console.
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
/vendor/lib64/egl/libGLESv2_adreno.so (EsxFramebufferObject::DetachAll(EsxContext*)+56
The crash happens inside libGLESv2_adreno which is a lib that does OpenGL for Embedded Systems running on an Adreno GPU which is a Qualcomm-only GPU… It primarily affects Android 9 Devices with the Adreno GPU.
I don’t know for certain that it’s a mapbox issue, but our app primarily deals with mapping, and I also found this issue in mapbox library, which is nearly the same (except I can’t find a repro): https://github.com/mapbox/mapbox-gl-native-android/issues/264
I was hoping upgrading packages and react native would solve the problem, but the crash remains, undisturbed by our upgrades.
Here’s an example from a bug report on Sentry:
Architecture | arm64-v8a
Brand | lge
Kernel Version | 4.9.112-perf+
Name | Android
Version | 9(PKQ1.190202.001)
Model | LM-V405 (PKQ1.190202.001)
Model Id | PKQ1.190202.001
Name | LGE LM-V405
OS Version: Android 9 (PKQ1.190202.001)
Report Version: 104
Exception Type: Unknown (SIGSEGV)
Application Specific Information:
Segfault
Thread 0 Crashed:
0 libGLESv2_adreno.so 0x70ab1e44c4 EsxFramebufferObject::DetachAll
1 libGLESv2_adreno.so 0x70ab089784 EglContext::UnmakeCurrentEsx
2 libGLESv2_adreno.so 0x70ab23fdc8 EglContext::UnmakeCurrent
3 libGLESv2_adreno.so 0x70ab08a4c0 EglThreadList::SearchCurrentDisplayAndUnmake
4 libGLESv2_adreno.so 0x70ab089eac EglDisplay::Terminate
5 libGLESv2_adreno.so 0x70ab083ac8 EglApi::Terminate
6 libEGL.so 0x713ef60148 android::egl_display_t::terminate
7 libgui.so 0x71421c2370 android::GLConsumer::EglImage::~EglImage
8 libgui.so 0x71421c21b4 android::GLConsumer::abandonLocked
9 libgui.so 0x71421b8498 android::ConsumerBase::onLastStrongRef
10 libandroid_runtime.so 0x71429feddc <unknown> + 486449081820
11 boot-framework.oat 0x724542a0 <unknown> + 1917141664
Reproducible?
I’ve never experienced it personally, and haven’t found a way to reproduce this because the only way we can tell this is an issue is because of Google Play Console and Sentry… We haven’t had a user report that the app is crashing in a reproducible way, but this bug is putting us over the Bad Behavior threshold with Google. We’ve got hundreds of users a month with this crash.
Screenshots
Versions:
Platform: Andoid
Platform OS: Android 9
Devices:
- Samsung Galaxy S8
- LGE LG Stylo 5
- LGE LG G7 ThinQ
- Motorola Moto Z(3)
- Kyocera DuraForce PRO 2 with Sapphire shield
- Plus anything else that has libGLESv2_adreno.so
Emulator/ Simulator: no react-native-mapbox-gl: 8.1.0 (But has existed since we used ~7.0.0 and possibly lower) React Native Version: 0.63.4 (But has existed since we used 0.61.5 and possibly lower)
Additional context
Breakdown of android versions affected:
85.93% | Android 9
4.53% | Android 8.1.0
3.91% | Android 7.1.2
2.62% | Android 10
1.19% | Android 11
0.81% | Android 7.1.1
0.81% | Android 8.0.0
0.14% | Android 7.0
0.05% | Android 6.0.1
Device + how many times it’s occurred recently:
SM-G950U | 307
E6910 | 193
SM-G955U | 164
moto | 148
SM-G892A | 144
LGL722DL | 136
LM-G710VM | 119
E6810 | 76
LM-Q720 | 71
Nokia | 65
LM-Q710(FGN) | 55
SM-N950U | 55
LM-X420 | 51
SM-G960U | 39
...
Here’s a full backtrace of an error from Google Play Console:
backtrace:
#00 pc 000000000012b150 /vendor/lib64/egl/libGLESv2_adreno.so (EsxFramebufferObject::DetachAll(EsxContext*)+56)
#00 pc 00000000001fdf64 /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrentEsx()+308)
#00 pc 00000000001fddd8 /vendor/lib64/egl/libGLESv2_adreno.so (EglContext::UnmakeCurrent()+128)
#00 pc 00000000001feda0 /vendor/lib64/egl/libGLESv2_adreno.so (EglThreadList::SearchCurrentDisplayAndUnmake(EglDisplay*)+224)
#00 pc 00000000001fe980 /vendor/lib64/egl/libGLESv2_adreno.so (EglDisplay::Terminate(int)+168)
#00 pc 00000000001f4b3c /vendor/lib64/egl/libGLESv2_adreno.so (EglApi::Terminate(void*)+84)
#00 pc 0000000000011144 /system/lib64/libEGL.so (android::egl_display_t::terminate()+128)
#00 pc 000000000006f3fc /system/lib64/libgui.so (android::GLConsumer::EglImage::~EglImage()+80)
#00 pc 000000000006f240 /system/lib64/libgui.so (android::GLConsumer::abandonLocked()+68)
#00 pc 0000000000065524 /system/lib64/libgui.so (android::ConsumerBase::onLastStrongRef(void const*)+48)
#00 pc 0000000000162224 /system/lib64/libandroid_runtime.so (android::SurfaceTexture_release(_JNIEnv*, _jobject*)+80)
#00 pc 00000000003ed29c /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.graphics.Camera.nativeConstructor [DEDUPED]+124)
#00 pc 0000000000816138 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.graphics.SurfaceTexture.release+40)
#00 pc 0000000000d1efbc /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.TextureView.releaseSurfaceTexture+252)
#00 pc 0000000000d1fad8 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.TextureView.onDetachedFromWindowInternal+248)
#00 pc 0000000000c6cf10 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.View.dispatchDetachedFromWindow+192)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000d26e20 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewGroup.dispatchDetachedFromWindow+240)
#00 pc 0000000000c9e3b8 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewRootImpl.dispatchDetachedFromWindow+184)
#00 pc 0000000000c9eac8 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewRootImpl.doDie+120)
#00 pc 0000000000c9dde4 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.ViewRootImpl.die+68)
#00 pc 0000000000ba8214 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.WindowManagerGlobal.removeViewLocked+308)
#00 pc 0000000000ba9a3c /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.WindowManagerGlobal.removeView+684)
#00 pc 0000000000d32c24 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.view.WindowManagerImpl.removeViewImmediate+68)
#00 pc 00000000008a3624 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.ActivityThread.handleDestroyActivity+324)
#00 pc 0000000000aae958 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.servertransaction.DestroyActivityItem.execute+136)
#00 pc 000000000079a4a0 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.servertransaction.TransactionExecutor.executeLifecycleState+416)
#00 pc 000000000079ab30 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.servertransaction.TransactionExecutor.execute+304)
#00 pc 000000000088ff14 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.ActivityThread$H.handleMessage+788)
#00 pc 0000000000acdf14 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.os.Handler.dispatchMessage+180)
#00 pc 0000000000ad1080 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.os.Looper.loop+1376)
#00 pc 000000000089d3e8 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (android.app.ActivityThread.main+664)
#00 pc 000000000055664c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#00 pc 00000000000cf714 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#00 pc 000000000045da80 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#00 pc 000000000045f4d4 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
#00 pc 00000000003ef3ec /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
#00 pc 000000000011e6d4 /system/framework/arm64/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
#00 pc 0000000000dedbb8 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
#00 pc 0000000000df4784 /system/framework/arm64/boot-framework.oat (offset 0x3e4000) (com.android.internal.os.ZygoteInit.main+2340)
#00 pc 000000000055664c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#00 pc 00000000000cf714 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#00 pc 000000000045da80 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#00 pc 000000000045d6e0 /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
#00 pc 00000000003623a0 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
#00 pc 00000000000b59ac /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116)
#00 pc 00000000000b8430 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+752)
#00 pc 000000000000251c /system/bin/app_process64 (main+2000)
#00 pc 00000000000cb194 /system/lib64/libc.so (__libc_init+88)
Here’s some links to some similar issues: https://github.com/mapbox/mapbox-gl-native-android/issues/264 https://developer.qualcomm.com/forum/qdn-forums/maximize-hardware/mobile-gaming-graphics-adreno/28489 https://developer.qualcomm.com/forum/qdn-forums/software/adreno-gpu-sdk/67924
And I’ve posted on stack overflow, but no help so far: https://stackoverflow.com/questions/66793213/esxframebufferobjectdetachallesxcontext-segfault-crash-in-react-native-proj
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (5 by maintainers)
Top GitHub Comments
Maybe this helps as a mental model:
So underneath, this lib uses native mobile mapbox SDKs for iOS (mapbox/mapbox-gl-native-ios) and Android (mapbox/mapbox-gl-native-android), which in turn use an even “nativer” core library for all the fancy 3d stuff (mapbox/mapbox-gl-native). The modern world of programming is a world of abstractions…
After some drama with licensing and such, mapbox chose to close source some of their offerings.
MapLibre people took that opportunity to fork off from the then last open snapshot of Mapbox.
Therefore MapLibre is in the end a drop-in replacement for the previous mapbox SDKs.
Yes, that’s the suggestion - no worries, it shouldn’t be that hard, basically just pointing your androids dependency management to another source.
True, they might not have a fix for your current problem at hand. However, having said that, you can have a look at this ticket in our repo (https://github.com/react-native-mapbox-gl/maps/issues/1350) where someone is asking about an iOS crash which was not fixed in the mapbox repo, but fixed in the maplibre repo.
So your best chances of having a native issue/ bug/ crash fixed upstream are with maplibre, as mapbox is not really maintaining their mobile SDK that aren’t the new v10 version.
Cheers
Closing this as “fixed” 😅