firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
195 stars 31 forks source link

[Bug] SIGSEGV - firebase::Mutex::Acquire() #1007

Closed shanemccartney closed 2 weeks ago

shanemccartney commented 2 weeks ago

Description

We have caught the following issue with Firebase 11.9.0.

It seems to be related to using this method: [libFirebaseCppApp-11_9_0.so] firebase::storage::internal::ControllerInternal::CppStorageListenerCallback(_JNIEnv, _jclass, long, long, _jobject*, unsigned char)

Reproducing the issue

This does not seem to affect all users so far it seems to affect lower end Android devices like the Lenovo TB310FU with Android 13 (SDK 33)

Firebase Unity SDK Version

11.9.0

Unity editor version

2021.3.33f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Database

Other Firebase Component(s) in use

Analytics, Authentication, Crashlytics, DynamicLinks, Remote Config, Storage

Additional SDKs you are using

No response

Targeted Platform(s)

Android

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 9835 >>> com.theapp <<<

backtrace:
  #00  pc 0x00000000000f4bb4  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+8)
  #01  pc 0x00000000001a44f0  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/lib/arm64/libFirebaseCppApp-11_9_0.so (firebase::Mutex::Acquire()+8)
  #02  pc 0x0000000000249eec  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/lib/arm64/libFirebaseCppApp-11_9_0.so (firebase::storage::MonitorController::EventState::Schedule()+24)
  #03  pc 0x00000000002e6d7c  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/lib/arm64/libFirebaseCppApp-11_9_0.so (firebase::storage::internal::ControllerInternal::CppStorageListenerCallback(_JNIEnv*, _jclass*, long, long, _jobject*, unsigned char)+328)
  #04  pc 0x000000000013ded4  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148)
  #05  pc 0x00000000001347e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
  #06  pc 0x0000000000198eb0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #07  pc 0x000000000030c254  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376)
  #08  pc 0x00000000003083dc  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+696)
  #09  pc 0x0000000000641070  /apex/com.android.art/lib64/libart.so (MterpInvokeStaticRange+412)
  #10  pc 0x000000000012ec94  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static_range+20)
  #11  pc 0x00000000000009fe  /data/user/0/com.theapp/cache/storage_resources_lib.jar (com.google.firebase.storage.internal.cpp.CppStorageListener.onProgress+46)
  #12  pc 0x000000000063cca4  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1840)
  #13  pc 0x000000000012ea14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20)
  #14  pc 0x00000000002a718e  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/oat/arm64/base.vdex (com.google.firebase.storage.j.a+8)
  #15  pc 0x000000000063cca4  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1840)
  #16  pc 0x000000000012ea14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20)
  #17  pc 0x00000000002a8ea8  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/oat/arm64/base.vdex (com.google.firebase.storage.TaskListenerImpl.f+4)
  #18  pc 0x000000000063d838  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1164)
  #19  pc 0x000000000012e914  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20)
  #20  pc 0x00000000002a8d8e  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/oat/arm64/base.vdex (com.google.firebase.storage.TaskListenerImpl.c)
  #21  pc 0x000000000063e098  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1120)
  #22  pc 0x000000000012e994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20)
  #23  pc 0x00000000002a8d6a  /data/app/~~zk3_Csoou8hgVI-psSYL-g==/com.theapp-qRzW1xQAuD2NFUDsOk1iiw==/oat/arm64/base.vdex (com.google.firebase.storage.z.run+12)
  #24  pc 0x00000000002fed48  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.10271544356895037650)+268)
  #25  pc 0x0000000000629a84  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+796)
  #26  pc 0x000000000013dff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88)
  #27  pc 0x00000000006b467c  /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76)
  #28  pc 0x00000000006b7bdc  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1516)
  #29  pc 0x00000000004542b0  /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+768)
  #30  pc 0x00000000001347e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
  #31  pc 0x0000000000198eb0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #32  pc 0x0000000000532198  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #33  pc 0x0000000000533e8c  /apex/com.android.art/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1352)
  #34  pc 0x00000000004b5438  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
  #35  pc 0x000000000008a6f4  /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+180)
  #36  pc 0x0000000000ae9d48  /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
  #37  pc 0x0000000000af3d2c  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2444)
  #38  pc 0x00000000001347e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
  #39  pc 0x0000000000198eb0  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #40  pc 0x0000000000532198  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #41  pc 0x0000000000531d90  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+428)
  #42  pc 0x0000000000532cf8  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92)
  #43  pc 0x00000000004249f4  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+656)
  #44  pc 0x000000000009b434  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124)
  #45  pc 0x00000000000a3640  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+848)
  #46  pc 0x000000000000358c  /system/bin/app_process64 (main+1348)
  #47  pc 0x0000000000088170  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108)

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
```yml 👀 Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 2 weeks ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

paulinon commented 2 weeks ago

Hi @shanemccartney,

I noticed that this issue is similar to #1006 where Cloud Storage for Firebase appears to be present in your error logs. That said, I'll be closing this ticket so that all discussions can be contained in the aforementioned ticket.