Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-61379

FATAL_ERROR macro should use _exit()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.6.2
    • 7.6.0, Morpheus, 7.0.0-Beta1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.4, 7.0.5, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 7.1.3, 7.2.1, 7.1.5, 7.2.4, 7.0.6, 7.1.7, 7.2.2, 7.1.6, 7.2.3, 7.2.5, 7.6.2, 7.2.6, 7.6.1
    • memcached
    • Untriaged
    • 0
    • Unknown
    • March-June 24

    Description

      The macro looks like:

      #define FATAL_ERROR(EXIT_STATUS, ...)             \
          do {                                          \
              cb::logger::get()->critical(__VA_ARGS__); \
              cb::logger::get()->flush();               \
              exit(EXIT_STATUS);                        \
          } while (false)
      

      It is a problem with the exit function that it will invoke the "atexit" handlers and it has problems in a multithreaded environment.

      The macro should be rewritten to use the Exit() function which terminates the process _without running the atexit handlers.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            trond Trond Norbye
            trond Trond Norbye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty