[SERVER-28688] Deadlock between shutdown and stepdown Created: 07/Apr/17 Updated: 13/Feb/18 Resolved: 15/Apr/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.5, 3.5.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Benety Goh |
| Resolution: | Done | 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 Completed: | |||||||||||||||||||||
| Sprint: | Repl 2017-05-08 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||
| Description |
|
Stepdown calls ReplicationCoordinatorExternalStateImpl::startProducerIfStopped, which takes _threadMutex while holding the global exclusive lock. Shutdown calls ReplicationCoordinatorExternalStateImpl::shutdown which takes _threadMutex and then does a database read by calling _storageInterface->getAppliedThrough. We should probably be doing the database reads/writes in ReplicationCoordinatorExternalStateImpl::shutdown after releasing _threadMutex. |
| Comments |
| Comment by Githook User [ 22/Apr/17 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: (cherry picked from commit bc135d00323ccbe35d7ba9030b3c20f7d28b34ad) |
| Comment by Githook User [ 15/Apr/17 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |