Segmentation violation with boolean column

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()

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()

ROOT Version: 6.20/04
Platform: linux
Compiler: [Conda Forge]

Thank you for the simple and self-contained reproducer.

I cannot reproduce the issue with local ROOT build, with LCG_97 on lxplus nor with the system ROOT installation on lxplus.

A conda environment works fine if I start a fresh shell and activated it.

I can only reproduce the crash if first I run source my/root/build/bin/ and then I activate a conda environment with ROOT.

Is it the same for you?

Hm it may be something like that.

No problem seen on:

  • my own machine (macOS, python 2.7, master built against anaconda)
  • lxplus vanilla environment for LHCb (6.20/04, python 2.7)

Problem seen on:

  • conda environment on lxplus (python 3.8.3 from conda-forge, root_base=6.20.04)

…which has a system installation of ROOT as well, that might be causing an interference similar to my source; conda activate root-env. :thinking:

Your fail.txt file shows most of the stacks are in /afs/ 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 :thinking:

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.

Thanks for your help.

It might also be that the conda build can do something to avoid the interference. @chrisburr might have an idea :smiley:

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)

1 Like

Can confirm, there is no problem in 6.22. What a strange behavior. Thanks for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.