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

Call quickExit() in mongoauditdecrypt before returning from main()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.2
    • Security 2022-01-24
    • 27

      On Windows, an access violation may occur if the main thread returns normally from the main() function while the signal handler thread is still in the process of initializing thread local variables that require access to static global variables (e.g. ThreadContext::_handler calling Decorable::getRegistry()). This is because the windows C runtime library registers an atexit() handler that destroys the global mutex that is used to ensure that accesses to static global variables are thread-safe. If quickExit() is called instead of returning normally from main(), then it will call TerminateProcess() which simply terminates all threads without needing to run atexit() handlers.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            erwin.pe@mongodb.com Erwin Pe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: