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

App hangs (in infinite loop?) on startup

Open jethrogb opened this issue 10 months ago • 19 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

After upgrading to Signal Android 7.1.3 (which happened overnight according to the Play Store), I'm no longer able to successfully launch the Signal app. It hangs indefinitely on startup. Also, if there is a "Checking for incoming messages" notification, it never goes away. The phone gets quite warm as well.

Steps to reproduce

  • Launch the app

Actual result: Black screen with white Signal logo shows, indefinitely Expected result: The app launches

Screenshots

screenshot

Device info

Device: Asus Zenfone 10 Android version: 14 Signal version: 7.1.3

Link to debug log

I'm not able to get to the debug log in Signal settings. Here is the logcat output for the Signal process signal.log

I see a lot of messages from AnrDetector, not sure if those are related.

I have tried the following things to no avail:

  • clearing the cache
  • clearing the Google Play Services cache
  • downgrading to 7.0.2 (Android seems to prevent this)
  • rebooting

jethrogb avatar Mar 26 '24 12:03 jethrogb

Ok I know understand that the AnrDetector just detects hangs and outputs some stack traces. The top of stack is net.zetetic.database.sqlcipher.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:301) which is https://github.com/signalapp/sqlcipher-android/blob/74f27c3bc58a720446818b469da22ed58c73d72f/sqlcipher/src/main/java/net/zetetic/database/sqlcipher/SQLiteOpenHelper.java#L301, so it does indeed appear to be some kind of deadlock.

jethrogb avatar Mar 26 '24 16:03 jethrogb

Does it still occur if you disconnect from the internet completely (enable airplane mode)?

nicholas-signal avatar Mar 26 '24 20:03 nicholas-signal

@nicholas-signal Indeed so, and you can also see a lot of Websocket exceptions in the log.

jethrogb avatar Mar 27 '24 13:03 jethrogb

@nicholas-signal Indeed so, and you can also see a lot of Websocket exceptions in the log.

Thanks for confirming. We're on it!

nicholas-signal avatar Mar 27 '24 14:03 nicholas-signal

@nicholas-signal Could you re-sign 7.0.2 with a higher version number so I can upgrade to it?

jethrogb avatar Apr 02 '24 14:04 jethrogb

I don't intend on re-releasing an older version, sorry. From your logs though, I think I see the root of the issue, and I'm putting a fix into 7.2.3, which will be rolling out to production over the next few days. Apologies, and thank you!

greyson-signal avatar Apr 03 '24 16:04 greyson-signal

@greyson-signal I just updated to 7.2.3 but unfortunately things are still not working. The first time I launched the new version, I got the prompt "Signal encountered an error, would you like to submit debug logs?" I clicked submit but the app crashed shortly thereafter so I'm not sure if that worked.

Now I get to the Signal main UI, but the chat list is completely empty. The 3 dots menu works, as do the following commands:

  • New group
  • Invite friends
  • Filter unread chats
  • Notification profile
  • New message
  • Search They work, as in, they take me to the next UI. I can't really do anything from there though. The following don't work:
  • Camera button
  • Settings
  • Calls tab

Screenshot

signal2.log

jethrogb avatar Apr 03 '24 17:04 jethrogb

Any chance of enabling a rollback to a pre-regression version? How long will my desktop app keep working without the Android app?

jethrogb avatar Apr 09 '24 20:04 jethrogb

@greyson-signal @nicholas-signal Any update on this issue?

jethrogb avatar Apr 22 '24 13:04 jethrogb

I took a quick look at your logs, looks like it's still in the migration. What happens if you leave your phone open for a while? Make sure it stays in the foreground

clark-signal avatar Apr 22 '24 14:04 clark-signal

@clark-signal I was able to log a crash after waiting for a bit signal3.log

jethrogb avatar Apr 22 '24 14:04 jethrogb

And here's another log with the OOM happening with the migration still ongoing signal4.log

jethrogb avatar Apr 22 '24 15:04 jethrogb

And another in airplane mode with display timeout set to 10 mins. This has an interesting log item during OOM:

04-22 17:10:09.388 19883 19918 E SQLiteLog: (3082) statement aborts at 11: [DROP TABLE kyber_prekey] 

signal6.log

jethrogb avatar Apr 22 '24 15:04 jethrogb

So I'm sure you've already reached this conclusion, but I'm guessing (due to the amount of time the migration takes and the fact that it OOMs there) that my kyber_prekey table is much larger than assumed by the code.

jethrogb avatar Apr 22 '24 20:04 jethrogb

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 Jun 21 '24 23:06 stale[bot]

Triage: problem remains in 7.9.6 signal7.log

jethrogb avatar Jun 24 '24 19:06 jethrogb

I was able to use CVE-2024-31317 to export the Signal files from my phone. I can share them if you tell me how I can appropriately redact personal information from them.

I did already see this:

sqlite> SELECT COUNT(*),SUM(LENGTH(serialized)) FROM kyber_prekey;
332990|1606343466

Is it normal that I have 300k keys totalling 1.6GB?

jethrogb avatar Aug 15 '24 17:08 jethrogb

From the timestamps, I can see that 99% of those keys were created around the time of https://github.com/signalapp/Signal-Android/issues/13434

jethrogb avatar Aug 15 '24 18:08 jethrogb

Whoa....just whoa...

Thanks for the extra details and sticking with it. Gives us a new place to jump off from and investigate.

cody-signal avatar Aug 15 '24 18:08 cody-signal