-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Networking
-
Fully Compatible
-
ALL
-
Service arch 2020-12-28
-
38
In a callback for TaskExecutor::scheduleRemoteCommand here, we try to acquire a mutex.
This is a problem because in ServerDiscoveryMonitor::shutdown, we acquire the mutex before canceling the remaining tasks in the executor and shutting down the executor, and either cancellation or shutdown+join can cause the callbacks to run, leading to a deadlock.
We should either reset the executor pointer and cancel the handles outside of the lock, or check the status passed into the callback for scheduleRemoteCommand and only acquire the mutex if it's an OK status.
- related to
-
SERVER-53684 Make the callback for the hello command in SingleServerDiscoveryMonitor not take the mutex if the command was canceled due to shut down
- Closed
-
SERVER-77707 Always invoke onReply callback out-of-line for exhaust commands in NetworkInterfaceTL
- Closed