[SERVER-35706] Fix race in ctor for LogicalSessionCacheImpl Created: 20/Jun/18  Updated: 29/Oct/23  Resolved: 21/Jun/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.6.6, 4.0.2, 4.1.1

Type: Bug Priority: Critical - P2
Reporter: Mira Carey Assignee: Mira Carey
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by TOOLS-2049 Intermittent Windows Evergreen failur... Closed
Duplicate
is duplicated by SERVER-35341 Invariant failure in logical_session_... Closed
is duplicated by SERVER-37977 MongoDB server startup failure with e... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Platforms 2018-07-02
Participants:
Linked BF Score: 15

 Description   

The constructor for LogicalSessionCacheImpl shouldn't be making unsynchonized writes to fields after it's begun scheduling work.



 Comments   
Comment by Githook User [ 03/Aug/18 ]

Author:

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

Message: SERVER-35706 ctor race in LogicalSessionCacheImpl

The constructor for LogicalSessionCacheImpl writes to fields after it
has kicked off periodic jobs that also write to those fields. It
doesn't do it for any good reason, so re-order to fix the race.

(cherry picked from commit af7c50e0ac57f50ba258177f0fbd48b8a837001e)
Branch: v4.0
https://github.com/mongodb/mongo/commit/3940964838cd54c302edb37c49a981c5547c4ae8

Comment by Githook User [ 21/Jun/18 ]

Author:

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

Message: SERVER-35706 ctor race in LogicalSessionCacheImpl

The constructor for LogicalSessionCacheImpl writes to fields after it
has kicked off periodic jobs that also write to those fields. It
doesn't do it for any good reason, so re-order to fix the race.

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

Comment by Githook User [ 21/Jun/18 ]

Author:

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

Message: SERVER-35706 ctor race in LogicalSessionCacheImpl

The constructor for LogicalSessionCacheImpl writes to fields after it
has kicked off periodic jobs that also write to those fields. It
doesn't do it for any good reason, so re-order to fix the race.
Branch: master
https://github.com/mongodb/mongo/commit/af7c50e0ac57f50ba258177f0fbd48b8a837001e

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