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

Bugfix for client reset with recovery #5957

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Conversation

ironage
Copy link
Contributor

@ironage ironage commented Oct 19, 2022

The path iteration code was missing handling of single link columns.

This could result in an assertion failure during recovery as reported by internal link.

/Users/realm/workspace/realm_realm-core_release_12.9.0/src/realm/sync/noinst/client_reset_recovery.cpp:525: [realm-core-12.9.0] Assertion failed: col.is_dictionary()
0   Realm                               0x0000000114867c8c _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Realm                               0x0000000114867b91 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 385
2   Realm                               0x00000001148f07a2 _ZN5realm5_impl12client_reset29RecoverLocalChangesetsHandler12resolve_pathERNS1_8ListPathENS_3ObjES5_NS_4util14UniqueFunctionIFvRNS_7LstBaseES9_EEE + 1250
3   Realm                               0x00000001148f01de _ZN5realm5_impl12client_reset29RecoverLocalChangesetsHandler7resolveERNS1_8ListPathENS_4util14UniqueFunctionIFvRNS_7LstBaseES8_EEE + 702
4   Realm                               0x00000001148efd9d _ZN5realm5_impl12client_reset29RecoverLocalChangesetsHandler37copy_lists_with_unrecoverable_changesEv + 301
5   Realm                               0x00000001148ef2e3 _ZN5realm5_impl12client_reset29RecoverLocalChangesetsHandler18process_changesetsERKNSt3__16vectorINS_4sync13ClientHistory11LocalChangeENS3_9allocatorIS7_EEEEONS4_INS5_15SubscriptionSetENS8_ISD_EEEE + 819
6   Realm                               0x00000001148ea9d2 _ZN5realm5_impl12client_reset25perform_client_reset_diffENSt3__110shared_ptrINS_2DBEEES5_NS_4sync15SaltedFileIdentERNS_4util6LoggerENS_16ClientResyncModeEbPbPNS6_17SubscriptionStoreENS8_14UniqueFunctionIFvxEEE + 2002
7   Realm                               0x00000001148ecadc _ZN5realm5_impl20ClientResetOperation8finalizeENS_4sync15SaltedFileIdentEPNS2_17SubscriptionStoreENS_4util14UniqueFunctionIFvxEEE + 444
8   Realm                               0x00000001148d7a29 _ZN5realm4sync10ClientImpl7Session21receive_ident_messageENS0_15SaltedFileIdentE + 297
9   Realm                               0x00000001148d78ce _ZN5realm4sync10ClientImpl10Connection21receive_ident_messageEyNS0_15SaltedFileIdentE + 286
10  Realm                               0x00000001148d386d _ZN5realm5_impl14ClientProtocol22parse_message_receivedINS_4sync10ClientImpl10ConnectionEEEvRT_NSt3__117basic_string_viewIcNS8_11char_traitsIcEEEE + 557
11  Realm                               0x00000001148d11a4 _ZN5realm4sync10ClientImpl10Connection33websocket_binary_message_receivedEPKcm + 52
12  Realm                               0x000000011493aeac _ZN12_GLOBAL__N_19WebSocket17frame_reader_loopEv + 1436
13  Realm                               0x000000011492d1a0 _ZN5realm4util7network7Service9AsyncOper22do_recycle_and_executeINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEJRS7_RmEEEvbRT_DpOT0_ + 160
14  Realm                               0x000000011492ccc2 _ZN5realm4util7network7Service14BasicStreamOpsINS1_3ssl6StreamEE16BufferedReadOperINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEE19recycle_and_executeEv + 178
15  Realm                               0x000000011492fe35 _ZN5realm4util7network7Service4Impl3runEv + 517
16  Realm                               0x00000001148a0add _ZN5realm4sync6Client3runEv + 29

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed.

@cla-bot cla-bot bot added the cla: yes label Oct 19, 2022
@ironage ironage self-assigned this Oct 19, 2022
@ironage ironage merged commit 5f7da2c into master Oct 20, 2022
@ironage ironage deleted the js/recovery-column-bug branch October 20, 2022 17:31
@ironage ironage mentioned this pull request Oct 24, 2022
tgoyne added a commit that referenced this pull request Oct 26, 2022
…nification

* origin/master: (22 commits)
  Fix a race condition in error reporting for async open (#5968)
  Updated release notes
  version bump to 12.11.0
  Fix a deadlock with simultaneous sync and nonsync commit notifications while tearing down RealmCoordinator (#5948)
  Track the last line seen and report it when there's an uncaught exception
  Verify that the same key is used when opening multiple DBs for a file
  Add stricter checks for valid reads on encrypted files
  Run core tests with encryption enabled on windows (#5967)
  Fix assertion failures after calling SectionedResults::reset_section_callback() (#5965)
  Add sync integration test for in-memory mode (#5955)
  Added realm core version to app login request (#5961)
  The client sending too much data is now reported as a ProtocolError::limits_exceeded (#5956)
  Updated release notes
  release core v12.10.0
  Fix C-API for realm_object_get_parent (#5960)
  fixed a bug in recovery when copying embedded lists with a single link property prefix in the path (#5957)
  Js/sectioned notification (#5926)
  Use named apikey callbacks
  Fix IN query with TypedLink as left operator
  Fix a use-after-free in client reset when the original RealmCoordinator is gone (#5949)
  ...
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants