Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81905

Fix the invariant message in createCollectionForApplyOps()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution NAMR Team 2023-10-16
    • 148

      Noticed this issue while debugging a build failure where we were accessing invalid memory

      [j7:rs1:prim] | 2023-09-15T12:59:03.938+00:00 F  CONTROL  6384300 [TenantMigrationWriter-0] "Writing fatal message","attr":{"message":"Invalid access at address: 0x1\n"}
      [j7:rs1:prim] | 2023-09-15T12:59:03.938+00:00 F  CONTROL  6384300 [TenantMigrationWriter-0] "Writing fatal message","attr":{"message":"Dumping siginfo (si_code=1): 0b 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n"}
      [j7:rs1:prim] | 2023-09-15T12:59:03.938+00:00 F  CONTROL  6384300 [TenantMigrationWriter-0] "Writing fatal message","attr":{"message":"Got signal: 11 (Segmentation fault).\n"}
      [j7:rs1:prim] | 2023-09-15T12:59:03.991+00:00 I  CONTROL  31380   [TenantMigrationWriter-0] "BACKTRACE","attr":{"bt":{"backtrace":[{"a":"7F2688B07C18","b":"7F26888C3000","o":"244C18","s":"_ZN5mongo15printStackTraceEv","C":"mongo::printStackTrace()","s+":"38"},{"a":"7F2688B02A9C","b":"7F26888C3000","o":"23FA9C","s":"abruptQuitWithAddrSignal","s+":"13C"},{"a":"7F2686940D80","b":"7F268692E000","o":"12D80","s":"funlockfile","s+":"50"},{"a":"7F2689081809","b":"7F2689054000","o":"2D809","s":"_ZNK5mongo15NamespaceString20toStringWithTenantIdB5cxx11Ev","C":"mongo::NamespaceString::toStringWithTenantId[abi:cxx11]() const","s+":"29"},{"a":"7F267E15C981","b":"7F267E0E9000","o":"73981","s":"_ZN5mongo27createCollectionForApplyOpsEPNS_16OperationContextERKNS_12DatabaseNameERKN5boost8optionalINS_4UUIDEEERKNS_7BSONObjEbRKNS6_ISB_EE","C":"mongo::createCollectionForApplyOps(mongo::OperationContext*, mongo::DatabaseName const&, boost::optional<mongo::UUID> const&, mongo::BSONObj const&, bool, boost::optional<mongo::BSONObj> const&)","s+":"FB1"},{"a":"7F26837418CB","b":"7F26836FB000","o":"468CB","s":"_ZNK5mongo4repl12_GLOBAL__N_1L7kOpsMapMUlPNS_16OperationContextERKNS0_16ApplierOperationENS0_16OplogApplication4ModeEE_clES3_S6_S8_.constprop.0.isra.0","C":"mongo::repl::(anonymous namespace)::kOpsMap::{lambda(mongo::OperationContext*, mongo::repl::ApplierOperation const&, mongo::repl::OplogApplication::Mode)#1}::operator()(mongo::OperationContext, mongo::repl::ApplierOperation const, mongo::repl::OplogApplication) const [clone .constprop.0] [clone .isra.0]","s+":"2CB"},{"a":"7F26837420B0","b":"7F26836FB000","o":"470B0","s":"_ZNSt17_Function_handlerIFN5mongo6StatusEPNS0_16OperationContextERKNS0_4repl16ApplierOperationENS4_16OplogApplication4ModeEENS4_12_GLOBAL__N_1L7kOpsMapMUlS3_S7_S9_E_EE9_M_invokeERKSt9_Any_dataOS3_S7_OS9_","C":"std::_Function_handler<mongo::Status (mongo::OperationContext*, mongo::repl::ApplierOperation const&, mongo::repl::OplogApplication::Mode), mongo::repl::(anonymous namespace)::kOpsMap::{lambda(mongo::OperationContext*, mongo::repl::ApplierOperation const&, mongo::repl::OplogApplication::Mode)#1}>::_M_invoke(std::_Any_data const&, mongo::OperationContext*&&, mongo::repl::ApplierOperation const&, mongo::repl::OplogApplication::Mode&&)","s+":"30"},{"a":"7F2683748E21","b":"7F26836FB000","o":"4DE21","s":"_ZN5mongo4repl19applyCommand_inlockEPNS_16OperationContextERKNS0_16ApplierOperationENS0_16OplogApplication4ModeE","C":"mongo::repl::applyCommand_inlock(mongo::OperationContext*, mongo::repl::ApplierOperation const&, mongo::repl::OplogApplication::Mode)","s+":"AD1"},{"a":"7F2683BB9E9C","b":"7F2683B6B000","o":"4EE9C","s":"_ZN5mongo4repl17OplogApplierUtils37applyOplogEntryOrGroupedInsertsCommonEPNS_16OperationContextERKNS0_26OplogEntryOrGroupedInsertsENS0_16OplogApplication4ModeEbSt8functionIFvvEEPNS_10OpCountersE","C":"mongo::repl::OplogApplierUtils::applyOplogEntryOrGroupedInsertsCommon(mongo::OperationContext*, mongo::repl::OplogEntryOrGroupedInserts const&, mongo::repl::OplogApplication::Mode, bool, std::function<void ()>, mongo::OpCounters*)","s+":"31C"},{"a":"7F267C0BA942","b":"7F267C076000","o":"44942","s":"_ZN5mongo4repl18TenantOplogApplier32_applyOplogEntryOrGroupedInsertsEPNS_16OperationContextERKNS0_26OplogEntryOrGroupedInsertsENS0_16OplogApplication4ModeEb","C":"mongo::repl::TenantOplogApplier::_applyOplogEntryOrGroupedInserts(mongo::OperationContext*, mongo::repl::OplogEntryOrGroupedInserts const&, mongo::repl::OplogApplication::Mode, bool)","s+":"112"},{"a":"7F267C0BB4FE","b":"7F267C076000","o":"454FE","s":"_ZNSt17_Function_handlerIFN5mongo6StatusEPNS0_16OperationContextERKNS0_4repl26OplogEntryOrGroupedInsertsENS4_16OplogApplication4ModeEbEZNS4_18TenantOplogApplier25_applyOplogBatchPerWorkerEPSt6vectorINS4_16ApplierOperationESaISD_EEEUlS3_S7_S9_bE_E9_M_invokeERKSt9_Any_dataOS3_S7_OS9_Ob","C":"std::_Function_handler<mongo::Status (mongo::OperationContext*, mongo::repl::OplogEntryOrGroupedInserts const&, mongo::repl::OplogApplication::Mode, bool), mongo::repl::TenantOplogApplier::_applyOplogBatchPerWorker(std::vector<mongo::repl::ApplierOperation, std::allocator<mongo::repl::ApplierOperation> >*)::{lambda(mongo::OperationContext*, mongo::repl::OplogEntryOrGroupedInserts const&, mongo::repl::OplogApplication::Mode, bool)#1}>::_M_invoke(std::_Any_data const&, mongo::OperationContext*&&, mongo::repl::OplogEntryOrGroupedInserts const&, mongo::repl::OplogApplication::Mode&&, bool&&)","s+":"2E"},{"a":"7F2683BB839E","b":"7F2683B6B000","o":"4D39E","s":"_ZN5mongo4repl17OplogApplierUtils21applyOplogBatchCommonEPNS_16OperationContextEPSt6vectorINS0_16ApplierOperationESaIS5_EENS0_16OplogApplication4ModeEbbSt8functionIFNS_6StatusES3_RKNS0_26OplogEntryOrGroupedInsertsESA_bEE","C":"mongo::repl::OplogApplierUtils::applyOplogBatchCommon(mongo::OperationContext*, std::vector<mongo::repl::ApplierOperation, std::allocator<mongo::repl::ApplierOperation> >*, mongo::repl::OplogApplication::Mode, bool, bool, std::function<mongo::Status (mongo::OperationContext*, mongo::repl::OplogEntryOrGroupedInserts const&, mongo::repl::OplogApplication::Mode, bool)>)","s+":"25E"},{"a":"7F267C0B8C63","b":"7F267C076000","o":"42C63","s":"_ZN5mongo4repl18TenantOplogApplier25_applyOplogBatchPerWorkerEPSt6vectorINS0_16ApplierOperationESaIS3_EE","C":"mongo::repl::TenantOplogApplier::_applyOplogBatchPerWorker(std::vector<mongo::repl::ApplierOperation, std::allocator<mongo::repl::ApplierOperation> >*)","s+":"153"},{"a":"7F267C0B8F51","b":"7F267C076000","o":"42F51","s":"_ZZN5mongo15unique_functionIFvNS_6StatusEEE8makeImplIZNS_4repl18TenantOplogApplier16_applyOplogBatchEPNS5_16TenantOplogBatchEEUlT_E0_EEDaOS9_EN12SpecificImpl4callEOS1_","C":"mongo::unique_function<void (mongo::Status)>::makeImpl<mongo::repl::TenantOplogApplier::_applyOplogBatch(mongo::repl::TenantOplogBatch*)::{lambda(auto:1)#2}>(mongo::repl::TenantOplogApplier::_applyOplogBatch(mongo::repl::TenantOplogBatch*)::{lambda(auto:1)#2}&&)::SpecificImpl::call(mongo::Status&&)","s+":"81"},{"a":"7F267D134F7D","b":"7F267D127000","o":"DF7D","s":"_ZN5mongo10ThreadPool4Impl10_doOneTaskEPSt11unique_lockINS_12latch_detail5LatchEE","C":"mongo::ThreadPool::Impl::_doOneTask(std::unique_lock<mongo::latch_detail::Latch>*)","s+":"13D"},{"a":"7F267D135D81","b":"7F267D127000","o":"ED81","s":"_ZN5mongo10ThreadPool4Impl13_consumeTasksEv","C":"mongo::ThreadPool::Impl::_consumeTasks()","s+":"81"},{"a":"7F267D137183","b":"7F267D127000","o":"10183","s":"_ZN5mongo10ThreadPool4Impl17_workerThreadBodyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE","C":"mongo::ThreadPool::Impl::_workerThreadBody(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)","s+":"283"},{"a":"7F267D1375F0","b":"7F267D127000","o":"105F0","s":"_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN5mongo4stdx6threadC4IZNS3_10ThreadPool4Impl25_startWorkerThread_inlockEvEUlvE2_JELi0EEET_DpOT0_EUlvE_EEEEE6_M_runEv","C":"std::thread::_State_impl<std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::ThreadPool::Impl::_startWorkerThread_inlock()::{lambda()#4}, , 0>(mongo::ThreadPool::Impl::_startWorkerThread_inlock()::{lambda()#4})::{lambda()#1}> > >::_M_run()","s+":"60"},{"a":"7F2687FEEA14","b":"7F2687FEA000","o":"4A14","s":"execute_native_thread_routine","s+":"14"},{"a":"7F26869362DE","b":"7F268692E000","o":"82DE","s":"start_thread","s+":"FE"},{"a":"7F2686664A63","b":"7F2686568000","o":"FCA63","s":"clone","s+":"43"}],"processInfo":{"mongodbVersion":"7.2.0-alpha-164-g5b8d8a3","gitVersion":"5b8d8a30ba2a22eada4abf7bf4f1e7644c89f13b","compiledModules":["enterprise"],"uname":{"sysname":"Linux","release":"4.18.0-80.1.2.el8_0.x86_64","version":"#1 SMP Sun Apr 28 09:21:22 UTC 2019","machine":"x86_64"},"somap":[{"b":"7F2689054000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/libserver_base.so","elfType":3,"buildId":"3FAE11A34047ABA7"},{"b":"7F26888C3000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/libbase.so","elfType":3,"buildId":"38EB88A4B18488C1"},{"b":"7F2687FEA000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/libabsl_base.so","elfType":3,"buildId":"175AF8F5227A44B2"},{"b":"7F268692E000","path":"/lib64/libpthread.so.0","elfType":3,"buildId":"5326B8728FA01B7149DAC943100F1405533E76CE"},{"b":"7F2686568000","path":"/lib64/libc.so.6","elfType":3,"buildId":"0598B7D6A05E64AE676133CF6331AF5578888AD0"},{"b":"7F2683B6B000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/../lib/liboplog_application.so","elfType":3,"buildId":"1390B76DC033411B"},{"b":"7F26836FB000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/../lib/liboplog.so","elfType":3,"buildId":"6B14E25067C4353C"},{"b":"7F267E0E9000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/../lib/libcatalog_helpers.so","elfType":3,"buildId":"379C2EEDAC818A2F"},{"b":"7F267D127000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/../lib/libthread_pool.so","elfType":3,"buildId":"B3410C0926C0F292"},{"b":"7F267C076000","path":"/data/mci/b38bc328974dc8a1a8ca17d33f44ec0f/src/dist-test/bin/../lib/../lib/../lib/libtenant_oplog_processing.so","elfType":3,"buildId":"7F768E60A83B836C"}]}}},"tags":[]
      [j7:rs1:prim] | 2023-09-15T12:59:03.992+00:00 I  CONTROL  31445   [TenantMigrationWriter-0] "Frame","attr":{"frame":{"a":"7F2688B07C18","b":"7F26888C3000","o":"244C18","s":"_ZN5mongo15printStackTraceEv","C":"mongo::printStackTrace()","s+":"38"}}
      [j7:rs1:prim] | 2023-09-15T12:59:03.992+00:00 I  CONTROL  31445   [TenantMigrationWriter-0] "Frame","attr":{"frame":{"a":"7F2688B02A9C","b":"7F26888C3000","o":"23FA9C","s":"abruptQuitWithAddrSignal","s+":"13C"}}
      [j7:rs1:prim] | 2023-09-15T12:59:03.992+00:00 I  CONTROL  31445   [TenantMigrationWriter-0] "Frame","attr":{"frame":{"a":"7F2686940D80","b":"7F268692E000","o":"12D80","s":"funlockfile","s+":"50"}}
      [j7:rs1:prim] | 2023-09-15T12:59:03.992+00:00 I  CONTROL  31445   [TenantMigrationWriter-0] "Frame","attr":{"frame":{"a":"7F2689081809","b":"7F2689054000","o":"2D809","s":"_ZNK5mongo15NamespaceString20toStringWithTenantIdB5cxx11Ev","C":"mongo::NamespaceString::toStringWithTenantId[abi:cxx11]() const","s+":"29"}}
      [j7:rs1:prim] | 2023-09-15T12:59:03.992+00:00 I  CONTROL  31445   [TenantMigrationWriter-0] "Frame","attr":{"frame":{"a":"7F267E15C981","b":"7F267E0E9000","o":"73981","s":"_ZN5mongo27createCollectionForApplyOpsEPNS_16OperationContextERKNS_12DatabaseNameERKN5boost8optionalINS_4UUIDEEERKNS_7BSONObjEbRKNS6_ISB_EE","C":"mongo::createCollectionForApplyOps(mongo::OperationContext*, mongo::DatabaseName const&, boost::optional<mongo::UUID> const&, mongo::BSONObj const&, bool, boost::optional<mongo::BSONObj> const&)","s+":"FB1"}}
      

            Assignee:
            suganthi.mani@mongodb.com Suganthi Mani
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: