Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Signal crashes immediately after opening - "database or disk is full"

Open hubikj opened this issue 1 year ago • 28 comments

  • [x] I have searched open and closed issues for duplicates
  • [x] I am submitting a bug report for existing functionality that does not work as intended
  • [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [x] This isn't a feature request or a discussion topic

Bug description

App crashes immediately after I open it. I can briefly see the conversation list, but there is not enough time to even enter settings. This also happens in airplane mode (I saw other issues where airplane mode prevented the crash). Logs show mentions of "database or disk is full", but my storage is not full (~8 GB free).

Steps to reproduce

Open the app

Actual result: App crashes couple of seconds later Expected result: I would expect to be able to use the app as usual

Device info

Device: Google Pixel 6 Android version: Stock Android 14, Build UQ1A.240205.002 Signal version: 6.46.7

Link to debug log

I cannot access the debug log via Signal's settings, because the app crashes too fast. Here is something from adb logcat that seems relevant:

02-19 16:07:10.103  2046  2317 E AndroidRuntime: FATAL EXCEPTION: pool-18-thread-1
02-19 16:07:10.103  2046  2317 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 2046
02-19 16:07:10.103  2046  2317 E AndroidRuntime: android.database.sqlite.SQLiteFullException: FullCode: 13 | ErrorCode: 13 | ExtendedErrorCode: 0 | Message: database or disk is full | ExtraMessage: null
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at net.zetetic.database.sqlcipher.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at net.zetetic.database.sqlcipher.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:770)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at net.zetetic.database.sqlcipher.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:758)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at net.zetetic.database.sqlcipher.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:71)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at net.zetetic.database.sqlcipher.SQLiteDatabase.delete(SQLiteDatabase.java:1794)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.SQLiteDatabase.lambda$delete$14(SQLiteDatabase.java:391)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.SQLiteDatabase.$r8$lambda$M2dGB_vmS-aoBgck2zt6F2h6rb4(SQLiteDatabase.java:0)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.SQLiteDatabase$$ExternalSyntheticLambda4.run(R8$$SyntheticClass:0)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.SQLiteDatabase.traceSql(SQLiteDatabase.java:112)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.SQLiteDatabase.delete(SQLiteDatabase.java:391)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.SQLiteDatabase.delete(SQLiteDatabase.java:251)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.signal.core.util.DeleteBuilderPart2.run(SQLiteDatabaseExtensions.kt:356)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.MessageTable.deleteMessage(MessageTable.kt:3117)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.MessageTable.deleteMessage$default(MessageTable.kt:3107)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.database.MessageTable.deleteMessage(MessageTable.kt:3104)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at org.thoughtcrime.securesms.service.ExpiringMessageManager$ProcessTask.run(ExpiringMessageManager.java:112)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
02-19 16:07:10.103  2046  2317 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:1012)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException: android.database.sqlite.SQLiteFullException: FullCode: 13 | ErrorCode: 13 | ExtendedErrorCode: 0 | Message: database or disk is full | ExtraMessage: null
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at net.zetetic.database.sqlcipher.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at net.zetetic.database.sqlcipher.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:770)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at net.zetetic.database.sqlcipher.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:758)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at net.zetetic.database.sqlcipher.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:71)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at net.zetetic.database.sqlcipher.SQLiteDatabase.delete(SQLiteDatabase.java:1794)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.SQLiteDatabase.lambda$delete$14(SQLiteDatabase.java:391)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.SQLiteDatabase.$r8$lambda$M2dGB_vmS-aoBgck2zt6F2h6rb4(SQLiteDatabase.java:0)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.SQLiteDatabase$$ExternalSyntheticLambda4.run(R8$$SyntheticClass:0)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.SQLiteDatabase.traceSql(SQLiteDatabase.java:112)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.SQLiteDatabase.delete(SQLiteDatabase.java:391)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.SQLiteDatabase.delete(SQLiteDatabase.java:251)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.signal.core.util.DeleteBuilderPart2.run(SQLiteDatabaseExtensions.kt:356)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.MessageTable.deleteMessage(MessageTable.kt:3117)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.MessageTable.deleteMessage$default(MessageTable.kt:3107)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.database.MessageTable.deleteMessage(MessageTable.kt:3104)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at org.thoughtcrime.securesms.service.ExpiringMessageManager$ProcessTask.run(ExpiringMessageManager.java:112)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
02-19 16:07:10.103  2046  2317 E SignalUncaughtException:       at java.lang.Thread.run(Thread.java:1012)

hubikj avatar Feb 19 '24 17:02 hubikj

First, a couple of stupid questions 🤔 ... do you have Signal installed on a SD card ? 🤔 and is the SD card FAT32 formatted by any chance ?

clauz9 avatar Feb 24 '24 14:02 clauz9

No, Pixel 6 does not have an SD card slot. The Signal app also worked fine for almost 2 years.

hubikj avatar Feb 24 '24 15:02 hubikj

Accidently closed the issue, sorry about that. My Signal app also accumulated 7.34 GB of user data over those 2 years. Is it possible that I am hitting some SW limitation? It surely should not crash the app like this...

hubikj avatar Feb 24 '24 15:02 hubikj

I'm thinking it's probably a permissions issue 🤔 I've seen people with a lot more than 7 GB in Signal ... does it only crash when you open the app, or does it also crash in the background ? 🤔

and if someone sends you a Signal message, does that crash the app ?

Let's try to get you in the app.. so you can get that debug log

you can try going to app info, and disabling all permissions, including the "alarms and reminders" permission

Screenshot

image

Actual result: App crashes couple of seconds later

those couple of seconds of delay make me think it's trying to create a back-up and crashing 🤔 disabling "alarms and reminders" should stop it from trying to create a back-up, and it might allow you to get a debug log.

clauz9 avatar Feb 24 '24 15:02 clauz9

Screenshot_20240224-181440

I do not see the alarms and reminders permission in stock Android 14. I removed everything else though and it did not help.

hubikj avatar Feb 24 '24 17:02 hubikj

Hopefully you can find it in Settings -> Apps -> 3 dot menu -> special access -> alarms and reminders I have a Samsung with Android 13, and I don't know how Google changed things in Android 14

clauz9 avatar Feb 24 '24 17:02 clauz9

does it only crash when you open the app, or does it also crash in the background ? 🤔

I do not know. How can I be sure about this?

and if someone sends you a Signal message, does that crash the app ?

I do not know, but I did not receive any message notifications on my phone since this issue started, whilst I am still able to use Signal on desktop as usual. I can see that some messages get synced in the brief moment before each crash if I open the app repeatedly.

hubikj avatar Feb 24 '24 17:02 hubikj

Hopefully you can find it in Settings -> Apps -> 3 dot menu -> special access -> alarms and reminders I have a Samsung with Android 13, and I don't know how Google changed things in Android 14

Found it, but Signal is not on the list, so it does not have that permission. To be honest I am not even sure I have backups turned on.

hubikj avatar Feb 24 '24 17:02 hubikj

There's no practical limit on the amount of space Signal can use. My personal install is like 23 GB. The error is telling us that the database doesn't have any more space to grow into -- I know you said you have 8GB of free space, but does making more space on your phone help? Idk how your phone is managing disk space.

greyson-signal avatar Feb 26 '24 13:02 greyson-signal

does making more space on your phone help?

That was the first thing I tried. Just to be sure, I now deleted more stuff and have 28 GB free space. The issue is still there.

hubikj avatar Feb 26 '24 22:02 hubikj

I also installed LogFox to collect logcat without my PC and it can nicely detect crashes and collect the logs for those. It seems like there is two distinct crashes that repeat twice (4 crashes in total) each time I open the Signal app.

This one is first:

FATAL EXCEPTION: ExpiringStoriesManager
Process: org.thoughtcrime.securesms, PID: 16901
android.database.sqlite.SQLiteException: FullCode: 1 | ErrorCode: 1 | ExtendedErrorCode: 0 | Message: cannot rollback - no transaction is active | ExtraMessage: null
	at net.zetetic.database.sqlcipher.SQLiteConnection.nativeExecute(Native Method)
	at net.zetetic.database.sqlcipher.SQLiteConnection.execute(SQLiteConnection.java:591)
	at net.zetetic.database.sqlcipher.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:443)
	at net.zetetic.database.sqlcipher.SQLiteSession.endTransaction(SQLiteSession.java:405)
	at net.zetetic.database.sqlcipher.SQLiteDatabase.endTransaction(SQLiteDatabase.java:572)
	at org.thoughtcrime.securesms.database.SQLiteDatabase$$ExternalSyntheticLambda17.run(R8$$SyntheticClass:0)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.trace(SQLiteDatabase.java:76)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.endTransaction(SQLiteDatabase.java:314)
	at org.signal.core.util.SQLiteDatabaseExtensionsKt.withinTransaction(SQLiteDatabaseExtensions.kt:24)
	at org.thoughtcrime.securesms.database.MessageTable.deleteStoriesOlderThan(MessageTable.kt:1488)
	at org.thoughtcrime.securesms.service.ExpiringStoriesManager.executeEvent(ExpiringStoriesManager.kt:47)
	at org.thoughtcrime.securesms.service.ExpiringStoriesManager.executeEvent(ExpiringStoriesManager.kt:17)
	at org.thoughtcrime.securesms.service.TimedEventManager.lambda$scheduleIfNecessary$0(TimedEventManager.java:55)
	at org.thoughtcrime.securesms.service.TimedEventManager.$r8$lambda$g67vLagTlpxalybxAktxNIeA6zM(TimedEventManager.java:0)
	at org.thoughtcrime.securesms.service.TimedEventManager$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.os.HandlerThread.run(HandlerThread.java:67)

And this one follows one second later:

FATAL EXCEPTION: pool-18-thread-1
Process: org.thoughtcrime.securesms, PID: 16901
android.database.sqlite.SQLiteFullException: FullCode: 13 | ErrorCode: 13 | ExtendedErrorCode: 0 | Message: database or disk is full | ExtraMessage: null
	at net.zetetic.database.sqlcipher.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
	at net.zetetic.database.sqlcipher.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:770)
	at net.zetetic.database.sqlcipher.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:758)
	at net.zetetic.database.sqlcipher.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:71)
	at net.zetetic.database.sqlcipher.SQLiteDatabase.delete(SQLiteDatabase.java:1794)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.lambda$delete$14(SQLiteDatabase.java:391)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.$r8$lambda$M2dGB_vmS-aoBgck2zt6F2h6rb4(SQLiteDatabase.java:0)
	at org.thoughtcrime.securesms.database.SQLiteDatabase$$ExternalSyntheticLambda4.run(R8$$SyntheticClass:0)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.traceSql(SQLiteDatabase.java:112)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.delete(SQLiteDatabase.java:391)
	at org.thoughtcrime.securesms.database.SQLiteDatabase.delete(SQLiteDatabase.java:251)
	at org.signal.core.util.DeleteBuilderPart2.run(SQLiteDatabaseExtensions.kt:356)
	at org.thoughtcrime.securesms.database.MessageTable.deleteMessage(MessageTable.kt:3155)
	at org.thoughtcrime.securesms.database.MessageTable.deleteMessage$default(MessageTable.kt:3145)
	at org.thoughtcrime.securesms.database.MessageTable.deleteMessage(MessageTable.kt:3142)
	at org.thoughtcrime.securesms.service.ExpiringMessageManager$ProcessTask.run(ExpiringMessageManager.java:112)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)

hubikj avatar Feb 26 '24 22:02 hubikj

Found it, but Signal is not on the list, so it does not have that permission. To be honest I am not even sure I have backups turned on.

