The following sequence of events trigger the segfault.
- The mongod is started up.
- The auditing code is initialized.
- The SSLManager begins its initialization.
- It parses and validates the keyfile specified.
- The keyfile is expired or not yet valid, so dbexit() is called.
- The auditing code logs that the server is shutting down, but a segfault occurs because currentClient.get() is null.
There are no dependencies between the initialization of the auditing code and the SSLManager, so an fassert occurs when the order of events (2) and (3) are reversed.