[SERVER-5444] ClientCursor::staticYield could deadlock Created: 29/Mar/12 Updated: 29/Mar/12 Resolved: 29/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.1.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
ClientCursor::staticYeild locks the LockMongoFiles lock, then releases the database lock. When it goes to re-acquire the database lock, since it already holds the LockMongoFiles lock, it has reversed the lock acquisition order. This means it can deadlock with other callers of staticYield. The canonical order is to acquire the LockMongoFiles lock after the database locks. |