Helium314 / Local-NLP-Backend

Yet another network location backend for the UnifiedNLP/microG project
GNU General Public License v3.0
65 stars 4 forks source link

[1.2.6-debug] Crash: database is locked #13

Closed Mrnofish closed 1 year ago

Mrnofish commented 1 year ago

Got this one while interacting with the configuration screen (IIRC).

While something is probably not entirely right, I may not be able to reproduce it, it seemed some kind of freak accident.

FATAL EXCEPTION: DefaultDispatcher-worker-6
Process: helium314.localbackend.debug, PID: 2335
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY): , while compiling: PRAGMA journal_mode
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1068)
at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:811)
at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:419)
at android.database.sqlite.SQLiteConnection.setJournalFromConfiguration(SQLiteConnection.java:339)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:268)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1085)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1065)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:929)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:918)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
at org.fitchfamily.android.dejavu.Database.getDatabase(Database.kt:44)
at org.fitchfamily.android.dejavu.Database.query(Database.kt:81)
at org.fitchfamily.android.dejavu.Database.query$default(Database.kt:70)
at org.fitchfamily.android.dejavu.Database.getEmitters(Database.kt:420)
at org.fitchfamily.android.dejavu.Cache.loadIds(Cache.kt:114)
at org.fitchfamily.android.dejavu.BackendService.backgroundProcessing(BackendService.kt:733)
at org.fitchfamily.android.dejavu.BackendService.access$backgroundProcessing(BackendService.kt:50)
at org.fitchfamily.android.dejavu.BackendService$queueForProcessing$1.invokeSuspend(BackendService.kt:710)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@dce322f, Dispatchers.IO]
Helium314 commented 1 year ago

Got this one while interacting with the configuration screen (IIRC).

Do you remember whether you did any import or export? Or just showing nearby emitters (I assume this works for you now)?

Mrnofish commented 1 year ago

I had run the full MLS DB import, however the dialog had already disappeared a number of minutes before.

I don't think the emitters dialog was open at that time, although i did open it at some point.

Hopefully this is not too vague.

Helium314 commented 1 year ago

No, not at all. This gives me an idea what could have happened.