[SERVER-21852] kill_cursors.js fails in small_oplog* configurations Created: 09/Dec/15  Updated: 16/Nov/16  Resolved: 11/Dec/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.2.1, 3.3.0

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: QuInt D (12/14/15)
Participants:

 Description   

https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_jsCore_small_oplog_WT_0ec5ef6940fd1efcfcbaa5f187ac4a8a7e92a480_15_12_08_22_10_08

[js_test:kill_cursors] 2015-12-08T23:46:33.057+0000 assert.soon failed, msg:Failed to pin cursor. Cursors pinned before running getMore: 0
[js_test:kill_cursors] 2015-12-08T23:46:33.058+0000 doassert@src/mongo/shell/assert.js:15:14
[js_test:kill_cursors] 2015-12-08T23:46:33.058+0000 assert.soon@src/mongo/shell/assert.js:200:13
[js_test:kill_cursors] 2015-12-08T23:46:33.059+0000 @jstests/core/kill_cursors.js:113:1
[js_test:kill_cursors] 2015-12-08T23:46:33.059+0000 @jstests/core/kill_cursors.js:2:2
[js_test:kill_cursors] 2015-12-08T23:46:33.059+0000 
[js_test:kill_cursors] 2015-12-08T23:46:33.060+0000 sh13680| {
[js_test:kill_cursors] 2015-12-08T23:46:33.061+0000 sh13680| 	"cursor" : {
[js_test:kill_cursors] 2015-12-08T23:46:33.061+0000 sh13680| 		"nextBatch" : [
[js_test:kill_cursors] 2015-12-08T23:46:33.061+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.061+0000 sh13680| 				"_id" : 2
[js_test:kill_cursors] 2015-12-08T23:46:33.061+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.062+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.062+0000 sh13680| 				"_id" : 3
[js_test:kill_cursors] 2015-12-08T23:46:33.062+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.062+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.063+0000 sh13680| 				"_id" : 4
[js_test:kill_cursors] 2015-12-08T23:46:33.063+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.063+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.064+0000 sh13680| 				"_id" : 5
[js_test:kill_cursors] 2015-12-08T23:46:33.064+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.064+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 				"_id" : 6
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 				"_id" : 7
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 				"_id" : 8
[js_test:kill_cursors] 2015-12-08T23:46:33.065+0000 sh13680| 			},
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 			{
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 				"_id" : 9
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 			}
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 		],
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 		"id" : NumberLong(0),
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 		"ns" : "test.jstest_killcursors"
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 	},
[js_test:kill_cursors] 2015-12-08T23:46:33.066+0000 sh13680| 	"ok" : 1
[js_test:kill_cursors] 2015-12-08T23:46:33.067+0000 sh13680| }
[js_test:kill_cursors] 2015-12-08T23:46:33.067+0000 2015-12-08T23:46:33.066+0000 E QUERY    [thread1] Error: assert.soon failed, msg:Failed to pin cursor. Cursors pinned before running getMore: 0 :
[js_test:kill_cursors] 2015-12-08T23:46:33.067+0000 doassert@src/mongo/shell/assert.js:15:14
[js_test:kill_cursors] 2015-12-08T23:46:33.067+0000 assert.soon@src/mongo/shell/assert.js:200:13
[js_test:kill_cursors] 2015-12-08T23:46:33.067+0000 @jstests/core/kill_cursors.js:113:1
[js_test:kill_cursors] 2015-12-08T23:46:33.068+0000 @jstests/core/kill_cursors.js:2:2
[js_test:kill_cursors] 2015-12-08T23:46:33.068+0000 
[js_test:kill_cursors] 2015-12-08T23:46:33.068+0000 failed to load: jstests/core/kill_cursors.js



 Comments   
Comment by Githook User [ 11/Dec/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-21852 fix more flakiness in kill_cursors.js

(cherry picked from commit 0ce05c7d8c4a7b309c9792d4350db680bdd7096d)
Branch: v3.2
https://github.com/mongodb/mongo/commit/70c96afa6c980f6ce36a78baf550b7c50b92d619

Comment by Githook User [ 11/Dec/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-21852 fix more flakiness in kill_cursors.js
Branch: master
https://github.com/mongodb/mongo/commit/0ce05c7d8c4a7b309c9792d4350db680bdd7096d

Comment by Githook User [ 10/Dec/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-21852 fix test issue that can cause kill_cursors.js to fail under master/slave

(cherry picked from commit aa77f50235503a1c3c4883244ed9d805412c10fe)
Branch: v3.2
https://github.com/mongodb/mongo/commit/5c25a255711a30729a7a96e2fc25b44b4495dab8

Comment by Githook User [ 10/Dec/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-21852 fix test issue that can cause kill_cursors.js to fail under master/slave
Branch: master
https://github.com/mongodb/mongo/commit/aa77f50235503a1c3c4883244ed9d805412c10fe

Comment by David Storch [ 10/Dec/15 ]

The test works by enabling a failpoint that keeps a cursor pinned, and then running an assert.soon() which waits until the number of cursors pinned increases by 1:

assert.soon(function() {
    return (db.serverStatus().metrics.cursor.open.pinned == numPinnedBefore + 1);
}, "Failed to pin cursor. Cursors pinned before running getMore: " + numPinnedBefore);

In the master/slave configuration used by jsCore_small_oplog_WT, however, there ends up being an additional pinned cursor due to the slave syncing off the master. If this happens at the right time, the assert.soon() will never be satisfied because the current number of cursors will exceed numPinnedBefore by 2 rather than by 1.

Comment by Kyle Erf [ 10/Dec/15 ]

Thanks! Just making sure that this wasn't getting lost in the handoff. Right now it's still only the small_oplog_* variants.

Comment by David Storch [ 10/Dec/15 ]

I'll look at it, I just haven't yet. Have you seen it on anything other than small_oplog?

Comment by Kyle Erf [ 10/Dec/15 ]

david.storch are you working on this, or does it still need triage/assignment?

Generated at Thu Feb 08 03:58:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.