[SERVER-23738] do not massert if killing a pinned cursor Created: 14/Apr/16  Updated: 06/Dec/22  Resolved: 27/Feb/17

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

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Backlog - Query Team (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query
Operating System: ALL
Steps To Reproduce:

2016-03-16T01:51:36.912+0000 I -        [conn3451] Assertion: 16089:Cannot kill pinned cursor: 24873533273200
----- BEGIN BACKTRACE -----
(edit)
 mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x13075f2]
 mongod(_ZN5mongo10logContextEPKc+0x134) [0x12a3a54]
 mongod(_ZN5mongo11msgassertedEiPKc+0x88) [0x128fba8]
 mongod(+0xE8FC5C) [0x128fc5c]
 mongod(_ZN5mongo19GlobalCursorIdCache11eraseCursorEPNS_16OperationContextExb+0x448) [0xabf5a8]
 mongod(_ZN5mongo13CursorManager29eraseCursorGlobalIfAuthorizedEPNS_16OperationContextEiPKc+0x3C) [0xabf7ec]
 mongod(_ZN5mongo19receivedKillCursorsEPNS_16OperationContextERNS_7MessageE+0x191) [0xca0531]
 mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x104B) [0xca74db]
 mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE+0xEC) [0x978a6c]
 mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x26D) [0x12b363d]
 libpthread.so.0(+0x7AA1) [0x31a6607aa1]
 libc.so.6(clone+0x6D) [0x31a62e893d]
-----  END BACKTRACE  -----

Participants:
Case:

 Description   

Just return an error (uassert).
The shell, for example, triggers this when users press CTRL-C during a query and answer "yes" to the "do you want to kill the op on the server" question.



 Comments   
Comment by Charlie Swanson [ 27/Feb/17 ]

I also verified that this is not a problem in the scenario described in the description:

> db.foo.insert([{}, {}, {}, {}, {}, {}])
BulkWriteResult({
	"writeErrors" : [ ],
	"writeConcernErrors" : [ ],
	"nInserted" : 6,
	"nUpserted" : 0,
	"nMatched" : 0,
	"nModified" : 0,
	"nRemoved" : 0,
	"upserted" : [ ]
})
> db.foo.find("sleep(1000);")
> db.foo.find("sleep(1000);")
^C
do you want to kill the current op(s) on the server? (y/n): y
2017-02-27T13:16:11.630-0500 I CONTROL  [main] shutting down with code:0

Comment by Charlie Swanson [ 27/Feb/17 ]

This is no longer a problem. The killCursors command has since been changed to a uassert, both on 3.4.0 and on the most recent release (3.5.3).

Generated at Thu Feb 08 04:04:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.