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

Corrupted realm db in Notification Service Extension #3956

Closed
manuroe opened this issue Jan 20, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-sdk#997
Closed

Corrupted realm db in Notification Service Extension #3956

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

Comments

@manuroe
Copy link
Member

manuroe commented Jan 20, 2021

The NSE can crash on every push because it cannot open its temporary crypto store. All notifications are then displayed "Message.

[MXRealmCryptoStore] Schema version: 14
/Users/realm/workspace/realm_realm-core_release_10.1.3/src/realm/alloc_slab.cpp:797: [realm-core-10.1.3] Assertion failed: header->m_top_ref[1] == 0 with (header->m_top_ref[1], get_file_path_for_assertions()) =  [201016, "/private/var/mobile/Containers/Shared/AppGroup/44E9797C-B39A-4047-914B-B587B8BB749C/MXRealmCryptoStore/@matthew:matrix.org:bgCryptoStore.realm"]
0   Realm                               0x0000000101cd8aa8 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Realm                               0x0000000101cd8f44 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 388
2   Realm                               0x0000000101b9f308 _ZNK5realm9SlabAlloc28get_file_path_for_assertionsEv + 0
3   Realm                               0x0000000101ba1bfc _ZN5realm9SlabAlloc11attach_fileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS0_6ConfigE + 2376
4   Realm                               0x0000000101bd3de8 _ZN5realm2DB7do_openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbNS_9DBOptionsE + 3156
5   Realm                               0x0000000101bd6868 _ZN5realm2DB4openERNS_11ReplicationENS_9DBOptionsE + 244
6   Realm                               0x0000000101bdb3c4 _ZN5realm2DB6createERNS_11ReplicationENS_9DBOptionsE + 392
7   Realm                               0x000000010188e6e0 _ZN5realm5_impl16RealmCoordinator7open_dbEv + 1044
8   Realm                               0x000000010188d734 _ZN5realm5_impl16RealmCoordinator12do_get_realmENS_5Realm6ConfigERNSt3__110shared_ptrIS2_EENS_4util8OptionalINS_9VersionIDEEERNS8_17CheckedUniqueLockE + 68
9   Realm                               0x000000010188d5a0 _ZN5realm5_impl16RealmCoordinator9get_realmENS_5Realm6ConfigENS_4util8OptionalINS_9VersionIDEEE + 480
10  Realm                               0x000000010198a808 _ZN5realm5Realm16get_shared_realmENS0_6ConfigE + 120
11  Realm                               0x0000000101967a3c +[RLMRealm realmWithConfiguration:queue:error:] + 956
12  Realm                               0x0000000101967670 +[RLMRealm realmWithConfiguration:error:] + 28
13  MatrixSDK                           0x0000000101343238 +[MXRealmCryptoStore realmForUser:andDevice:] + 1932
14  MatrixSDK                           0x000000010133b234 +[MXRealmCryptoStore hasDataForCredentials:] + 124
15  MatrixSDK                           0x0000000101260ce0 -[MXBackgroundCryptoStore initWithCredentials:] + 196
16  MatrixSDK                           0x00000001013e6180 $s9MatrixSDK23MXBackgroundSyncServiceC15withCredentialsACSo13MXCredentialsC_tcfcTf4gn_n + 1072
17  MatrixSDK                           0x00000001013dcf9c $s9MatrixSDK23MXBackgroundSyncServiceC15withCredentialsACSo13MXCredentialsC_tcfc + 20
18  RiotNSE                             0x000000010099cc28 RiotNSE + 68648
19  RiotNSE                             0x000000010099d808 RiotNSE + 71688
20  RiotNSE                             0x0000000100997020 RiotNSE + 45088
21  UserNotifications                   0x00000001bbd4db40 F1BE0E4D-33F1-3C58-A38D-E2449F5F8E36 + 23360
22  Foundation                          0x00000001ad5119a0 50B3154E-8C73-3E17-A162-C30DA82424CD + 2296224
23  Foundation                          0x00000001ad330d74 50B3154E-8C73-3E17-A162-C30DA82424CD + 327028
24  Foundation                          0x00000001ad511ac4 50B3154E-8C73-3E17-A162-C30DA82424CD + 2296516
25  libxpc.dylib                        0x00000001f78be0e4 3B74544B-B441-312D-8A64-DD5A3E60E74E + 61668
26  libxpc.dylib                        0x00000001f78be4a0 3B74544B-B441-312D-8A64-DD5A3E60E74E + 62624
27  libdispatch.dylib                   0x00000001abcb9e7c 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 15996
28  libdispatch.dylib                   0x00000001abcd3d2c 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 122156
29  libdispatch.dylib                   0x00000001abcc0fd8 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 45016
30  libdispatch.dylib                   0x00000001abcd4a3c 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 125500
31  libdispatch.dylib                   0x00000001abcc0fd8 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 45016
32  libdispatch.dylib                   0x00000001abcc1c90 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 48272
33  libdispatch.dylib                   0x00000001abccbd78 0F3905E0-6720-3D08-9AE0-A43A8DA244C0 + 89464
34  libsystem_pthread.dylib             0x00000001f7897804 _pthread_wqthread + 276
35  libsystem_pthread.dylib             0x00000001f789e75c start_wqthread + 8!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to [email protected].
@manuroe manuroe added this to the Sprint - Element 1.1.6 milestone Jan 20, 2021
@manuroe manuroe self-assigned this Jan 20, 2021
@manuroe manuroe added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Jan 20, 2021
manuroe added a commit to matrix-org/matrix-ios-sdk that referenced this issue Jan 20, 2021
element-hq/element-ios#3956

We need to reset this db from the NSE process. The init operation seems to be the best place to check this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications os:iOS13 T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant