Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1480

Race in mongoc_log_set_handler

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.5.0
    • None
    • libmongoc
    • None

    Description

      mongoc_log and mongoc_log_set_handler use two different pthread_once_t's to ensure one-time initialization, but they share mutable state. Multiple threads calling a mix of the two functions will race to initialize the global logging mutex, possibly initializing it more than once.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: