HasColumn crashing for an empty RDataFrame


ROOT Version: v6.36.02
Platform: Linux
Compiler: (GCC) 15.1.0


Dear ROOT experts,

I am attempting to migrate my code from ROOT v6.32.02 to ROOT v6.36.02, but it is crashing where it wasn’t before. I would like to call HasColumn() for an empty RDataFrame, but it does not work anymore. Minimal reproduction of the crash:

with v6.32.02:

root [0] auto df = ROOT::RDataFrame(1);
root [1] auto df_def = df.Define("x", "int(1)");
root [2] df_def.HasColumn("x")
(bool) true
root [3] df_def.HasColumn("y")
(bool) false

with v6.36.02:

root [0] auto df = ROOT::RDataFrame(1);
root [1] auto df_def = df.Define("x", "int(1)");
root [2] df_def.HasColumn("x")
(bool) true
root [3] df_def.HasColumn("y")

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f92a86d8fba in wait4 () from /lib64/libc.so.6
#1  0x00007f92a864b7e3 in do_system () from /lib64/libc.so.6
#2  0x00007f92a911c348 in TUnixSystem::StackTrace() () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libCore.so
#3  0x00007f92a911bd08 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libCore.so
#4  <signal handler called>
#5  0x00007f928a1b09fd in ROOT::RDF::RInterfaceBase::HasColumn(std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/lib/libROOTDataFrame.so
#6  0x00007f92a881d055 in ?? ()
#7  0x0000000000000001 in ?? ()
#8  0x00007f92a881c000 in ?? ()
#9  0x00007ffcf98f1b90 in ?? ()
#10 0x000000000155f670 in ?? ()
#11 0x0000000001683e60 in ?? ()
#12 0x00007f92a127ec82 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#13 0x00007f92a11f7431 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#14 0x00007f92a11fac3e in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#15 0x00007f92a11fae60 in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#16 0x00007f92a12eae2e in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#17 0x00007f92a10cb861 in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#18 0x00007f92a10ef137 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#19 0x00007f92a93c1eb6 in TRint::ProcessLineNr(char const*, char const*, int*) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libRint.so
#20 0x00007f92a93c2259 in TRint::HandleTermInput() () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libRint.so
#21 0x00007f92a9118b2e in TUnixSystem::CheckDescriptors() () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libCore.so
#22 0x00007f92a911baa8 in TUnixSystem::DispatchOneEvent(bool) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libCore.so
#23 0x00007f92a9015a04 in TSystem::Run() () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libCore.so
#24 0x00007f92a8fa0903 in TApplication::Run(bool) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libCore.so
#25 0x00007f92a93c3344 in TRint::Run(bool) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/bin/../lib/libRint.so
#26 0x00000000004011bd in main ()
===========================================================


The lines below might hint at the cause of the crash. If you see question
marks as part of the stack trace, try to recompile with debugging information
enabled and export CLING_DEBUG=1 environment variable before running.
You may get help by asking at the ROOT forum https://root.cern/forum
preferably using the command (.forum bug) in the ROOT prompt.
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs or (preferably) using the command (.gh bug) in
the ROOT prompt. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00007f928a1b09fd in ROOT::RDF::RInterfaceBase::HasColumn(std::basic_string_view<char, std::char_traits<char> >) () from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.36.02-c35af/x86_64-el9-gcc15-opt/lib/libROOTDataFrame.so
#6  0x00007f92a881d055 in ?? ()
#7  0x0000000000000001 in ?? ()
#8  0x00007f92a881c000 in ?? ()
#9  0x00007ffcf98f1b90 in ?? ()
#10 0x000000000155f670 in ?? ()
#11 0x0000000001683e60 in ?? ()
#12 0x00007f92a127ec82 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#13 0x00007f92a11f7431 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#14 0x00007f92a11fac3e in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#15 0x00007f92a11fae60 in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#16 0x00007f92a12eae2e in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
#17 0x00007f92a10cb861 in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc15-opt/lib/libCling.so
===========================================================

Could you advise if there is a way to go around this problem, or if I should wait for the next ROOT release?

Thanks a lot in advance!

Hi,

Thank you for reporting this issue. I was able to reproduce it on v6.36.02 and v6.36.04.
We will investigate.

Best,
Lukas

Created an github issue to track the progress:

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