Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: 6.06/00
-
Fix Version/s: 6.10/00
-
Component/s: Core Libraries
-
Labels:None
-
Environment:
Ubuntu 14.04
Description
ROOT crashes while opening a root (containing a ntuple tree) file with an segmentation fault with a roughly 50% chance, if gPluginMgr is present somewhere in the code:
The following code should reproduce the result:
#include <TFile.h>
|
#include <TPluginManager.h>
|
int main(int argc, char *argv[]) { |
TFile *m_file = TFile::Open(argv[1], "UPDATE"); |
}
|
void bla() { gPluginMgr->AddHandler("", "", "", "", ""); } |
Note that the bla function is never called (and the AddHandler wouldn't work like shown here, I kept it simple for this minimal example).
If I remove the last line (with the bla function which is never called), the code always
works.
Here's what I'm doing exactly:
tkeck@ekplx34:/local/ssd-scratch/tkeck/basf2$ g++ -o test test.cxx -ggdb3 $(root-config --libs --cflags)
tkeck@ekplx34:/local/ssd-scratch/tkeck/basf2$ ./test particleListNtuple.root
tkeck@ekplx34:/local/ssd-scratch/tkeck/basf2$ ./test particleListNtuple.root
- Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f1d51052b4c in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f1d50fd82e2 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f1d54d490f1 in TUnixSystem::StackTrace() () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#3 0x00007f1d54d4afec in TUnixSystem::DispatchSignals(ESignals) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#4 <signal handler called>
#5 0x00007f1d54c91c7e in TPluginManager::AddHandler(char const*, char const*, char const*, char const*, char const*, char const*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#6 0x00007f1d550dc0bb in ?? ()
#7 0x0000000000000000 in ?? ()
===========================================================The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00007f1d54c91c7e in TPluginManager::AddHandler(char const*, char const*, char const*, char const*, char const*, char const*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#6 0x00007f1d550dc0bb in ?? ()
#7 0x0000000000000000 in ?? ()
===========================================================
GDB Backtrace reads like this
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79e9c7e in TPluginManager::AddHandler(char const*, char const*, char const*, char const*, char const*, char const*) ()
from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
(gdb) bt
#0 0x00007ffff79e9c7e in TPluginManager::AddHandler(char const*, char const*, char const*, char const*, char const*, char const*) ()
from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#1 0x00007ffff7e320bb in P010_TWebFile() ()
#2 0x00007ffff7e32042 in __cling_Un1Qu30(void*) ()
#3 0x00007ffff0b2166b in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#4 0x00007ffff0b278a9 in cling::Interpreter::EvaluateInternal(std::string const&, cling::CompilationOptions, cling::Value*, cling::Transaction**) ()
from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#5 0x00007ffff0b27abf in cling::Interpreter::echo(std::string const&, cling::Value*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#6 0x00007ffff0bb241b in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#7 0x00007ffff0bbfad1 in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#8 0x00007ffff0bc0a9e in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#9 0x00007ffff0bac1e3 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) ()
from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#10 0x00007ffff0abfff8 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#11 0x00007ffff0ab065d in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#12 0x00007ffff79e15b0 in TApplication::ExecuteFile(char const*, int*, bool) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#13 0x00007ffff0ac04c8 in TCling::ExecuteMacro(char const*, TInterpreter::EErrorCode*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCling.so
#14 0x00007ffff792775d in TROOT::Macro(char const*, int*, bool) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#15 0x00007ffff79eaab8 in TPluginManager::LoadHandlerMacros(char const*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#16 0x00007ffff79eb00c in TPluginManager::LoadHandlersFromPluginDirs(char const*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#17 0x00007ffff79ec12c in TPluginManager::FindHandler(char const*, char const*) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libCore.so
#18 0x00007ffff749fd87 in TFile::Open(char const*, char const*, char const*, int, int) () from /local/ssd-scratch/tkeck/externals/v01-01-07/Linux_x86_64/opt/root/lib/libRIO.so
#19 0x0000000000400a0d in main (argc=2, argv=0x7fffffffd4d8) at test.cxx:3
In particular the call to P010_TWebFile looks suspicious.
I attached the root file and the example code.