[SERVER-53996] Recipient should not do reads/writes while holding the instance mutex Created: 22/Jan/21 Updated: 29/Oct/23 Resolved: 09/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lingzhi Deng | Assignee: | Xuerui Fa |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm-1791_other_required | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | Repl 2021-02-08, Repl 2021-02-22 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 10 | ||||||||||||
| Description |
|
Recipient updates state docs while holding onto the instance mutex, see this example. This is problematic because updateStateDoc needs to acquire RSTL in IX mode but stepDown would interrupt() the migration (as part of _performPostMemberStateUpdateAction) while holding RSTL in X mode. interrupt() needs to acquire the instance mutex. So this could introduce a deadlock - the updateStateDoc on the recipient thread waits on RSTL IX mode v.s. the interrupt() on stepDown thread is waiting on the instance mutex while holding RSTL in X mode. |
| Comments |
| Comment by Githook User [ 09/Feb/21 ] |
|
Author: {'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}Message: |