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

[Bug] SIGSEGV - FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x<sanitized>) #1008

Closed
shanemccartney opened this issue Apr 29, 2024 · 2 comments

Comments

@shanemccartney
Copy link

Description

We have caught the following issue with Firebase 11.9.0.

Seems to be related to calling this method:
(firebase::storage::internal::ControllerInternal::CppStorageListenerCallback(_JNIEnv*, _jclass*, long, long, _jobject*, unsigned char)+328)

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: 25796 >>> com.theapp <<<

backtrace:
  #00  pc 0x0000000000053324  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180)
  #01  pc 0x000000000005519c  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+124)
  #02  pc 0x00000000000c32bc  /apex/com.android.runtime/lib64/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+60)
  #03  pc 0x00000000000c3140  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+240)
  #04  pc 0x00000000001a44f0  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/lib/arm64/libFirebaseCppApp-11_9_0.so (firebase::Mutex::Acquire()+8)
  #05  pc 0x0000000000249eec  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/lib/arm64/libFirebaseCppApp-11_9_0.so (firebase::storage::MonitorController::EventState::Schedule()+24)
  #06  pc 0x00000000002e6d7c  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/lib/arm64/libFirebaseCppApp-11_9_0.so (firebase::storage::internal::ControllerInternal::CppStorageListenerCallback(_JNIEnv*, _jclass*, long, long, _jobject*, unsigned char)+328)
  #07  pc 0x0000000000351e30  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144)
  #08  pc 0x00000000005b980c  /apex/com.android.art/lib64/libart.so (nterp_helper+3852)
  #09  pc 0x00000000000009fe  /data/user/0/com.theapp/cache/storage_resources_lib.jar (com.google.firebase.storage.internal.cpp.CppStorageListener.onProgress+46)
  #10  pc 0x00000000005ba674  /apex/com.android.art/lib64/libart.so (nterp_helper+7540)
  #11  pc 0x00000000002da364  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/oat/arm64/base.vdex (com.google.firebase.storage.j.a+8)
  #12  pc 0x00000000005ba674  /apex/com.android.art/lib64/libart.so (nterp_helper+7540)
  #13  pc 0x00000000002dcd28  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/oat/arm64/base.vdex (com.google.firebase.storage.TaskListenerImpl.g+4)
  #14  pc 0x00000000005b9854  /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
  #15  pc 0x00000000002dcba8  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/oat/arm64/base.vdex (com.google.firebase.storage.TaskListenerImpl.b)
  #16  pc 0x00000000005b8934  /apex/com.android.art/lib64/libart.so (nterp_helper+52)
  #17  pc 0x00000000002dcaf0  /data/app/~~9ICeL60Py7P7NnP2C5CPxw==/com.theapp-VZwMm3xoikU4Wx0nAPPPXA==/oat/arm64/base.vdex (com.google.firebase.storage.x.run+12)
  #18  pc 0x0000000000ab5e1c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Handler.dispatchMessage+76)
  #19  pc 0x0000000000ab9ac8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loopOnce+1000)
  #20  pc 0x0000000000ab962c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loop+1132)
  #21  pc 0x0000000000864ec4  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.app.ActivityThread.main+2404)
  #22  pc 0x000000000033b680  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640)
  #23  pc 0x000000000037cb18  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1556)
  #24  pc 0x000000000037c4f4  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+32)
  #25  pc 0x00000000003846a8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+120)
  #26  pc 0x0000000000dd32b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
  #27  pc 0x0000000000ddef98  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.os.ZygoteInit.main+3672)
  #28  pc 0x000000000033b680  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640)
  #29  pc 0x00000000004e2a90  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+728)
  #30  pc 0x000000000057aa68  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+156)
  #31  pc 0x00000000000bdcd8  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
  #32  pc 0x00000000000c9c94  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+948)
  #33  pc 0x0000000000002560  /system/bin/app_process64 (main+1280)
  #34  pc 0x000000000004b630  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96)

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

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

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

@shanemccartney shanemccartney changed the title [Bug] FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x<sanitized>) [Bug] SIGSEGV - FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x<sanitized>) Apr 29, 2024
@paulinon
Copy link
Contributor

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.

@paulinon paulinon closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
@firebase firebase locked and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants