Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSE can be blocked until the app resumes and finishes pending decryption #4579

Closed
manuroe opened this issue Jul 20, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-sdk#1166
Labels
A-Notifications P1 T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@manuroe
Copy link
Member

manuroe commented Jul 20, 2021

This is another occurence of #4335 but with a more specific case.

We had a rageshake where NSE was not enable to complete its init. It stayed in the state below. The notification was only "Message"

2021-07-20 00:06:53.190 RiotNSE[332:22459]  [NotificationService] setup: MXBackgroundSyncService init: BEFORE
2021-07-20 00:06:53.191 RiotNSE[332:22459]  [NotificationService] Memory: footprint: 7.80 MB - available: 16.17 MB
2021-07-20 00:06:53.216 RiotNSE[332:22459]  [MXSyncResponseFileStore] readData: File read of 9478 bytes lasted 4ms. Free memory: 15.66 MB
2021-07-20 00:06:53.219 RiotNSE[332:22459]  [MXSyncResponseFileStore] readData: Consersion to model lasted 2ms. Free memory: 15.59 MB
2021-07-20 00:06:53.220 RiotNSE[332:22459]  [MXRealmCryptoStore] setShouldCompactOnLaunch: NO

It was enabled to display any notification until the app resumes:

2021-07-20 00:06:02.363 Riot[254:21541]  [MXRealmCryptoStore] performSessionOperationWithGroupSessionWithId done in 13.872ms
2021-07-20 00:06:02.376 Riot[254:21541]  [MXRealmCryptoStore] performSessionOperationWithGroupSessionWithId done in 12.304ms
2021-07-20 00:33:04.464 Riot[254:19997]  [AppDelegate] applicationWillEnterForeground
2021-07-20 00:33:04.525 Riot[254:21541]  [MXRealmCryptoStore] performSessionOperationWithGroupSessionWithId done in 1622147.971ms
2021-07-20 00:33:04.574 Riot[254:21541]  [MXRealmCryptoStore] performSessionOperationWithGroupSessionWithId done in 48.381ms
2021-07-20 00:33:04.609 Riot[254:21541]  [MXRealmCryptoStore] performSessionOperationWithGroupSessionWithId done in 32.695ms

The log above clearly show that the realm lock was kept by the app.

The app should complete any pending decryption before going to sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications P1 T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
1 participant