[SERVER-2662] seg fault equivalent when query plan cannot recover from yield, does not assert, and is yielded again Created: 02/Mar/11 Updated: 12/Jul/16 Resolved: 17/Mar/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.1, 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Thread 7 Crashed: virtual bool prepareToYield() { else { return _cc->prepareToYield( _yieldData ); virtual void recoverFromYield() { if ( _findingStartCursor.get() ) { _findingStartCursor->recoverFromYield(); } else if ( ! ClientCursor::recoverFromYield( _yieldData ) ) { if ( _capped ) { msgassertedNoTrace( 13338, str::stream() << "capped cursor overrun during query: " << _pq.ns() ); }else { // we don't fail query since we're fine with returning partial data if collection dropped // todo: this is wrong. the cursor could be gone if closeAllDatabases command just ran } } If we clear _c in recoverFromYield() and don't assert, the query optimizer may call prepareToYield() before next() and we will create a ClientCursor with a null _c causing a bad shared_ptr reference and assert/abort. |
| Comments |
| Comment by auto [ 19/Mar/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |
| Comment by auto [ 19/Mar/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |
| Comment by auto [ 17/Mar/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |
| Comment by auto [ 07/Mar/11 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |