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

Investigate potential deadlock with index builds

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • Execution Team 2023-04-03

      During SERVER-71198 we uncovered that the deadlock described by SERVER-71191 and SERVER-44722 could theoretically occur during index cleanup in a rollback.

      Running resmoke with --suite=replica_sets jstests/replsets/rollback_index_build_start_abort.js and the attached patch will yield an invariant error. The following two lines from this backtrace are relevant:

      [js_test:geo_near_bounds_overflow] Fixture status:
      ...
      [j7:prim] | 2023-01-19T14:29:54.969+00:00 I  CONTROL  31445   [IndexBuildsCoordinatorMongod-0] "Frame","attr":\{"frame":{"a":"7FA8C4FA0649","b":"7FA8C4F56000","o":"4A649","s":"_ZN5mongo22IndexBuildsCoordinator28_cleanUpTwoPhaseAfterFailureEPNS_16OperationContextERKNS_13CollectionPtrESt10shared_ptrINS_19ReplIndexBuildStateEERKNS0_17IndexBuildOptionsERKNS_6StatusE","C":"mongo::IndexBuildsCoordinator::_cleanUpTwoPhaseAfterFailure(mongo::OperationContext*, mongo::CollectionPtr const&, std::shared_ptr<mongo::ReplIndexBuildState>, mongo::IndexBuildsCoordinator::IndexBuildOptions const&, mongo::Status const&)","s+":"1F9"}}
      [j7:prim] | 2023-01-19T14:29:54.969+00:00 I  CONTROL  31445   [IndexBuildsCoordinatorMongod-0] "Frame","attr":\{"frame":{"a":"7FA8C4FABA07","b":"7FA8C4F56000","o":"55A07","s":"_ZN5mongo22IndexBuildsCoordinator16_setUpIndexBuildEPNS_16OperationContextERKNS_4UUIDENS_9TimestampERKNS0_17IndexBuildOptionsE.cold","C":"mongo::IndexBuildsCoordinator::_setUpIndexBuild(mongo::OperationContext*, mongo::UUID const&, mongo::Timestamp, mongo::IndexBuildsCoordinator::IndexBuildOptions const&) [clone .cold]","s+":"2A5"}}
      ...
      Symbolization process completed.
      

            Assignee:
            josef.ahmad@mongodb.com Josef Ahmad
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: