[SERVER-28830] cursorHandleFromId should verify that its not being called on a closed connection Created: 17/Apr/17  Updated: 30/Jan/19  Resolved: 03/May/18

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.6.6, 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Mira Carey
Resolution: Done Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-33050 Shell SIGSEGV in mongo::mozjs::Cursor... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Platforms 2018-05-07
Participants:
Case:
Linked BF Score: 25

 Description   

The old implementation of DBCommandCursor used when running the shell with --readMode compatibility calls getConnection(which checks if the connection has been closed) to construct a DBClientCursor which it passes to setCursor. The new variant used with --readMode command calls setCursorHandle with the cursor ID. This new variant doesn't check if the connection has been closed.



 Comments   
Comment by Githook User [ 22/May/18 ]

Author:

{'username': 'hanumantmk', 'name': 'Jason Carey', 'email': 'jcarey@argv.me'}

Message: SERVER-28830 check for closed conn in cursorHandleFromId

The old implementation of DBCommandCursor used when running the shell
with --readMode compatibility calls getConnection(which checks if the
connection has been closed) to construct a DBClientCursor which it
passes to setCursor. The new variant used with --readMode command calls
setCursorHandle with the cursor ID. Check that we aren't closed in the
new variant.

(cherry picked from commit bb2a2ccf260929e8a97080f81cd696340d429d57)
Branch: v3.6
https://github.com/mongodb/mongo/commit/c3c9a3a04c47e08054b224e167373c6f46112f8c

Comment by Githook User [ 03/May/18 ]

Author:

{'email': 'jcarey@argv.me', 'name': 'Jason Carey', 'username': 'hanumantmk'}

Message: SERVER-28830 check for closed conn in cursorHandleFromId

The old implementation of DBCommandCursor used when running the shell
with --readMode compatibility calls getConnection(which checks if the
connection has been closed) to construct a DBClientCursor which it
passes to setCursor. The new variant used with --readMode command calls
setCursorHandle with the cursor ID. Check that we aren't closed in the
new variant.
Branch: master
https://github.com/mongodb/mongo/commit/bb2a2ccf260929e8a97080f81cd696340d429d57

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