I am trying to debug a pretty severe memory leak in python. The memory fills from ~500Mb on startup to 16Gb over a few iterations across 20 minutes. I have been using objgraph to plot references and backreferences. Some of the things I see I do not have concrete answers for, and I am curious if the chart is showing an actual problem or if I am even on the right track.
My questions:
- If a cycle is in the graph, does that indicate a problem? Should a proper (non-leaking) graph only be a tree?
- I have a class (instance?) that contains two tuples: one with six elements and another with one element. Why is there not a tuple with 7 elements? What do the items in the tuples represent? Inheritance? Direct inheritance?
- Is there a simple way to find what in the tuple is pointing back to "type A"
- Why does type A point to two tuples (question 2) and to another type "type D"
- Why does type D have attributes/inheritance in dictionaries but none of the other types? They are themselves classes that should have such properties, no?