Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1171

Memory leak in _cbson_element_to_dict

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.1, 3.4
    • Component/s: None
    • Labels:
      None

      Description

      Reported with this pull request:

      https://github.com/mongodb/mongo-python-driver/pull/316

      Inflating RawBSONDocument causes a memory leak when the C extensions are installed. The problem is caused by using the O format specifier instead N for Py_BuildValue in _cbson_element_to_dict. Iterating a cursor from a collection that uses RawBSONDocument for document class leaks two references for every cursor batch.

        Attachments

          Activity

            People

            Assignee:
            luke.lovett Luke Lovett
            Reporter:
            behackett Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: