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

Custom log handler cannot capture tracing on sasl_set_mutex callbacks

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.2-beta0
    • Affects Version/s: 1.1.9, 1.2.0
    • Component/s: libmongoc
    • None

      Since c3c14f4 in the 1.1.x branch, entry/exit tracing apppears on SASL mutex callbacks that are initalized in MONGOC_ONCE_FUN() in mongoc-init.c. MONGOC_ONCE_FUN() is in turn called before any custom log handlers can be configured, which means output like the following ends up on stderr before a user of the driver can capture it elsewhere:

      2015/07/01 15:59:13.0495: [  441]:    TRACE:       mongoc: ENTRY: mongoc_sasl_mutex_alloc():40
      2015/07/01 15:59:13.0495: [  441]:    TRACE:       mongoc:  EXIT: mongoc_sasl_mutex_alloc():45
      2015/07/01 15:59:13.0496: [  441]:    TRACE:       mongoc: ENTRY: mongoc_sasl_mutex_alloc():40
      2015/07/01 15:59:13.0496: [  441]:    TRACE:       mongoc:  EXIT: mongoc_sasl_mutex_alloc():45
      

      Looking at other code invoked by the init methods, I see that the SSL and SCRAM init functions don't use any tracing, nor are there any tests for trace output for these SASL mutex functions. Should we simply remove the traces, or is there a more elaborate solution to be considered?

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: