[SERVER-35527] Ignore session information on the embedded version of mongod Created: 11/Jun/18  Updated: 29/Oct/23  Resolved: 11/Jun/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.0-rc5, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Sharding 2018-06-18
Participants:

 Description   

When requests with a session id are parsed, the id is vivified in the LogicalSessionCache decoration. The embedded storage engine does not set up the LogicalSessionCache (the decoration is a null pointer), so sending a session id to mongoed triggers a segmentation fault when LogicalSessionCache::vivify is called.

Since session based behavior can't work without the cache, any session information received when there is no LogicalSessionCache should just be ignored, avoiding the crash.

This is a required change for SERVER-32064, which will change the shell to use implicit sessions, meaning (almost) every request will have a session id. Alternatively, the shell could check the isMaster response it receives when creating a connection and choose not to send session ids when sessions aren't supported (like what drivers do), but this would require more work and could be done as a follow-up or as part of SERVER-33606.



 Comments   
Comment by Githook User [ 11/Jun/18 ]

Author:

{'username': 'jsmulrow', 'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-35527 Ignore session information on the embedded version of mongod

(cherry picked from commit 7070ff68a75f10a906c0b0cdbbf50697ec1372c2)
Branch: v4.0
https://github.com/mongodb/mongo/commit/43c2f1b3564c4ea6a342525052a814c9fa98b946

Comment by Githook User [ 11/Jun/18 ]

Author:

{'username': 'jsmulrow', 'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-35527 Ignore session information on the embedded version of mongod
Branch: master
https://github.com/mongodb/mongo/commit/7070ff68a75f10a906c0b0cdbbf50697ec1372c2

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