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

Make synchronous signal handlers signal-safe

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch
    • ALL
    • Service Arch Prioritized List

      In https://github.com/mongodb/mongo/blob/8e4b5670df9b9fe814e57cb5f3f8ee9407237b5a/src/mongo/util/signal_handlers_synchronous.cpp , the server defines signal-handlers for a variety of signals that can be synchronously generated, like SIGSEGV and SIGABRT. The signal-handling action for these signals is defined to be some version of logging a fatal error, collecting and logging a backtrace, and the exiting. Today, this includes some known signal-unsafe behavior, such as use of mutex as described in this comment. This can result in potential deadlocks when handling a signal.

      It can block other signals from being effectively processed, because the mutex is held by another signal-handler invocation. This means that if an i.e. invariant fires in the server while another signal-handler has gotten stuck, the abort raised by the invariant will never be processed.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Votes:
            1 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated: