[SERVER-36873] ReplicationCoordinatorExternalStateImpl::shutdown() must not hold _threadMutex while waiting for _taskExecutor Created: 24/Aug/18 Updated: 29/Oct/23 Resolved: 25/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Storage |
| Affects Version/s: | 3.6.8, 4.0.3, 4.1.3 |
| Fix Version/s: | 3.6.10, 4.0.5, 4.1.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.0, v3.6
|
||||||||||||||||
| Sprint: | Repl 2018-09-24, Repl 2018-10-22, Repl 2018-11-05 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 65 | ||||||||||||||||
| Description |
|
ReplicationCoordinatorExternalStateImpl::shutdown() holds _threadMutex while waiting for _taskExecutor. This is problematic, since the _taskExecutor's function takes database locks, so we can wait for database locks while holding _threadMutex. This can lead to deadlock, since we can wait for _threadMutex while holding ReplicationCoordinatorImpl::_mutex, and we can wait for ReplicationCoordinatorImpl::_mutex while holding database locks. |
| Comments |
| Comment by Githook User [ 14/Nov/18 ] |
|
Author: {'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}Message: (cherry picked from commit bb77630bcf397f309e83d5bc64b86c2269ff4bb9) |
| Comment by Githook User [ 12/Nov/18 ] |
|
Author: {'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}Message: (cherry picked from commit bb77630bcf397f309e83d5bc64b86c2269ff4bb9) |
| Comment by Githook User [ 25/Oct/18 ] |
|
Author: {'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}Message: |