[SERVER-43640] The user cache invalidator invarianting in it's dtor decreases debuggability Created: 25/Sep/19  Updated: 29/Oct/23  Resolved: 18/Oct/19

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: None
Fix Version/s: 4.3.1, 4.2.2

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

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6
Sprint: Security 2019-10-21
Participants:
Case:

 Description   

The user cache invalidator currently invariant's in its dtor.  See

UserCacheInvalidator::~UserCacheInvalidator() {
      invariant(globalInShutdownDeprecated());
      // Wait to stop running.
      wait();
}

The problem with this is that we make a UserCacheInvalidator in runMongosServer as part of mongos' startup. And then if anything goes wrong, before global shutdown, we crash in that invariant. That prevents us from returning an error code, letting an exception with a stack bubble up, etc.



 Comments   
Comment by Benjamin Caimano (Inactive) [ 28/Oct/19 ]

Feel free to decline but requesting backports on this.

Comment by Githook User [ 24/Oct/19 ]

Author:

{'name': 'Spencer Jackson', 'username': 'spencerjackson', 'email': 'spencer.jackson@mongodb.com'}

Message: SERVER-43640 Allow UserCacheInvalidator to deconstruct during shutdown

(cherry picked from commit d93b7e6a2a415d9c4e9817fdeec956151cd87bc8)
Branch: v4.2
https://github.com/mongodb/mongo/commit/83f690d81174859d6c9a5a99ff3dd5e70aed0d44

Comment by Githook User [ 18/Oct/19 ]

Author:

{'username': 'spencerjackson', 'email': 'spencer.jackson@mongodb.com', 'name': 'Spencer Jackson'}

Message: SERVER-43640 Allow UserCacheInvalidator to deconstruct during shutdown
Branch: master
https://github.com/mongodb/mongo/commit/d93b7e6a2a415d9c4e9817fdeec956151cd87bc8

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