Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9025

Memory leak using TTree.__getattr__ in python 3.6

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 6.08/06
    • None
    • PyROOT, TTree
    • None
    • Ubuntu 16.04, GCC 6.3, python 3.6.2

    Description

      There seems to be a memory leak when using the TTree.__getattr__ feature to access branches in python without declaring them first in python 3.6. I attached a rather minimal example to reproduce the problem. The example contains two tests, either to read the tree using TTree attributes or to read the tree using SetBranchAddress() on numpy arrays.

      I also attached memory profiles for both functions with a clearly visible linear memory growth compared to the constant memory consumption when using numpy.

      See also https://root-forum.cern.ch/t/huge-memory-usage-in-pyroot/26186/5

      Attachments

        1. getattr.png
          getattr.png
          43 kB
        2. numpy.png
          numpy.png
          38 kB
        3. root_memleak.py
          1 kB

        Activity

          People

            etejedor Enric Tejedor Saavedra
            9784214ad6c464d2626b Martin Ritter
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: