firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.23k stars 565 forks source link

SQLiteEventStore.lambda$ensureBeginTransaction$24: android.database.sqlite.SQLiteDatabaseLockedException - database is locked (code 5 SQLITE_BUSY[5]) #6021

Closed lklong1551019 closed 5 days ago

lklong1551019 commented 2 weeks ago

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

As for https://github.com/firebase/firebase-android-sdk/issues/6001, after updating to bom 33.1.0 we still experiencing this crash, here is example stack trace:

Fatal Exception: com.google.android.datatransport.runtime.synchronization.SynchronizationException
Timed out while trying to acquire the lock.
 Fatal Exception: com.google.android.datatransport.runtime.synchronization.SynchronizationException: Timed out while trying to acquire the lock.
       at com.google.android.datatransport.runtime.synchronization.SynchronizationException.<init>(SynchronizationException.java:20)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$ensureBeginTransaction$25(SQLiteEventStore.java:759)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked(SQLiteEventStore.java:585)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.ensureBeginTransaction(SQLiteEventStore.java:753)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.runCriticalSection(SQLiteEventStore.java:766)
       at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader.logAndUpdateState(Uploader.java:164)
       at com.google.android.datatransport.runtime.ForcedSender.sendBlocking(ForcedSender.java:36)
       at com.google.firebase.crashlytics.internal.send.ReportQueue.lambda$flushScheduledReportsIfAble$0(ReportQueue.java:138)
       at java.lang.Thread.run(Thread.java:1012)

Caused by android.database.sqlite.SQLiteDatabaseLockedException
database is locked (code 5 SQLITE_BUSY[5])
Caused by android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY[5])
       at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:972)
       at android.database.sqlite.SQLiteSession.beginTransactionUnchecked(SQLiteSession.java:325)
       at android.database.sqlite.SQLiteSession.beginTransaction(SQLiteSession.java:300)
       at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:788)
       at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:698)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$ensureBeginTransaction$24(SQLiteEventStore.java:755)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked(SQLiteEventStore.java:582)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.ensureBeginTransaction(SQLiteEventStore.java:753)
       at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.runCriticalSection(SQLiteEventStore.java:766)
       at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader.logAndUpdateState(Uploader.java:164)
       at com.google.android.datatransport.runtime.ForcedSender.sendBlocking(ForcedSender.java:36)
       at com.google.firebase.crashlytics.internal.send.ReportQueue.lambda$flushScheduledReportsIfAble$0(ReportQueue.java:138)
       at java.lang.Thread.run(Thread.java:1012)
image image image

We cannot reproduce, any insight is appreciated, thanks.

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.

lehcar09 commented 2 weeks ago

Hi @lklong1551019, thank you for filing the issue. I tried to reproduce the issue with the latest Firebase SDK version, but I still can't reproduce the issue. I'll check in with our engineers about this issue and get back to you. Thanks!

lklong1551019 commented 2 weeks ago

Thank you, I would like to add current status of this issue and I'm waiting for updates from you.

image
lehcar09 commented 2 weeks ago

According to our Engr, we have a fix for this issue and it will be included in the next release. We'll let you know when the fix is released. Thanks!

lklong1551019 commented 2 weeks ago

thank you, it's nice to hear that. We're waiting for the fix, cheers!

Arumankumang commented 1 week ago

Terima Ricky semuanya aku nunggu

annhienktuit commented 1 week ago

I got the same issue, when will the release of this fix will be rolled out? @lehcar09

tuan25abc commented 6 days ago

@lehcar09 I'm experiencing this issue with almost 1,000 crashes per day. How is the release status?

mrober commented 5 days ago

This issue is fixed in the latest version.

Arumankumang commented 4 days ago

Iya pak harus dibaiki semuanya situs dan web versi baru UI