Memory Leak? with TDSet::Draw

Hi,

I am experiencing a memory leak that has been shutting down my computer recently. I have been making numerous calls to TTree::Draw to fill TH3 histograms. In order to speed things up, I investigated using ProofLite which in the past I had only used with TSelectors. Speed certainly increased, however, I noticed out of control memory usage that would at times kill my computer. I am attaching a script that replicates what I observe using this version of root:

5.34.18-x86_64-slc5-gcc4.3

you can compile with g++ and run twice like so:

./a.out
./a.out asdf

The script creates 50 TH3’s with 100x100x50 bins deleting the created histogram right after creation. By adding an argument to the script, proof is not invoked. The script also creates histograms which monitor the memory usage. Attached is a plot showing my observations with and without proof.

Hopefully I am doing something wrong? Or is this a memory leak or fragmentation?

Thanks,
Justin



proof_ttree_draw.cxx (2.85 KB)

Dear Justin,

I could reproduce the problem. I am currently looking at it.
I let you know as soon as I have got something.

G. Ganis

Hi,

Finally I have found the problem, due to a double cloning done by the selector used underneath for drawing.
I have committed the fix in 5-34-00-patches.
Unfortunately the name of the selector is hardcoded, so it is difficult to set a workaround.
I’ll see whether I can figure out one.

Thanks for reporting.

G. Ganis

Thanks!

As soon as a patch is released, I will just update my root version as long as it makes to cvmfs.

Thanks,
Justin