-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
ALL
-
Repl 2018-07-02
The InitialSync::_fcvFetcherCallback function acquires the InitialSync mutex and then acquires the ReplicationCoordinator mutex. This ordering is inconsistent with some functions in ReplicationCoordinator e.g. ReplicationCoordinatorImpl::processReplSetSyncFrom and ReplicationCoordinatorImpl::processReplSetGetStatus. At the time of writing this, the ReplicationCoordinator mutex acquisition was elimiinated in processReplSetGetStatus by SERVER-34758. The potential deadlock with processReplSetSyncFrom is mostly addressed already in SERVER-28840.
-------------------------
Original Coverity Description:
Threads may try to acquire two locks in different orders, potentially causing deadlock
Defect 103597 (STATIC_C)
Checker ORDER_REVERSAL (subcategory none)
File: /src/mongo/db/repl/initial_syncer.cpp
Function mongo::repl::InitialSyncer::_fcvFetcherCallback(const mongo::StatusWith<mongo::Fetcher::QueryResponse> &, std::shared_ptr<mongo::repl::CallbackCompletionGuard<mongo::StatusWith<mongo::repl::OpTimeWith<long long>>>>, const mongo::repl::OpTimeWith<long long> &)
- related to
-
SERVER-28840 replSetSyncFrom causes InitialSyncer and ReplicationCoordinator to acquire each other's mutexes in opposite orders
- Closed
-
SERVER-34758 replSetGetStatus can deadlock with initialSyncer
- Closed
-
SERVER-31487 Replace replSetSyncFrom resync option with initialSyncSource server parameter
- Closed