[SERVER-69861] Uninterruptible lock guard in election causes FCBIS to hang Created: 21/Sep/22 Updated: 29/Oct/23 Resolved: 04/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.3, 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Russotto | Assignee: | Matthew Russotto |
| 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: |
v6.1, v6.0
|
||||||||
| Sprint: | Repl 2022-10-03, Repl 2022-10-17 | ||||||||
| Participants: | |||||||||
| Description |
|
In order to avoid interrupting ourselves due to our own stepdown, we use uninterruptible locks when writing lastVote in an election. Unfortunately if we've taken the global lock in X mode for FCBIS storage change, this leads to a deadlock – we're trying to acquire a write lock on an uninterruptible opCtx while also attempting to kill the opCtx so we can change storage and release the lock. The quick fix might be to not acquire the uninterruptible lock guard during STARTUP2, but we should definitely add a test for this; since initial sync nodes are usually non-voting we don't have coverage for an election during it. |
| Comments |
| Comment by Githook User [ 28/Oct/22 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: (cherry picked from commit 810d5c1f2b0f8d3767df55812c3324d6171aa107) |
| Comment by Githook User [ 28/Oct/22 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: Avoid an unusual scenario where if an node were being resynced (not added initially) (cherry picked from commit b12d8de0d90fbec0fc180dfa88ec4f77a586f0a4) |
| Comment by Githook User [ 04/Oct/22 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: |
| Comment by Githook User [ 04/Oct/22 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: Avoid an unusual scenario where if an node were being resynced (not added initially) |