[SERVER-33382] GlobalCursorIdCache::timeoutCursors() sometimes sees a view, resulting in a crash Created: 16/Feb/18 Updated: 29/Oct/23 Resolved: 20/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Justin Seyster | Assignee: | Justin Seyster |
| 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 | ||||
| Sprint: | Query 2018-02-26 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
When the CursorIdCache::timeoutCursors() iterates over its cursors, it locks them using an AutoGetCollectionForReadCommand title that will uassert when locking a view. There should not be a view among the cursors managed by CursorIdCache, but timeoutCursors() does not hold the lock while it iterates, so there is a window of time during which a collection can be dropped and replaced by a view with the same name. Because the uassert occurs as part of the cursor cleanup background job, it crashes the server. |
| Comments |
| Comment by Githook User [ 20/Feb/18 ] |
|
Author: {'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}Message: |