I have a TTree with a branch of type bool. If I create an RDataFrame and try to filter on it, I get a segmentation violation unless I first create a Display. Why should this be? Reproducer follows.
The following reproducer uses the attached test.root (5.3 KB).
Filtering on the boolean column'mycol' produces a segmentation violation (output attached as fail.txt (21.4 KB)):
import ROOT as r
rdf = r.RDataFrame('test', 'test.root')
frdf = rdf.Filter('mycol')
c = frdf.Count()
print(c.GetValue())
If, however, I first create a Display of the filtered RDataFrame, I have no problems (output reads “1”):
import ROOT as r
rdf = r.RDataFrame('test', 'test.root')
frdf = rdf.Filter('mycol')
disp = frdf.Display('mycol') # additional command
c = frdf.Count()
print(c.GetValue())
ROOT Version: 6.20/04 Platform: linux Compiler: [Conda Forge]
Your fail.txt file shows most of the stacks are in /afs/cern.ch/user/m/mwilkins/miniconda/envs/HcHc_ana/lib/libCling.so but one is in /home/conda/feedstock_root/build_artifacts/python_1591030388223.
Are those two completely different ROOT installations of yours?
EDIT: no, /home/conda comes from the conda build itself
Indeed, it looks like your hypothesis is correct, that somehow different versions of ROOT are interfering with each other. I am not sure how to prevent this on lxplus; this doesn’t seem to be a problem with ROOT, per se, however–I will ask around.
As @eguiraud’s edit mentions, the /home/conda/feedstock_root/build_artifacts/python_1591030388223 path is just a reflection of where Python was built. You see similar things with LCG builds showing paths from their Jenkins infrastructure.
I’ve tried your reproducer and it does I see the segfault with 6.18.04, 6.20.4 and 6.20.6 on Linux, even on my local machine which doesn’t have a system installation. There is no segfault on macOS or the newly released 6.22.0.
@mwilkins Would it be possible for you to update to 6.22.0? (LHCb specific addition: I will update the lb-conda default environment later today if you want to try it instead of reinstalling on AFS)