Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1036

PBS: Assertion failed: from_link_ndx != to_link_ndx

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Discovered while fuzz testing Partition Based Sync. I will attach client/server/op logs, the offending realms, and a dump of __realm_sync. This is the stack trace:

       

       

      realm-core/src/realm/impl/transact_log.hpp:721: [realm-core-11.13.0] Assertion failed: from_link_ndx != to_link_ndx
      0   SwiftObjectServerTests              0x00000001352d6e9c _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1   SwiftObjectServerTests              0x00000001352d711e _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 238
      2   SwiftObjectServerTests              0x00000001349a9996 _ZN5realm5_impl18TransactLogEncoder9list_moveEmm + 102
      3   SwiftObjectServerTests              0x00000001349a605b _ZN5realm11Replication9list_moveERKNS_14CollectionBaseEmm + 107
      4   SwiftObjectServerTests              0x0000000135089d47 _ZN5realm4sync15SyncReplication9list_moveERKNS_14CollectionBaseEmm + 55
      5   SwiftObjectServerTests              0x00000001349d3db7 _ZN5realm3LstINS_6ObjKeyEE4moveEmm + 215
      6   SwiftObjectServerTests              0x000000013507a430 _ZZN5realm4sync18InstructionApplierclERKNS0_5instr9ArrayMoveEENK4$_21clERNS_7LstBaseEm + 416
      7   SwiftObjectServerTests              0x000000013507a282 _ZN5realm4util14UniqueFunctionIFvRNS_7LstBaseEmEE17call_regular_voidIZNS_4sync18InstructionApplierclERKNS7_5instr9ArrayMoveEE4$_21EEvNSt3__117integral_constantIbLb1EEERT_S3_Om + 66
      8   SwiftObjectServerTests              0x000000013507a216 _ZN5realm4util14UniqueFunctionIFvRNS_7LstBaseEmEE12SpecificImplIZNS_4sync18InstructionApplierclERKNS7_5instr9ArrayMoveEE4$_21E4callES3_Om + 70
      9   SwiftObjectServerTests              0x000000013507dd14 _ZNK5realm4util14UniqueFunctionIFvRNS_7LstBaseEmEEclES3_m + 148
      10  SwiftObjectServerTests              0x000000013507dc75 _ZZN5realm4sync18InstructionApplier12resolve_listERKNS0_5instr15PathInstructionEPKcONS_4util14UniqueFunctionIFvRNS_7LstBaseEmEEEENK4$_23clESB_m + 37
      11  SwiftObjectServerTests              0x000000013507d44d _ZN5realm4sync18InstructionApplier20resolve_list_elementINS_4util8overloadIJZNS1_12resolve_listERKNS0_5instr15PathInstructionEPKcONS3_14UniqueFunctionIFvRNS_7LstBaseEmEEEE4$_23ZNS1_12resolve_listES8_SA_SG_E4$_24ZNS1_12resolve_listES8_SA_SG_E4$_25ZNS1_12resolve_listES8_SA_SG_E4$_26ZNS1_12resolve_listES8_SA_SG_E4$_27ZNS1_12resolve_listES8_SA_SG_E4$_28EEEEEvSD_mNSt3__111__wrap_iterIPKN5mpark7variantIJNS0_12InternStringEjEEEEESW_SA_OT_ + 93
      12  SwiftObjectServerTests              0x000000013507ccc9 _ZN5realm4sync18InstructionApplier13resolve_fieldINS_4util8overloadIJZNS1_12resolve_listERKNS0_5instr15PathInstructionEPKcONS3_14UniqueFunctionIFvRNS_7LstBaseEmEEEE4$_23ZNS1_12resolve_listES8_SA_SG_E4$_24ZNS1_12resolve_listES8_SA_SG_E4$_25ZNS1_12resolve_listES8_SA_SG_E4$_26ZNS1_12resolve_listES8_SA_SG_E4$_27ZNS1_12resolve_listES8_SA_SG_E4$_28EEEEEvRNS_3ObjENS0_12InternStringENSt3__111__wrap_iterIPKN5mpark7variantIJSQ_jEEEEESY_SA_OT_ + 1673
      13  SwiftObjectServerTests              0x0000000135058fcd _ZN5realm4sync18InstructionApplier12resolve_pathINS_4util8overloadIJZNS1_12resolve_listERKNS0_5instr15PathInstructionEPKcONS3_14UniqueFunctionIFvRNS_7LstBaseEmEEEE4$_23ZNS1_12resolve_listES8_SA_SG_E4$_24ZNS1_12resolve_listES8_SA_SG_E4$_25ZNS1_12resolve_listES8_SA_SG_E4$_26ZNS1_12resolve_listES8_SA_SG_E4$_27ZNS1_12resolve_listES8_SA_SG_E4$_28EEEEEvS8_SA_OT_ + 653
      14  SwiftObjectServerTests              0x000000013505877c _ZN5realm4sync18InstructionApplier12resolve_listERKNS0_5instr15PathInstructionEPKcONS_4util14UniqueFunctionIFvRNS_7LstBaseEmEEE + 300
      15  SwiftObjectServerTests              0x0000000135058845 _ZN5realm4sync18InstructionApplierclERKNS0_5instr9ArrayMoveE + 85
      16  SwiftObjectServerTests              0x00000001350ccb6d _ZNK5realm4sync11Instruction5visitIRNS0_18InstructionApplierEEEDcOT_ + 653
      17  SwiftObjectServerTests              0x00000001350cc893 _ZN5realm4sync18InstructionApplier5applyIS1_EEvRT_RKNS0_9ChangesetEPNS_4util6LoggerE + 147
      18  SwiftObjectServerTests              0x00000001350c65f5 _ZN5realm4sync18InstructionApplier5applyERKNS0_9ChangesetEPNS_4util6LoggerE + 37
      19  SwiftObjectServerTests              0x00000001350c5b09 _ZN5realm4sync13ClientHistory27integrate_server_changesetsERKNS0_12SyncProgressEPKyPKNS0_11Transformer15RemoteChangesetEmRNS0_11VersionInfoENS0_18DownloadBatchStateERNS_4util6LoggerEPNS1_20SyncTransactReporterE + 1497
      20  SwiftObjectServerTests              0x00000001350e23eb _ZN5realm4sync10ClientImpl7Session20integrate_changesetsERNS0_17ClientReplicationERKNS0_12SyncProgressEyRKNSt3__16vectorINS0_11Transformer15RemoteChangesetENS8_9allocatorISB_EEEERNS0_11VersionInfoENS0_18DownloadBatchStateE + 475
      21  SwiftObjectServerTests              0x000000013502cb48 _ZN5realm4sync10ClientImpl7Session29initiate_integrate_changesetsEyNS0_18DownloadBatchStateERKNSt3__16vectorINS0_11Transformer15RemoteChangesetENS4_9allocatorIS7_EEEE + 408
      22  SwiftObjectServerTests              0x00000001350e17b2 _ZN5realm4sync10ClientImpl7Session24receive_download_messageERKNS0_12SyncProgressEyNS0_18DownloadBatchStateExRKNSt3__16vectorINS0_11Transformer15RemoteChangesetENS7_9allocatorISA_EEEE + 1426
      23  SwiftObjectServerTests              0x00000001350e120f _ZN5realm4sync10ClientImpl10Connection24receive_download_messageEyRKNS0_12SyncProgressEyxNS0_18DownloadBatchStateERKNSt3__16vectorINS0_11Transformer15RemoteChangesetENS7_9allocatorISA_EEEE + 175
      24  SwiftObjectServerTests              0x00000001350f9ae0 _ZN5realm5_impl14ClientProtocol22parse_download_messageINS_4sync10ClientImpl10ConnectionEEEvRT_RNS0_16HeaderLineParserE + 2688
      25  SwiftObjectServerTests              0x00000001350de83a _ZN5realm5_impl14ClientProtocol22parse_message_receivedINS_4sync10ClientImpl10ConnectionEEEvRT_NSt3__117basic_string_viewIcNS8_11char_traitsIcEEEE + 442
      26  SwiftObjectServerTests              0x00000001350db8fb _ZN5realm4sync10ClientImpl10Connection23handle_message_receivedEPKcm + 75
      27  SwiftObjectServerTests              0x00000001350db798 _ZN5realm4sync10ClientImpl10Connection33websocket_binary_message_receivedEPKcm + 152
      28  SwiftObjectServerTests              0x0000000135250d1a _ZN5realm4util9websocket12_GLOBAL__N_112EZSocketImpl33websocket_binary_message_receivedEPKcm + 42
      29  SwiftObjectServerTests              0x00000001352eba43 _ZN12_GLOBAL__N_19WebSocket17frame_reader_loopEv + 227
      30  SwiftObjectServerTests              0x00000001352edae5 _ZZN12_GLOBAL__N_19WebSocket17frame_reader_loopEvENKUlNSt3__110error_codeEmE_clES2_m + 181
      31  SwiftObjectServerTests              0x00000001352eda20 _ZN5realm4util14UniqueFunctionIFvNSt3__110error_codeEmEE17call_regular_voidIZN12_GLOBAL__N_19WebSocket17frame_reader_loopEvEUlS3_mE_EEvNS2_17integral_constantIbLb1EEERT_OS3_Om + 80
      32  SwiftObjectServerTests              0x00000001352ed9a6 _ZN5realm4util14UniqueFunctionIFvNSt3__110error_codeEmEE12SpecificImplIZN12_GLOBAL__N_19WebSocket17frame_reader_loopEvEUlS3_mE_E4callEOS3_Om + 70
      33  SwiftObjectServerTests              0x0000000135263af7 _ZNK5realm4util14UniqueFunctionIFvNSt3__110error_codeEmEEclES3_m + 151
      34  SwiftObjectServerTests              0x0000000135263a54 _ZN5realm4util7network7Service9AsyncOper29do_recycle_and_execute_helperINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEJS7_mEEEvbRbT_DpT0_ + 116
      35  SwiftObjectServerTests              0x0000000135263950 _ZN5realm4util7network7Service9AsyncOper22do_recycle_and_executeINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEJRS7_RmEEEvbRT_DpOT0_ + 144
      36  SwiftObjectServerTests              0x0000000135265193 _ZN5realm4util7network7Service14BasicStreamOpsINS1_6SocketEE16BufferedReadOperINS0_14UniqueFunctionIFvNSt3__110error_codeEmEEEE19recycle_and_executeEv + 659
      37  SwiftObjectServerTests              0x00000001352b806d _ZN5realm4util7network7Service4Impl7executeERNSt3__110unique_ptrINS2_9AsyncOperENS2_18LendersOperDeleterEEE + 29
      38  SwiftObjectServerTests              0x00000001352b30dd _ZN5realm4util7network7Service4Impl3runEv + 301
      39  SwiftObjectServerTests              0x00000001352b2f7d _ZN5realm4util7network7Service3runEv + 29
      40  SwiftObjectServerTests              0x000000013502a1db _ZN5realm4sync10ClientImpl3runEv + 59
      41  SwiftObjectServerTests              0x00000001350315dd _ZN5realm4sync6Client3runEv + 29
      42  SwiftObjectServerTests              0x0000000134da507f _ZZN5realm5_impl10SyncClientC1ENSt3__110unique_ptrINS_4util6LoggerENS2_14default_deleteIS5_EEEERKNS_16SyncClientConfigENS2_8weak_ptrIKNS_11SyncManagerEEEENKUlvE0_clEv + 255
      43  SwiftObjectServerTests              0x0000000134da4f45 _ZNSt3__1L8__invokeIZN5realm5_impl10SyncClientC1ENS_10unique_ptrINS1_4util6LoggerENS_14default_deleteIS6_EEEERKNS1_16SyncClientConfigENS_8weak_ptrIKNS1_11SyncManagerEEEEUlvE0_JEEEDTclscT_fp_spscT0_fp0_EEOSI_DpOSJ_ + 21
      44  SwiftObjectServerTests              0x0000000134da4ee5 _ZNSt3__1L16__thread_executeINS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEZN5realm5_impl10SyncClientC1ENS1_INS6_4util6LoggerENS3_ISA_EEEERKNS6_16SyncClientConfigENS_8weak_ptrIKNS6_11SyncManagerEEEEUlvE0_JEJEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 37
      45  SwiftObjectServerTests              0x0000000134da4792 _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN5realm5_impl10SyncClientC1ENS2_INS7_4util6LoggerENS4_ISB_EEEERKNS7_16SyncClientConfigENS_8weak_ptrIKNS7_11SyncManagerEEEEUlvE0_EEEEEPvSN_ + 98
      46  libsystem_pthread.dylib             0x00007ff80c8684e1 _pthread_start + 125
      

       

      cc mikeo@mongodb.com tyler.kaye@mongodb.com 

        1. server_logs.txt
          1.94 MB
        2. operations.6252955910f0cf3802922b89.realm
          3.00 MB
        3. operations.6252955810f0cf3802922b7a.realm
          6.00 MB
        4. operations.6252954e10f0cf3802922b19.realm
          5.00 MB
        5. client_logs.txt
          136.02 MB
        6. %22foo%22.6252955910f0cf3802922b89.realm
          3.00 MB
        7. %22foo%22.6252955810f0cf3802922b7a.realm
          5.00 MB
        8. %22foo%22.6252954e10f0cf3802922b19.realm
          5.00 MB
        9. __realm_sync.zip
          21.56 MB

            Assignee:
            Unassigned Unassigned
            Reporter:
            jason.flax@mongodb.com Jason Flax
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: