-
Notifications
You must be signed in to change notification settings - Fork 174
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
[realm-core-11.9.0] Assertion failed: local_ndx < m_page_state.size() with (local_ndx, m_page_state.size()) = [213, 128] #5230
Comments
Hi @marcocattai, in order to troubleshoot this further, we'll need some more information:
Any hints you can provide about what led to the crash and whether/how we can reproduce it will be very helpful. Thanks! |
|
I see the same assert running iOS 15.3.1 / react-native / https://github.com/realm/realm-js/releases/tag/v10.13.0 |
A bit more info. This problem started appearing after upgrading to realm-js v10.13.0 (uses realm-core-11.9.0). It happens on multiple devices. Downgrading to realm-js v10.12.0 (realm-core-11.8.0) does not help. We have encryption enabled. Here is the callstack from the debugger.
|
As this can be reproduced by you in a test environment, would it be possible for you to share a realm file that triggers this behavior? You can share it privately with me (jorgen.edelbo@mongodb.com). |
Yes, thanks, I can share the database. Can you point me to instuctions how to copy it off my phone? We are not using any kind of server sync. |
@oleliabo Unfortunately I don't know the debugging environment for iOS. @leemaguire can you help? |
@jedelbo I was a bit lazy, found nice instructions here: Have now sendt you the file. |
@oleliabo Thank you for the file. It turns out that one of the pages in the file, after decryption, contains what looks like random data. Like it has been decrypted with the wrong key. How we end in this state is yet unknown. If some reproducible steps that lead to this situation can be identified, then we might be able to find the root cause. |
We started seeing this after upgrading realm-js from v10.11.0 to v10.12.0 / v10.13.0. I cant provide any detailed steps to reproduce Im afraid. |
➤ Jørgen Edelbo commented: I am putting this on the backlog as there is no direct way to make progress on this. We are currently working on measures to make use of encryption more robust and the information from this issue will certainly be used as input to this work. |
➤ Jørgen Edelbo commented: Internal note: The 4k page starting at 0x3000 seems to contain garbage up until 0x3590. That page starting at 0x270000 cannot be decrypted due to a wrong checksum. If the checksum check is removed, the page seems to be decrypted correctly. |
➤ Jørgen Edelbo commented: It should have been moved to Parked state |
➤ bmunkholm commented: We assume this has been fixed with the latest encryption fixes, so closing. Feel free to reopen if you see this again. |
2022-02-08 13:22:36.278558+0000 Hidden App[57128:388341] [Process] 0x11d877e18 - [pageProxyID=5, webPageID=6, PID=57147] WebPageProxy::didFailProvisionalLoadForFrame: frameID=3, domain=WebKitErrorDomain, code=102
/Users/marcocattai/Library/Developer/Xcode/DerivedData/BoardIQ-bfkllaficffjmghegjncueyemgof/SourcePackages/checkouts/realm-core/src/realm/util/encrypted_file_mapping.hpp:150: [realm-core-11.9.0] Assertion failed: local_ndx < m_page_state.size() with (local_ndx, m_page_state.size()) = [213, 128]
0 Hidden App 0x0000000103838b38 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1 Hidden App 0x0000000103838eb4 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 300
2 Hidden App 0x0000000102f22880 ZN5realm4util19terminate_with_infoIJRmmEEEvPKciS4_S4_DpOT + 144
3 Hidden App 0x00000001037a57dc _ZNK5realm4util20EncryptedFileMapping26get_local_index_of_addressEPKvm + 220
4 Hidden App 0x00000001037a592c _ZN5realm4util20EncryptedFileMapping12read_barrierEPKvmPFmPKcE + 320
5 Hidden App 0x0000000102e0ea40 _ZN5realm4util26do_encryption_read_barrierEPKvmPFmPKcEPNS0_20EncryptedFileMappingE + 68
6 Hidden App 0x0000000102e0dd78 _ZN5realm4util23encryption_read_barrierEPKvmPNS0_20EncryptedFileMappingEPFmPKcE + 56
7 Hidden App 0x0000000102e19da0 _ZNK5realm9Allocator18translate_criticalEPNS0_14RefTranslationEm + 212
8 Hidden App 0x0000000102e10d88 _ZNK5realm9Allocator9translateEm + 68
9 Hidden App 0x0000000102e2c330 _ZN5realm5Array13init_from_refEm + 96
10 Hidden App 0x0000000102e5b49c _ZN5realm5Array16init_from_parentEv + 48
11 Hidden App 0x00000001037356ac _ZN5realm5Table4initEmPNS_11ArrayParentEmbb + 1016
12 Hidden App 0x0000000102f05c60 _ZN5realm5Group21create_table_accessorEm + 700
13 Hidden App 0x0000000102f05924 _ZN5realm5Group12do_get_tableEm + 208
14 Hidden App 0x0000000102ec3cf4 _ZNK5realm5Group12do_get_tableEm + 32
15 Hidden App 0x0000000102eb4110 _ZNK5realm5Group9get_tableENS_8TableKeyE + 156
16 Hidden App 0x000000010313e650 _ZN5realm12ObjectSchemaC2ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 220
17 Hidden App 0x000000010313edc8 _ZN5realm12ObjectSchemaC1ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 68
18 Hidden App 0x000000010315b8cc ZNSt3__19allocatorIN5realm12ObjectSchemaEE9constructIS2_JRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEEvPT_DpOT0 + 116
19 Hidden App 0x000000010315b7dc ZNSt3__116allocator_traitsINS_9allocatorIN5realm12ObjectSchemaEEEE9constructIS3_JRKNS2_5GroupERNS2_10StringDataERNS2_8TableKeyEEvEEvRS4_PT_DpOT0 + 104
20 Hidden App 0x000000010315b5a4 ZNSt3__16vectorIN5realm12ObjectSchemaENS_9allocatorIS2_EEE22__construct_one_at_endIJRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEEvDpOT + 128
21 Hidden App 0x000000010314f250 ZNSt3__16vectorIN5realm12ObjectSchemaENS_9allocatorIS2_EEE12emplace_backIJRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEERS2_DpOT + 116
22 Hidden App 0x000000010314efa8 _ZN5realm11ObjectStore17schema_from_groupERKNS_5GroupE + 268
23 Hidden App 0x000000010322da5c _ZN5realm5Realm32read_schema_from_group_if_neededEv + 292
24 Hidden App 0x000000010322d640 _ZN5realm5RealmC2ENS0_6ConfigENS_4util8OptionalINS_9VersionIDEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEENS0_13MakeSharedTagE + 428
25 Hidden App 0x000000010322dd10 _ZN5realm5RealmC1ENS0_6ConfigENS_4util8OptionalINS_9VersionIDEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEENS0_13MakeSharedTagE + 28
26 Hidden App 0x00000001030b4330 ZNSt3__120__shared_ptr_emplaceIN5realm5RealmENS_9allocatorIS2_EEEC2IJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEEES4_DpOT + 236
27 Hidden App 0x00000001030b3f8c ZNSt3__120__shared_ptr_emplaceIN5realm5RealmENS_9allocatorIS2_EEEC1IJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEEES4_DpOT + 60
28 Hidden App 0x00000001030b3e10 ZNSt3__1L15allocate_sharedIN5realm5RealmENS_9allocatorIS2_EEJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEvEENSA_IT_EERKT0_DpOT1 + 140
29 Hidden App 0x00000001030b3d50 ZNSt3__1L11make_sharedIN5realm5RealmEJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEvEENS8_IT_EEDpOT0 + 120
30 Hidden App 0x00000001030aa1ec _ZN5realm5Realm17make_shared_realmENS0_6ConfigENS_4util8OptionalINS_9VersionIDEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEE + 88
31 Hidden App 0x00000001030a97c4 _ZN5realm5_impl16RealmCoordinator12do_get_realmENS_5Realm6ConfigERNSt3__110shared_ptrIS2_EENS_4util8OptionalINS_9VersionIDEEERNS8_17CheckedUniqueLockE + 260
32 Hidden App 0x00000001030a9544 _ZN5realm5_impl16RealmCoordinator9get_realmENS_5Realm6ConfigENS_4util8OptionalINS_9VersionIDEEE + 584
33 Hidden App 0x000000010322e6a0 _ZN5realm5Realm16get_shared_realmENS0_6ConfigE + 140
34 Hidden App 0x0000000102d6ba30 +[RLMRealm realmWithConfiguration:queue:error:] + 1636
35 Hidden App 0x0000000102d6b378 +[RLMRealm realmWithConfiguration:error:] + 88
36 Hidden App 0x000000010266b210 -[BIQDatabase realm] + 500
37 Hidden App 0x000000010266b6a4 -[BIQDatabase saveEntity:] + 68
38 Hidden App 0x0000000102874c04 -[BIQRepository saveOrUpdateCurrentSettings:] + 92
39 Hidden App 0x00000001025da1e8 -[BIQLoginHandler updateUserOntoRepository:userSettings:organization:] + 332
40 Hidden App 0x00000001025dca64 __74-[BIQLoginHandler ssoUpdateRealmPathForDomain:password:email:loginSignal:]_block_invoke + 1616
41 ReactiveObjC 0x0000000107da4f80 __32-[RACSignal(Operations) doNext:]_block_invoke_2 + 68
42 ReactiveObjC 0x0000000107dbe1a4 -[RACSubscriber sendNext:] + 196
43 ReactiveObjC 0x0000000107d98340 -[RACPassthroughSubscriber sendNext:] + 364
44 ReactiveObjC 0x0000000107d98340 -[RACPassthroughSubscriber sendNext:] + 364
45 Hidden App 0x00000001026b2f4c __63-[BIQNetClient rac_requestPath:parameters:method:body:headers:]_block_invoke_2 + 1224
46 AFNetworking 0x000000010794f5e4 __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_2.108 + 164
47 libdispatch.dylib 0x0000000107cb3ff0 _dispatch_call_block_and_release + 32
48 libdispatch.dylib 0x0000000107cb5d24 _dispatch_client_callout + 20
49 libdispatch.dylib 0x0000000107cbf4d8 _dispatch_lane_serial_drain + 1704
50 libdispatch.dylib 0x0000000107cc0280 _dispatch_lane_invoke + 440
51 libdispatch.dylib 0x0000000107ccfb40 _dispatch_workloop_worker_thread + 1240
52 libsystem_pthread.dylib 0x0000000107ef0104 _pthread_wqthread + 288
53 libsystem_pthread.dylib 0x0000000107ef7c68 start_wqthread + 8!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2022-02-08 13:22:37.676654+0000 Hidden App[57128:388856] /Users/marcocattai/Library/Developer/Xcode/DerivedData/BoardIQ-bfkllaficffjmghegjncueyemgof/SourcePackages/checkouts/realm-core/src/realm/util/encrypted_file_mapping.hpp:150: [realm-core-11.9.0] Assertion failed: local_ndx < m_page_state.size() with (local_ndx, m_page_state.size()) = [213, 128]
0 Hidden App 0x0000000103838b38 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1 Hidden App 0x0000000103838eb4 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 300
2 Hidden App 0x0000000102f22880 ZN5realm4util19terminate_with_infoIJRmmEEEvPKciS4_S4_DpOT + 144
3 Hidden App 0x00000001037a57dc _ZNK5realm4util20EncryptedFileMapping26get_local_index_of_addressEPKvm + 220
4 Hidden App 0x00000001037a592c _ZN5realm4util20EncryptedFileMapping12read_barrierEPKvmPFmPKcE + 320
5 Hidden App 0x0000000102e0ea40 _ZN5realm4util26do_encryption_read_barrierEPKvmPFmPKcEPNS0_20EncryptedFileMappingE + 68
6 Hidden App 0x0000000102e0dd78 _ZN5realm4util23encryption_read_barrierEPKvmPNS0_20EncryptedFileMappingEPFmPKcE + 56
7 Hidden App 0x0000000102e19da0 _ZNK5realm9Allocator18translate_criticalEPNS0_14RefTranslationEm + 212
8 Hidden App 0x0000000102e10d88 _ZNK5realm9Allocator9translateEm + 68
9 Hidden App 0x0000000102e2c330 _ZN5realm5Array13init_from_refEm + 96
10 Hidden App 0x0000000102e5b49c _ZN5realm5Array16init_from_parentEv + 48
11 Hidden App 0x00000001037356ac _ZN5realm5Table4initEmPNS_11ArrayParentEmbb + 1016
12 Hidden App 0x0000000102f05c60 _ZN5realm5Group21create_table_accessorEm + 700
13 Hidden App 0x0000000102f05924 _ZN5realm5Group12do_get_tableEm + 208
14 Hidden App 0x0000000102ec3cf4 _ZNK5realm5Group12do_get_tableEm + 32
15 Hidden App 0x0000000102eb4110 _ZNK5realm5Group9get_tableENS_8TableKeyE + 156
16 Hidden App 0x000000010313e650 _ZN5realm12ObjectSchemaC2ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 220
17 Hidden App 0x000000010313edc8 _ZN5realm12ObjectSchemaC1ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 68
18 Hidden App 0x000000010315b8cc ZNSt3__19allocatorIN5realm12ObjectSchemaEE9constructIS2_JRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEEvPT_DpOT0 + 116
19 Hidden App 0x000000010315b7dc ZNSt3__116allocator_traitsINS_9allocatorIN5realm12ObjectSchemaEEEE9constructIS3_JRKNS2_5GroupERNS2_10StringDataERNS2_8TableKeyEEvEEvRS4_PT_DpOT0 + 104
20 Hidden App 0x000000010315b5a4 ZNSt3__16vectorIN5realm12ObjectSchemaENS_9allocatorIS2_EEE22__construct_one_at_endIJRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEEvDpOT + 128
21 Hidden App 0x000000010314f250 ZNSt3__16vectorIN5realm12ObjectSchemaENS_9allocatorIS2_EEE12emplace_backIJRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEERS2_DpOT + 116
22 Hidden App 0x000000010314efa8 _ZN5realm11ObjectStore17schema_from_groupERKNS_5GroupE + 268
23 Hidden App 0x000000010322da5c _ZN5realm5Realm32read_schema_from_group_if_neededEv + 292
24 Hidden App 0x000000010322d640 _ZN5realm5RealmC2ENS0_6ConfigENS_4util8OptionalINS_9VersionIDEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEENS0_13MakeSharedTagE + 428
25 Hidden App 0x000000010322dd10 _ZN5realm5RealmC1ENS0_6ConfigENS_4util8OptionalINS_9VersionIDEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEENS0_13MakeSharedTagE + 28
26 Hidden App 0x00000001030b4330 ZNSt3__120__shared_ptr_emplaceIN5realm5RealmENS_9allocatorIS2_EEEC2IJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEEES4_DpOT + 236
27 Hidden App 0x00000001030b3f8c ZNSt3__120__shared_ptr_emplaceIN5realm5RealmENS_9allocatorIS2_EEEC1IJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEEES4_DpOT + 60
28 Hidden App 0x00000001030b3e10 ZNSt3__1L15allocate_sharedIN5realm5RealmENS_9allocatorIS2_EEJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEvEENSA_IT_EERKT0_DpOT1 + 140
29 Hidden App 0x00000001030b3d50 ZNSt3__1L11make_sharedIN5realm5RealmEJNS2_6ConfigENS1_4util8OptionalINS1_9VersionIDEEENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEENS2_13MakeSharedTagEEvEENS8_IT_EEDpOT0 + 120
30 Hidden App 0x00000001030aa1ec _ZN5realm5Realm17make_shared_realmENS0_6ConfigENS_4util8OptionalINS_9VersionIDEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEE + 88
31 Hidden App 0x00000001030a97c4 _ZN5realm5_impl16RealmCoordinator12do_get_realmENS_5Realm6ConfigERNSt3__110shared_ptrIS2_EENS_4util8OptionalINS_9VersionIDEEERNS8_17CheckedUniqueLockE + 260
32 Hidden App 0x00000001030a9544 _ZN5realm5_impl16RealmCoordinator9get_realmENS_5Realm6ConfigENS_4util8OptionalINS_9VersionIDEEE + 584
33 Hidden App 0x000000010322e6a0 _ZN5realm5Realm16get_shared_realmENS0_6ConfigE + 140
34 Hidden App 0x0000000102d6ba30 +[RLMRealm realmWithConfiguration:queue:error:] + 1636
35 Hidden App 0x0000000102d6b378 +[RLMRealm realmWithConfiguration:error:] + 88
36 Hidden App 0x000000010266b210 -[BIQDatabase realm] + 500
37 Hidden App 0x000000010266b6a4 -[BIQDatabase saveEntity:] + 68
38 Hidden App 0x0000000102874c04 -[BIQRepository saveOrUpdateCurrentSettings:] + 92
39 Hidden App 0x00000001025da1e8 -[BIQLoginHandler updateUserOntoRepository:userSettings:organization:] + 332
40 Hidden App 0x00000001025dca64 __74-[BIQLoginHandler ssoUpdateRealmPathForDomain:password:email:loginSignal:]_block_invoke + 1616
41 ReactiveObjC 0x0000000107da4f80 __32-[RACSignal(Operations) doNext:]_block_invoke_2 + 68
42 ReactiveObjC 0x0000000107dbe1a4 -[RACSubscriber sendNext:] + 196
43 ReactiveObjC 0x0000000107d98340 -[RACPassthroughSubscriber sendNext:] + 364
44 ReactiveObjC 0x0000000107d98340 -[RACPassthroughSubscriber sendNext:] + 364
45 Hidden App 0x00000001026b2f4c __63-[BIQNetClient rac_requestPath:parameters:method:body:headers:]_block_invoke_2 + 1224
46 AFNetworking 0x000000010794f5e4 __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_2.108 + 164
47 libdispatch.dylib 0x0000000107cb3ff0 _dispatch_call_block_and_release + 32
48 libdispatch.dylib 0x0000000107cb5d24 _dispatch_client_callout + 20
49 libdispatch.dylib 0x0000000107cbf4d8 _dispatch_lane_serial_drain + 1704
50 libdispatch.dylib 0x0000000107cc0280 _dispatch_lane_invoke + 440
51 libdispatch.dylib 0x0000000107ccfb40 _dispatch_workloop_worker_thread + 1240
52 libsystem_pthread.dylib 0x0000000107ef0104 _pthread_wqthread + 288
53 libsystem_pthread.dylib 0x0000000107ef7c68 start_wqthread + 8!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose
The text was updated successfully, but these errors were encountered: