[go: nahoru, domu]

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

libc.so Crash after updating to firebase unity sdk 8.6.1/8.6.2 #1193

Closed
AjayC-Bsw opened this issue Nov 27, 2021 · 101 comments
Closed

libc.so Crash after updating to firebase unity sdk 8.6.1/8.6.2 #1193

AjayC-Bsw opened this issue Nov 27, 2021 · 101 comments
Assignees
Labels
api: core needs-info Need information for the developer type: bug

Comments

@AjayC-Bsw
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.4.30f1
  • Firebase Unity SDK version: 8.6.2
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component:
  • Other Firebase Components in use: (Auth, Database, functions, Fcm, .)
  • Additional SDKs you are using: (Facebook, AdMob, etc.)
  • Platform you are using the Unity editor on: Mac
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP

We are getting this crash after after to firebase Unity sdk 8.6.1.

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? Unable to repro
What's the issue repro rate? 1 % user impacted

LOGS:

Crashed: Thread: SIGQUIT  0x0000000000000000
#00 pc 0x1682c libc.so 
#01 pc 0x42673 libc.so 
#02 pc 0x42673 libc.so 
#03 pc 0x1de23 libc.so 
#04 pc 0x42827 libc.so 
#05 pc 0x2637f3 libart.so 
#06 pc 0x43d8fa libart.so 
#07 pc 0x32fe11 libart.so 
#08 pc 0x2a0b6d libart.so 
#09 pc 0x44038e libart.so 
#10 pc 0x65e5e libc.so 
#11 pc 0x43eeae libart.so 
#12 pc 0x440916 libart.so 
#13 pc 0x3d3db5 libart.so 
#14 pc 0xd828f libart.so 

Thread
#00 pc 0x43f84 libc.so 
#01 pc 0x138e4a libFirebaseCppApp-8_6_2.so 

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@paulinon
Copy link
Contributor

Hi @AjayC-Bsw,

In order to identify what's causing this, could you provide a minimal, reproducible example of your project along with the complete steps to replicate the issue? Could you also provide a complete stack trace along with the Firebase product/s used?

@paulinon paulinon added the needs-info Need information for the developer label Nov 29, 2021
@TheEye2108
Copy link
TheEye2108 commented Nov 30, 2021

We are having the same issue. We cant reproduce the bug ourselves, and the crashlytics doesn't give us much info also. The only thing we noticed is that the free memory of the crashed users is below 100MB for some 20MB. Happens on booth 8.6.1/8.6.2.
The crashes happen mostly when the app is put in the background or coming back from one. The thing that comes to mind is a memory leek but we are not sure.
Until this is fixed we will go back to the previous version we where using 8.2.0 since we don't get this crashes on that version.
I hope this additional info whose helpful

@AjayC-Bsw
Copy link
Author

@paulinon Firebase products used - Database, RemoteConfig, Fcm, installation, Crashlytics, Functions, Analytics

Steps to Reproduce -

  1. Enable Don't keep activity on From Device Setting.
  2. Login to Facebook with Chrome ( Uninstall Facebook App from Device )
  3. After facebook Login App Will Restart.

or Same thing Happens with When Rewards Ads comes in Landscape mode.

We are using other crash reporting tools too that is not reporting any crash neither we are getting anything in logcat but Crashlytics shows app crashed.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Dec 2, 2021
@paulinon
Copy link
Contributor
paulinon commented Dec 3, 2021

HI @AjayC-Bsw,

It would be great if you provide a minimal, reproducible example of your project along with the complete steps to replicate your issue. I'm unable to begin my investigation with the provided infromation so far.

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Dec 3, 2021
@jykgod
Copy link
jykgod commented Dec 6, 2021

@paulinon
I have the same issue.Crashing on Android and also havn't see any useful info in the logcat.
unity version 2020.3.20f1
Target Platform: Android
Scripting Runtime: IL2CPP
FirebaseAnalytics 8.6.2 FirebaseMessaging 8.6.2 FirebaseCrashlytics 8.6.2
I found that while ExternalDependencyManager was resolving, it says that some conflicting dependencies were found. But I don`t konw what dependencies are conflicted.
Here is the warning:
WARNING: Some conflicting dependencies were found.
The following dependency versions were modified:
com.android.support:appcompat-v7:25.3.1 --> androidx.appcompat:appcompat:1.1.0
com.android.support:cardview-v7:25.3.1 --> androidx.cardview:cardview:1.0.0
com.android.support:customtabs:25.3.1 --> androidx.browser:browser:1.0.0
com.android.support:support-v4:25.3.1 --> androidx.legacy:legacy-support-v4:1.0.0
com.facebook.android:audience-network-sdk:6.2.1 --> com.facebook.android:audience-network-sdk:+
com.google.ads.mediation:facebook:6.2.0.1 --> com.google.ads.mediation:facebook:6+
com.google.ads.mediation:unity:3.6.2.0 --> com.google.ads.mediation:unity:3+
com.google.android.gms:play-services-ads:20.2.0 --> com.google.android.gms:play-services-ads:+
com.google.android.gms:play-services-base:17.5.0 --> com.google.android.gms:play-services-base:+
com.google.android.gms:play-services-base:17.6.0 --> com.google.android.gms:play-services-base:+
com.google.firebase:firebase-analytics:19.0.0 --> com.google.firebase:firebase-analytics:+
com.google.firebase:firebase-common:20.0.0 --> com.google.firebase:firebase-common:+
com.google.firebase:firebase-crashlytics-ndk:18.2.4 --> com.google.firebase:firebase-crashlytics-ndk:+
com.google.firebase:firebase-iid:21.1.0 --> com.google.firebase:firebase-iid:+
com.google.firebase:firebase-messaging:22.0.0 --> com.google.firebase:firebase-messaging:+

@google-oss-bot
Copy link

Hey @AjayC-Bsw. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot google-oss-bot added the stale Don't have recent activity label Dec 13, 2021
@MiketoString
Copy link
MiketoString commented Dec 14, 2021

We saw the same crash issue in our game after updating to 8.6.1/8.6.2 and needed to revert to the version we had previously integrated (8.1.0) in order to resolve.

Similar to others, we were not able to repro the crash on test devices but it was occurring for 1% of players when live which would put us above the bad behavior threshold.

Unity version 2019.4.30

@google-oss-bot google-oss-bot removed the stale Don't have recent activity label Dec 14, 2021
@tienhagioi
Copy link

Any news ? It was occurring for about 26% of all crashs in my app . All I know is this issue happens when low RAM free ( < 200mb , sometime 200-500mb ) . No problem with ver 8.1.0 , 8.2.0
Unity 2020.3.15
Capture

@yingnierxiao
Copy link

yes. I find it write log and crash

@AjayC-Bsw
Copy link
Author

yes. I find it write log and crash

@yingnierxiao Please share your findings.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Dec 17, 2021
@hgonzalezsgn
Copy link

Guys,

  • Same issue here when updating to Firebase 8.6.2 ( Firebase Core SDK 8.6.2, FirebaseAnalytics 8.6.2, FirebaseCrashlytics 8.6.2 )
  • Unable to repro like the others but as you can see happens.

Screen Shot 2021-12-17 at 09 09 23

@paulinon
Copy link
Contributor

Hi @AjayC-Bsw and other folks in the thread,

Version 8.7.0 of the SDK has been released recently. Could you try this out and see if it resolves the issue?

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Dec 17, 2021
@CodeMasterYi
Copy link

Same Here!
Unity v2018.4.36f1
Firebase Crashlytics 9.4.0 for Unity

@CodeMasterYi
Copy link

Guys, you really need to fix it...

@AnnMic
Copy link
AnnMic commented Sep 9, 2022

I have had this crash for a while now and followed this thread. Not sure if it helps but this is what I have figured out so far.

By using logs in the game I have been able to track down where it is happening. And for all users that experiences this crash, the last line that is executed in my game is this:

docRef.SetAsync(UserState).ContinueWithOnMainThread(task =>{...}

Just before this line I have a log that is always triggered, and inside the response is another log that never gets called if they experience the crash.

The "docRef.SetAsync" is called when users do certain things in the game (complete levels, buy coins, during startup etc). The crash happens sporadically, sometimes during syncing user state on startup, sometimes when they have played 100 levels, meaning 99 calls works just fine but then all of a sudden it does not.

  • I might be wrong, but I think this crash starts to happen once the user state becomes bigger, I very rarely see it on new users.
  • I also pushed a build to production with firebase.verbose logging turned on. This did not result in any new information.
  • I can not reproduce this on test devices.
  • It does not happen in the background, the amount of support emails on this tells me otherwise.

Dependencies in the game:

  • Facebook, Firebase (analytics, messaging, crashlytics, remote configs, Firestore), AppLovin Max
  • using EDM, version 1.2.172
  • No custom gradle
  • Unity 2021.3.9f1 (but have tried 2020.x as well and same issue)

Attached crashlogs I see on Google play.
google_play_crash_log_1.txt
google_play_crash_log_2.txt

@tracer8
Copy link
tracer8 commented Sep 9, 2022 via email

@zeegfa
Copy link
zeegfa commented Sep 17, 2022

we are using version 9.5.0, the problem continues. Until this is fixed we will go back to the previous version we were using 7.2.0 since we don't get these crashes on that version.

@a-maurice
Copy link
Contributor

Hi all,

We are still looking into any underlying problems there might be, but after doing some investigation there is some clarification needed. The 8.6.1 version of Crashlytics added support on Android for collecting NDK crash reports in native libraries, with more information located here: https://firebase.google.com/docs/crashlytics/get-started?platform=unity#set-up-symbol-uploading

The reason that these crashes started getting reported with this version is likely not a bug caused by this version, but instead these crashes were already happening, but were going unreported prior to that release. We are working on improving these crash reports, so that there is more clarity on what the problem is beyond the vague reports that are more likely to occur.

@a-maurice a-maurice assigned a-maurice and unassigned jonsimantov Sep 19, 2022
@nronaldvdberg
Copy link
nronaldvdberg commented Sep 29, 2022

Some users of my app who experience crashes have reported to me that the app is using an insane amount of memory on their devices (>800MB, while in my own tests the usage rarely exceeds 200MB on my own - crash free - Android devices).

Could the core of the problem be a memory leak -- which for some reason only exists on specific devices?

@zeegfa
Copy link
zeegfa commented Sep 29, 2022

Hi all,

We are still looking into any underlying problems there might be, but after doing some investigation there is some clarification needed. The 8.6.1 version of Crashlytics added support on Android for collecting NDK crash reports in native libraries, with more information located here: https://firebase.google.com/docs/crashlytics/get-started?platform=unity#set-up-symbol-uploading

The reason that these crashes started getting reported with this version is likely not a bug caused by this version, but instead these crashes were already happening, but were going unreported prior to that release. We are working on improving these crash reports, so that there is more clarity on what the problem is beyond the vague reports that are more likely to occur.

For your information 9.6.0, the problem continues.

"We are working on improving these crash reports"

Are you sure?

@zeegfa
Copy link
zeegfa commented Sep 29, 2022

Some users of my app who experience crashes have reported to me that the app is using an insane amount of memory on their devices (>800MB, while in my own tests the usage rarely exceeds 200MB on my own - crash free - Android devices).

Could the core of the problem be a memory leak -- which for some reason only exists on specific devices?

It might be interesting to see attached image
000

@a-maurice
Copy link
Contributor

For the users that are seeing issues with Firestore, and running out of memory, what type of data are you trying to set? Like, how large is the data set, what type of information, etc.

Based on the crash logs from @AnnMic it is running out of jni global memory, and it seems like it has a high number of java longs and hashmaps. We've been able to produce a similar crash on our end by pushing a map with 60,000 entries, and are investigating ways for it to use less global memory while doing so.

@AnnMic
Copy link
AnnMic commented Oct 13, 2022

@a-maurice Sorry thought I would get a notification once something happened in the thread...

I can also reproduce this issue now and have a user state which always creates an android crash. Yes the issue seems to be having a large dictionary with data. But my dictionary only has 170 elements but can go six levels deep in worst case so it can include quite a lot of elements. Also it can potentially include a lot of strings. Since it's a word game, and currently it stores found words as strings on unfinished puzzles.

I made a workaround (something that should probably have been there from the beginning but anyway). Removing the dictionary and instead it becomes a "Collection" at top user level on Firestore, the states inside the dictionary each becomes its own "Document" instead. It then no longer updates the full dictionary, but rather smaller documents.

@Mecze
Copy link
Mecze commented Oct 16, 2022

Hello!

Nobody answered this:

Hi folks,

Seems like the common theme here is

  1. On Android
  2. When other plugins, ex. Facebook, are in use
  3. After Firebase 8.6.1

This thread seem to mixed with different issues. We need your help to sort this out. Please answer the following questions

  1. Are all points above true to you?
  2. Are you able to reproduce it locally, or using this testapp? If so, please share additional logs (adb logcat) which provides may provide more insights about the crash location. Seems like those info on Crashlytics is not detailed enough.
  3. Are you using other plugins in your project? You can find out what other plugins are using EDM4U to resolve dependencies through Assets > External Dependency Manager > Android Resolver > Display Libraries. You can see what other Dependencies.xml are in your project.
  4. Are you using mainTemplate.gradle, a.k.a. Custom Gradle Template?
  5. Did you see any error or warning when force resolve? That is, Assets > External Dependency Manager > Android Resolver > Force Resolve. Did you see any conflict like what @jykgod mentioned in libc.so Crash after updating to firebase unity sdk 8.6.1/8.6.2 #1193 (comment)?
  6. Does it crash every time? What's the timing. ex. at launch or at killed? Before crash, does Firebase API function properly to you?

Thank you! Shawn

  1. Yes, Android, After 8.6.1 and other plugins are in place (See below)
  2. No, we could not repro the problem (yet)
  3. Yes we are using other plugins. Here:
implementation 'androidx.appcompat:appcompat:1.1.0' // Assets/Amazon/Scripts/Editor/AmazonDependencies.xml:4
implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.1' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12
implementation 'androidx.lifecycle:lifecycle-process:2.4.1' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:17
implementation 'com.amazon.android:aps-admob-adapter:2.0.3' // Assets/Amazon/Scripts/Mediations/AdMobMediation/Editor/AmazonAdMobDependencies.xml:8
implementation 'com.amazon.android:aps-sdk:9.5.4@aar' // Assets/Amazon/Scripts/Editor/AmazonDependencies.xml:10
implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.facebook.android:facebook-applinks:[14.1, 15)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:6
implementation 'com.facebook.android:facebook-core:[14.1, 15)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:5
implementation 'com.facebook.android:facebook-gamingservices:[14.1, 15)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:9
implementation 'com.facebook.android:facebook-login:[14.1, 15)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:7
implementation 'com.facebook.android:facebook-share:[14.1, 15)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:8
implementation 'com.google.ads.mediation:adcolony:4.8.0.0' // Assets/GoogleMobileAds/Editor/AdColonyMediationDependencies.xml:8
implementation 'com.google.ads.mediation:applovin:11.4.4.0' // Assets/GoogleMobileAds/Editor/AppLovinMediationDependencies.xml:8
implementation 'com.google.ads.mediation:facebook:6.11.0.1' // Assets/GoogleMobileAds/Editor/MetaAudienceNetworkMediationDependencies.xml:8
implementation 'com.google.ads.mediation:fyber:8.1.3.1' // Assets/GoogleMobileAds/Editor/FyberMediationDependencies.xml:8
implementation 'com.google.ads.mediation:inmobi:10.0.7.0' // Assets/GoogleMobileAds/Editor/InMobiMediationDependencies.xml:8
implementation 'com.google.ads.mediation:ironsource:7.2.3.1.0' // Assets/GoogleMobileAds/Editor/IronSourceMediationDependencies.xml:8
implementation 'com.google.ads.mediation:tapjoy:12.10.0.1' // Assets/GoogleMobileAds/Editor/TapjoyMediationDependencies.xml:8
implementation 'com.google.ads.mediation:unity:4.3.0.0' // Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:9
implementation 'com.google.android.gms:play-services-ads:21.0.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
implementation 'com.google.android.gms:play-services-ads-lite:20.0.0' // Assets/Amazon/Scripts/Editor/AmazonDependencies.xml:5
implementation 'com.google.android.gms:play-services-base:18.1.0' // Assets/Firebase/Editor/AppDependencies.xml:17
implementation 'com.google.firebase:firebase-analytics:21.1.0' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:15
implementation 'com.google.firebase:firebase-analytics-unity:9.4.0' // Assets/Firebase/Editor/AnalyticsDependencies.xml:18
implementation 'com.google.firebase:firebase-app-unity:9.4.0' // Assets/Firebase/Editor/AppDependencies.xml:22
implementation 'com.google.firebase:firebase-common:20.1.1' // Assets/Firebase/Editor/AppDependencies.xml:13
implementation 'com.google.firebase:firebase-config:21.1.1' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:13
implementation 'com.google.firebase:firebase-config-unity:9.4.0' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:20
implementation 'com.google.firebase:firebase-crashlytics-ndk:18.2.12' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:13
implementation 'com.google.firebase:firebase-crashlytics-unity:9.4.0' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:20
implementation 'com.parse.bolts:bolts-android:1.4.0' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:4
implementation 'com.unity3d.ads:unity-ads:4.3.0' // Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:17
  1. Yes we use mainTemplate.gradle
  2. No (just checked again), Force Resolve went ok, no problems or warnings. EDM4U: 1.2.172
  3. It happens to 1/3 of the Android 12 users! We cannot repro, so we don't know exactly where on the app.

More Info: we use Crashlytics, Analytics and RemoteConfig Only (9.4.0)
Unity 2020.1.15f2 - Admob 7.2.0 - Facebook SDK 14.1.0

Thanks

@BSFBP
Copy link
BSFBP commented Oct 17, 2022

It will not fix anytime soon. I don't have faith with them. Ah let mention another thing, on Unity's latest LTS version, on an EMPTY android project, building apk fails if you just import Firebase and Admob's latest version and try to building it on an empty scene. You need to fix it by yourself! Great guys!

Seems like development teams behind Firebase Unity and Admob Unity don't care each other, and they don't even bother testing them together.
Thanks Google. For laughably bad plugins...

@CodeMasterYi
Copy link

It will not fix anytime soon. I don't have faith with them. Ah let mention another thing, on Unity's latest LTS version, on an EMPTY android project, building apk fails if you just import Firebase and Admob's latest version and try to building it on an empty scene. You need to fix it by yourself! Great guys!

Seems like development teams behind Firebase Unity and Admob Unity don't care each other, and they don't even bother testing them together. Thanks Google. For laughably bad plugins...

Emmm... I think you may need create another issue for this.

@a-maurice
Copy link
Contributor

Yes, if you have other issues, please file new bugs for them to be tracked. For these crashes, any logs or callstacks that indicate where the problem continue to be useful. We've identified one problem in Firestore that we will have a solutions to soon, but that was an issue specific to Firestore, and thus won't help for the problems folks are seeing when not including it (like the ones seeing it with just Crashlytics, Analytics, and Remote Config).

@steve6t6
Copy link

Hi all, so an update from my company, we updated Unity to 2021.3.9f1 and we still run Firebase SDK 9.0.0 and now that our latest build has had time to propagate our crash rate has finally dropped back under the bad behaviour threshold. Clearly our (My Company's) issue was Unity related, this may not be the case for others, but felt we should update this thread.

@a-maurice
Copy link
Contributor

For those of you that were having problems with Firestore, the latest release (https://github.com/firebase/firebase-unity-sdk/releases/tag/v10.1.0) has a fix to reduce the amount of global JNI references it uses, which will hopefully alleviate the problems that some of you all were having. We are still trying to look into more improvements to do there, as it is still possible to hit the limit of references with extremely large sets of data. We are aware that some of you are having problems not related to Firestore, and if you have any logs or callstacks that can help narrow down those problems, that would be appreciated.

@dconeybe
Copy link

FYI the Firebase Unity SDK v10.1.0 was released on November 7, 2022 and includes firebase/firebase-cpp-sdk#1111, which reduces the number of global references consumed by Firestore by about 50%. This will hopefully address many cases of the "global reference table overflow" crash, such as the one reported by @AnnMic in the previous comment #1193 (comment). A full and proper fix is in development, but it is complex and is taking time to implement. Note that this won't necessarily fix all of the "libc.so crash" issues, but is at least one of them.

@a-maurice
Copy link
Contributor

This issue is a bit complicated to follow, due to multiple different issues being discussed. I have opened some other issues to track down the problems that have been identified in here. If you have information about those crashes, please use those issues, or if you have a different issue, open a new issue so that it can be discussed from a fresh point of view.

@nronaldvdberg
Copy link
nronaldvdberg commented Dec 12, 2022

Hi @a-maurice! I would like to keep following the discussions about this issue / issues (it's not solved for us yet), but I don't see any recently opened ones by you. Can you put links to those issues here? Thanks.

@a-maurice
Copy link
Contributor

@nronaldvdberg Ah, sorry.

Firestore related crash: firebase/firebase-unity-sdk#569
Crashlytics/Analytics/Remote Config related crash: firebase/firebase-unity-sdk#570

Those were the two that I could identify based on the reports, but it is possible that there are different ones. The libc crash is a very generic "there was a problem on the C++ side" error, which is why I'd like to split them out into different issues if at all possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: core needs-info Need information for the developer type: bug
Projects
None yet
Development

No branches or pull requests