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

Improve exception handling in ESE at-rest encryption WT callbacks

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.1
    • Affects Version/s: None
    • Component/s: Storage
    • Fully Compatible
    • Storage NYC 2018-06-04, Storage NYC 2018-06-18, Storage NYC 2018-07-02
    • 0

      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.

            Assignee:
            ben.judd Ben Judd
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: