[SERVER-521] cursor may be deleted while in use by getMore() Created: 04/Jan/10 Updated: 12/Jul/16 Resolved: 06/Jan/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Dwight Merriman |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
I'm trying to debug some issues that occur when we run our standard js tests in parallel. While looking at the code, I noticed the following: /* called every 4 seconds. millis is amount of idle time passed since the last call – could be zero */ } idleTimeReport() gets called with only a read lock in place, so it can happen in parallel with a getMore() request. getMore() grabs the client cursor mutex while it's finding a client cursor, but then it releases the client cursor mutex and continues to use the client cursor object it has found. I believe it's possible for idleTimeReport() to delete a getMore()'s client cursor after getMore() has looked up the client cursor but before getMore() has finished accessing the client cursor's attributes. I'm sorry I haven't written a test case - that's hard to do for a rare race condition like this. |
| Comments |
| Comment by auto [ 11/Jan/10 ] |
|
Author: {'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: fix issue from ClientCursor Pointer thing |
| Comment by auto [ 06/Jan/10 ] |
|
Author: {'name': 'Dwight', 'email': 'dmerriman@gmail.com'}Message: |