The WT callbacks catch and log all exceptions, because they cannot be allowed to propagate up into the WT C code. However, the only information about the exception that is logged is exceptionToStatus(), which does not include anything about where the exception occurred. The code then calls fassertFailed(), which will abort the server with a stacktrace that leads to this generic exception-catching code in the WT callbacks.
When diagnosing the cause of exceptions that have occurred during these callbacks, it would be much more useful to have the backtrace of the actual exception. Thus, this exception handling code should log the backtrace of the caught exception, before calling fassertFailedNoTrace().
In addition, the customize callback may do network operations to obtain keys from a KMIP server, which means that SocketExceptions are not unexpected. Currently, these are logged with the vague generic message "Aborting due to exception in WT_ENCRYPTOR::customize", which is geared towards unexpected exceptions of any type. Thus this callback should catch SocketExceptions separately, and log them with a better message.
- is related to
-
SERVER-96871 Add static analysis checks for throwing in noexcept boundaries
- In Progress