Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

PlacesConnectionBusy: Error executing SQL: database is locked #8011

Closed
grigoryk opened this issue Aug 5, 2020 · 3 comments
Closed

PlacesConnectionBusy: Error executing SQL: database is locked #8011

grigoryk opened this issue Aug 5, 2020 · 3 comments
Labels
a-s Application Services work needed 💥 crash <storage> Concerning general browser storage
Milestone

Comments

@grigoryk
Copy link
Contributor

grigoryk commented Aug 5, 2020

Seeing this during onTitleChange history delegate calls: https://sentry.prod.mozaws.net/operations/firefox/issues/9256648/?query=release%3Aorg.mozilla.firefox-79.0.2%20lastSeen%3A-3d%20level%3Afatal

mozilla.appservices.places.PlacesConnectionBusy: Error executing SQL: database is locked
    at mozilla.appservices.places.RustError.intoException(RustError.kt:12)
    at mozilla.appservices.places.PlacesWriterConnection.noteObservation(PlacesConnection.kt:12)
    at mozilla.components.browser.storage.sync.PlacesHistoryStorage$recordObservation$2.invokeSuspend(PlacesHistoryStorage.kt:10)
    at mozilla.components.browser.storage.sync.PlacesHistoryStorage$recordObservation$2.invoke
    at androidx.core.app.AppOpsManagerCompat.startUndispatchedOrReturn(AppOpsManagerCompat.java:2)
    at kotlinx.coroutines.AwaitKt.withContext(Await.kt:9)
    at mozilla.components.browser.storage.sync.PlacesHistoryStorage.recordObservation(PlacesHistoryStorage.kt:1)
    at mozilla.components.feature.session.HistoryDelegate.onTitleChanged(HistoryDelegate.kt:6)
    at mozilla.components.browser.engine.gecko.GeckoEngineSession$createContentDelegate$1$onTitleChange$$inlined$let$lambda$1.invokeSuspend(GeckoEngineSession.kt:5)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:21)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:11)

Not sure about the a-s label yet, hopefully it's not needed. Perhaps there's a sync running in the background? Either way, we shouldn't crash in these situations, even if that means dropping a title change.

┆Issue is synchronized with this Jira Task

@grigoryk grigoryk added <storage> Concerning general browser storage a-s Application Services work needed 💥 crash labels Aug 5, 2020
@grigoryk
Copy link
Contributor Author

grigoryk commented Aug 5, 2020

Similarly for https://sentry.prod.mozaws.net/operations/firefox/issues/9261993/?query=release%3Aorg.mozilla.firefox-79.0.2%20lastSeen%3A-3d%20level%3Afatal - "disk is full" encountered during onTitleChange results in a crash currently. Lots of things will fail to work in this scenario, but let's not crash at least.

@grigoryk
Copy link
Contributor Author

grigoryk commented Aug 5, 2020

I think ignoring certain types of failures encountered during onTitleChange would be appropriate here. We can log them as infos to keep track of volume.

@kbrosnan kbrosnan added this to Needs triage in Android: Crash Tracking Aug 5, 2020
@grigoryk
Copy link
Contributor Author

grigoryk commented Aug 6, 2020

Another cause: Error executing SQL: UNIQUE constraint failed: moz_places.guid

grigoryk pushed a commit to grigoryk/android-components that referenced this issue Aug 6, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Aug 6, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Aug 6, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Aug 6, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Aug 14, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Aug 14, 2020
@bors bors bot closed this as completed in 7444814 Aug 17, 2020
Android: Crash Tracking automation moved this from Needs triage to Closed Aug 17, 2020
@Amejia481 Amejia481 added this to the 55.0.0 💨 milestone Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a-s Application Services work needed 💥 crash <storage> Concerning general browser storage
Projects
No open projects
Development

No branches or pull requests

2 participants