Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-79138

Fix data race in AuthorizationSessionTest fixture

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.1
    • Affects Version/s: 7.0.0, 7.1.0-rc0
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • v7.0
    • Security 2023-08-07, Security 2023-08-21
    • 20

      When the `setUp()` method of AuthorizationSessionTest replaces the existing AuthorizationManager attached to the global ServiceContext with another AuthorizationManager instance, it causes a race with the JournalFlusher thread, which gets started earlier (in the ServiceContextMongoDTest constructor) and tries to acquire a pointer to the current global AuthorizationManager.

      One fix is to ensure that we perform the replacement of the AuthorizationManager, before the JournalFlusher (or any other thread that creates a authorization session) is started.

            Assignee:
            erwin.pe@mongodb.com Erwin Pe
            Reporter:
            erwin.pe@mongodb.com Erwin Pe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: