Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1469

Check if Python interpreter is finalizing prior to logging

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.1.4
    • None
    • None
    • None
    • 0

    Description

      In our logger, we can potentially try to log out a message from the C++ client when the Python interpreter is finalizing. This can cause an "unwanted termination" (fancy speak for crash). Lets check if finalizing (via Py_IsFinalizing) prior to calling pycbc_logger_sink::log_it().

      Also, pycbc_logger_sink::convert_log_msg() utilizes Py_None w/o incrementing the PyObject. Need to call Py_INCREF(Py_None) when using. Lets fix that too.

      Attachments

        Activity

          People

            jared.casey Jared Casey
            jared.casey Jared Casey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty