mParticle / mparticle-android-sdk

mParticle SDK for Android apps
http://www.mparticle.com
Other
58 stars 62 forks source link

SQLite ANR #267

Closed ericntd closed 1 year ago

ericntd commented 1 year ago
Screen Shot 2022-11-07 at 10 19 04 AM

Since we released our app version 6.13.3 containing mParticle upgrade to 5.47.4. last week Nov 4th, ANRs have spike affecting thousands of our users. I personally get 1 ANR every time I log in to the app

The stacktrace looks like what we saw last year but I don't now if it's regression of the same issue or not:

at jdk.internal.misc.Unsafe.park (Unsafe.java)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:234)
  at android.database.sqlite.SQLiteConnectionPool.waitForConnection (SQLiteConnectionPool.java:756)
  at android.database.sqlite.SQLiteConnectionPool.acquireConnection (SQLiteConnectionPool.java:380)
  at android.database.sqlite.SQLiteSession.acquireConnection (SQLiteSession.java:896)
  at android.database.sqlite.SQLiteSession.prepare (SQLiteSession.java:588)
  at android.database.sqlite.SQLiteProgram.<init> (SQLiteProgram.java:62)
  at android.database.sqlite.SQLiteQuery.<init> (SQLiteQuery.java:37)
  at android.database.sqlite.SQLiteDirectCursorDriver.query (SQLiteDirectCursorDriver.java:46)
  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory (SQLiteDatabase.java:1546)
  at android.database.sqlite.SQLiteDatabase.queryWithFactory (SQLiteDatabase.java:1393)
  at android.database.sqlite.SQLiteDatabase.query (SQLiteDatabase.java:1264)
  at android.database.sqlite.SQLiteDatabase.query (SQLiteDatabase.java:1432)
  at com.mparticle.x.a (SourceFile:25)
  at com.mparticle.s0.b (SourceFile:6)
  at com.mparticle.d0.c (SourceFile:4)
  at com.mparticle.d0.a (SourceFile:364)
  at com.mparticle.internal.j.a (SourceFile:296)
  at com.mparticle.identity.b.b (SourceFile:1)
  at com.mparticle.identity.c.getUserAttributes (SourceFile:1)
  at com.mparticle.kits.FilteredMParticleUser.getUserAttributes (FilteredMParticleUser.java:59)
  at com.mparticle.kits.GoogleAnalyticsFirebaseKit.onIdentifyCompleted (GoogleAnalyticsFirebaseKit.kt:103)
  at com.mparticle.kits.KitManagerImpl.onIdentifyCompleted (KitManagerImpl.java:1241)
  at com.mparticle.internal.d.onIdentifyCompleted (SourceFile:2)
  at com.mparticle.identity.IdentityApi$c.a (SourceFile:2)
  at com.mparticle.identity.IdentityApi$f$a.run (SourceFile:1)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:241)
  at android.os.Looper.loop (Looper.java:358)
  at android.app.ActivityThread.main (ActivityThread.java:8068)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1009)

The versions:

def mparticle = [
        appsflyer: "com.mparticle:android-appsflyer-kit:5.47.4",
        leanplum : "com.mparticle:android-leanplum-kit:5.47.4",
        firebase : "com.mparticle:android-googleanalyticsfirebase-kit:5.47.4"
]
chad-cmb commented 1 year ago

This has escalated quickly - to over 15k users. Is there a work around to force background execution? So we have to enforce background calling on our end?

mmustafa-tse commented 1 year ago

Hi @ericntd and @chad-cmb,

Per the support ticket we have open, were you able to test the latest version which should include the fix with v5.48.2?

ericntd commented 1 year ago

Hi @mmustafa-tse , yes, i can confirm that the ANRs have died down thanks to v5.48.2 5.48.2 does create a new crash for us as mentioned in support email thread though Let us know if want another issue opened here

samdozor commented 1 year ago

This looks to have been resolved. If there is a different crash, please open a separate/specific issue for it. Thank you!