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

myTerminate terminate handler self deadlocks when re-entered

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.5
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Fully Compatible
    • ALL
    • Sharding 5 06/26/16

      If terminate is called from within the terminate handler, as can happen in some runtimes when trying to deduce the runtime type of an active exception within myTerminate, the re-entered invocation of myTerminate deadlocks on the streamMutex.

      The fix is to make myTerminate immediately call quickExit when it is re-entered in the same thread. We want to keep the existing behavior that other threads simultaneously entering myTerminate block indefinitely on the stream mutex, so that the first caller of terminate gets ample time to write messages to the logs.

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: