celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.66k stars 138 forks source link

Crash while storage running out of space #437

Open shuvashish76 opened 2 years ago

shuvashish76 commented 2 years ago

Crash details: App crashed while my internl storage was almost full. Not sure if it’s related.

Crash logs ``` FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: com.celzero.bravedns, PID: 2528 android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1) at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method) at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:556) at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:439) at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401) at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:551) at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction(FrameworkSQLiteDatabase.java:90) at androidx.room.RoomDatabase.internalEndTransaction(RoomDatabase.java:510) at androidx.room.RoomDatabase.endTransaction(RoomDatabase.java:500) at com.celzero.bravedns.database.ConnectionTrackerDAO_Impl.insert(ConnectionTrackerDAO_Impl.java:166) at com.celzero.bravedns.database.ConnectionTrackerRepository$insert$2.invokeSuspend(ConnectionTrackerRepository.kt:27) at com.celzero.bravedns.database.ConnectionTrackerRepository$insert$2.invoke(Unknown Source:8) at com.celzero.bravedns.database.ConnectionTrackerRepository$insert$2.invoke(Unknown Source:2) at com.celzero.bravedns.database.ConnectionTrackerRepository$ioCtx$2.invokeSuspend(ConnectionTrackerRepository.kt:51) at com.celzero.bravedns.database.ConnectionTrackerRepository$ioCtx$2.invoke(Unknown Source:8) at com.celzero.bravedns.database.ConnectionTrackerRepository$ioCtx$2.invoke(Unknown Source:4) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1) at com.celzero.bravedns.database.ConnectionTrackerRepository.ioCtx(ConnectionTrackerRepository.kt:50) at com.celzero.bravedns.database.ConnectionTrackerRepository.insert(ConnectionTrackerRepository.kt:26) at com.celzero.bravedns.service.IPTracker.insertToDB(IPTracker.kt:89) at com.celzero.bravedns.service.IPTracker.access$insertToDB(IPTracker.kt:42) at com.celzero.bravedns.service.IPTracker$recordTransaction$1.invokeSuspend(IPTracker.kt:61) at com.celzero.bravedns.service.IPTracker$recordTransaction$1.invoke(Unknown Source:8) at com.celzero.bravedns.service.IPTracker$recordTransaction$1.invoke(Unknown Source:2) at com.celzero.bravedns.service.IPTracker$io$1.invokeSuspend(IPTracker.kt:135) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) ```

Device details: Model: Lenovo Tab4 8 plus (TB-8704X) Android: 8.1.0 App version: v053h (19) Source: F-Droid

ignoramous commented 2 years ago

It is likely unrelated, but a crash nevertheless. Thanks for the report, though it isn't right away obvious why this crash happened.

ignoramous commented 1 year ago

Just noting it here that we've overhauled the way we insert in to the tables (though, it is unlikely it fixes storage-related crash issues... may be we need a different check for that). See #343