RDataFrame crashing with multithreading enabled for files produced with h2root

Dear ROOT-ers,

I have just started to test out RDataFrame with ROOT 6.14/04.
However, for some of my rootfiles, an attempt to plot a histogram of one of the simple tree branches causes a segmentation fault when used with ROOT::EnableImplicitMT().

For example, the following code works fine with the attached file (I have also tested with multiple files in the chain):
data_stream42_3.root (250.1 KB)

//ROOT::EnableImplicitMT();
TChain h11;
h11.Add("data_stream42_*.root/INTERF/h1");
ROOT::RDataFrame d(h11);
auto h = d.Histo1D("Tof_e");
h->Draw();

However, if I uncomment the first line, h->Draw() results in a segfault with the backtrace as in the attached file:
backtrace.txt (10.2 KB)

It might be important that the above rootfiles were produced using h2root from the HBOOK files. This error seems to occur for all kinds of my files produced this way (with different tree/ntuple structures).
I have tested with several files produced directly in ROOT and did not see the crash.

I would be grateful for any hints on what I might be doing wrong or if there is anything in the attached files that RDataFrame might not be compatible with.

Many thanks,
Alek


_ROOT Version: 6.14/04
_Platform: x86_64 Debian GNU/Linux
_Compiler: g++ (Debian 7.3.0-27) 7.3.0


Hi Alek,

I acknowledge the bug. The issue is caused by an internal ROOT component, TTreeProcessorMT, which is responsible for looping on a dataset in parallel. That component somehow fails to properly handle the tree inside a directory, like in your case.
The single threaded case works fine because the code path is different and TTreeProcessorMT is not used.

We will fix this asap (it will work in the nbext 6.14 patch release and in November’s 6.16 version). Thanks a lot for the report.

Cheers,
Danilo

Hi @dpiparo, Alek,
I believe this is a known issue, https://sft.its.cern.ch/jira/browse/ROOT-9563, scheduled for a fix in v6.16.

Cheers,
Enrico

Hi,

perhaps I can immediately provide a workaround for you: would it be possible to specify the name of the tree as name of the chain? (we’ll fix the general case anyway!)

ROOT::EnableImplicitMT();
TChain h11("INTERF/h1");
h11.Add("data_stream42_*.root");
ROOT::RDataFrame d(h11);
auto h = d.Histo1D("Tof_e");
h->Draw();

Cheers,
D

Dear Danilo and Enrico,

Thank you for your answers.

I can confirm that the workaround with explicit chain name prevents the crash.

Thanks for your great work on RDataFrame, I will be looking forward to the next release!

Alek

Indeed: the bug has been fixed for both 6.16 and 6.14 branches!
https://sft.its.cern.ch/jira/browse/ROOT-9563
Cheers,
D

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