Interesting... 🤔 ExpiringStoriesManager seems to need to set alarms 🤔 which, I assume it would require the app to have that alarms and reminders permission 🤔

can you add signal to the list of allowed apps, and see if it still crashes ?

clauz9 avatar Feb 26 '24 22:02 clauz9

can you add signal to the list of allowed apps, and see if it still crashes ?

I do not see any option to add apps to the list of allowed apps in the special access permissions. And there is no option to do that through Signal app info either.

hubikj avatar Feb 26 '24 22:02 hubikj

Ok, I found the reason why the alarms and reminders permission did not show up. I had the battery usage set to Unrestricted and that means this permission is always on. I tried to change battery usage to both Optimized and Restricted whilst making sure the alarms and reminders permission is on and unfortunately the bug is still there - no change in behavior.

hubikj avatar Feb 26 '24 23:02 hubikj

@clauz9 @greyson-signal Do you think there is any chance for this to be resolved? I would like to be able to use Signal on my phone again, but at the same time I do not want to wipe the app data if it can be helpful in solving this bug (and I also want to avoid losing all conversation history). From discussions with my friends who are also heavy Signal users, I know I am not the only one suffering from this occasional issue. In the past couple of days I saw a dialogue in Signal saying that the app encountered an issue and asking whether I want to submit a debug log. I tapped on Submit, but I doubt anything got submitted before the app crashed. I think it would be great to have some sort of a "safe mode" for repeated crashes that would allow me to submit the debug log with minimal app functionality.

hubikj avatar Mar 02 '24 11:03 hubikj

I actually ran out of ideas of what you can try to make the app start 🤔 but I suspect that the logs you've provided might be enough to get a fix out, you just have to wait for the next release of Signal, I assume.

clauz9 avatar Mar 02 '24 12:03 clauz9

you just have to wait for the next release of Signal, I assume.

Wouldn't that require someone to be assigned to the issue? I want to help by testing the fix, but at the same time it is super inconvenient to have the app broken...

hubikj avatar Mar 06 '24 13:03 hubikj

There's a new stable version out there, 7.0.2 the one with usernames, can you install it, and see if it fixes anything ?

clauz9 avatar Mar 06 '24 18:03 clauz9

I am on 7.0.2, same behavior 😢

hubikj avatar Mar 06 '24 19:03 hubikj

Still happening on 7.1.1

hubikj avatar Mar 13 '24 01:03 hubikj

Still happening on 7.1.2

hubikj avatar Mar 20 '24 22:03 hubikj

I have the same issue with Poco X3, android 12 (7.1.3)

va5y1 avatar Mar 25 '24 03:03 va5y1

Issue still present on 7.2.0

hubikj avatar Mar 30 '24 04:03 hubikj

Bug is still there on 7.2.1.

I can no longer provide this information, because I wiped my data. As I already said, having the app crippled was super inconvenient and I feel like I gave it a lot of time already. I will follow this bug though to see whether it gets resolved. Thanks!

hubikj avatar Apr 01 '24 00:04 hubikj

I'm having a similar issue apart from I can't even get into the app as it crashes either on the pin page or just after I've submitted my pin. I did have limited storage space but have deleted things so have more space.

17starlight avatar Apr 17 '24 22:04 17starlight

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '24 21:08 stale[bot]

@hubikj We appreciate you trying so hard to help us resolve this, but it's not something we were able to reproduce and thus resolve.

cody-signal avatar Aug 13 '24 13:08 cody-signal

@cody-signal Perhaps there is a lesson to be learned for the general debug log availability. As I already mentioned, I know for sure I am not the only one suffering from this occasional issue. Most people just wipe data and start fresh without reporting it, especially since there is no way to collect the debug log. It would be extremely helpful to have some sort of a "safe mode" when the app crashes repeatedly that would allow to submit the debug log.

hubikj avatar Aug 13 '24 15:08 hubikj