Pyroot gSystem.Load segfault

Hello,

I’m trying import my shared library from cvmfs using our python analysis package. I get a segfault from ROOT.gSystem.Load(mylibname). However, in the same environment if I do this command myself in the interpreter, it works fine. If I repeat the command it occasionally segfaults. Obviously, it must be something pretty bad to segfault and not just return an error code. I have no problems with this code elsewhere, and indeed it’s a simple call. The library does exist and is available through LD_LIBRARY_PATH. I also call gSystem.AddIncludePath to add the variable from the environment.

I use the LCG_99 ROOT, python 3.8 and ipython all based on GCC8.

It always segfaults when I use my python package. It generally works withe odd segfault if I just do it manually.

To reproduce (from lxplus):

source /cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/bdsim-env-develop-g4v10.4.3.1-st.sh
ipython
>>> import pybdsim
>>> d = pybdsim.Data.Load("/afs/cern.ch/user/l/lnevay/work/public/rootexample1.root")
 *** Break *** segmentation violation
---------------------------------------------------------------------------
SegmentationViolation                     Traceback (most recent call last)
<ipython-input-2-cc6831ed68af> in <module>
----> 1 d = pybdsim.Data.Load("/afs/cern.ch/user/l/lnevay/work/public/rootexample1.root")

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/python-utils/pybdsim/pybdsim/Data.py in Load(filepath)
     87     elif extension == 'root':
     88         try:
---> 89             return _LoadRoot(filepath)
     90         except NameError:
     91             #raise error rather than return None, saves later scripting errors.

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/python-utils/pybdsim/pybdsim/Data.py in _LoadRoot(filepath)
    172         raise IOError("ROOT in python not available - can't load ROOT file")
    173 
--> 174     LoadROOTLibraries()
    175 
    176     fileType = _ROOTFileType(filepath) #throws warning if not a bdsim file

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/python-utils/pybdsim/pybdsim/Data.py in LoadROOTLibraries()
     58 
     59     # shared libraries
---> 60     bdsLoad = _ROOT.gSystem.Load("libbdsimRootEvent")
     61     reLoad  = _ROOT.gSystem.Load("librebdsim")
     62     if reLoad != 0:

SegmentationViolation: int TSystem::Load(const char* module, const char* entry = "", bool system = kFALSE) =>
    SegmentationViolation: segfault in C++; program state was reset

If we then do it manually in the same session

>>> import ROOT
>>> ROOT.gSystem.Load("libbdsimRootEvent")
0

would appear to work ok… continue to try in that session with the package

>>> d = pybdsim.Data.Load("/afs/cern.ch/user/l/lnevay/work/public/rootexample1.root")
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x26ae63a)[0x7fe19d2cc63a]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x54ab91)[0x7fe19b168b91]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x54afff)[0x7fe19b168fff]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0xb2ebec)[0x7fe19b74cbec]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0xb05926)[0x7fe19b723926]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0xb58de7)[0x7fe19b776de7]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0xaede16)[0x7fe19b70be16]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0xc00546)[0x7fe19b81e546]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x2210f21)[0x7fe19ce2ef21]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x2212809)[0x7fe19ce30809]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling12DeclUnloader22VisitClassTemplateDeclEPN5clang17ClassTemplateDeclE+0x21)[0x7fe19b107381]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling12DeclUnloader16VisitDeclContextEPN5clang11DeclContextE+0xd0)[0x7fe19b106cf0]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling12DeclUnloader18VisitNamespaceDeclEPN5clang13NamespaceDeclE+0x1f)[0x7fe19b106d4f]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling19TransactionUnloader18unloadDeclarationsEPNS_11TransactionERNS_12DeclUnloaderE+0x22f)[0x7fe19b0d7faf]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling19TransactionUnloader17RevertTransactionEPNS_11TransactionE+0x31f)[0x7fe19b0d864f]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling11Interpreter6unloadERNS_11TransactionE+0x21c)[0x7fe19b0bffec]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling11Interpreter6unloadEj+0x5c)[0x7fe19b0c01cc]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling8MetaSema13actOnUCommandEN4llvm9StringRefE+0x208)[0x7fe19b17d678]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling8MetaSema13actOnLCommandEN4llvm9StringRefEPPNS_11TransactionE+0x1f)[0x7fe19b17de5f]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling10MetaParser10isLCommandERNS_8MetaSema12ActionResultE+0x83)[0x7fe19b18cef3]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling10MetaParser9isCommandERNS_8MetaSema12ActionResultEPNS_5ValueE+0x50)[0x7fe19b18e980]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(_ZN5cling13MetaProcessor7processEN4llvm9StringRefERNS_11Interpreter17CompilationResultEPNS_5ValueEb+0x159)[0x7fe19b178049]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x40d8bc)[0x7fe19b02b8bc]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCling.so(+0x4162a5)[0x7fe19b0342a5]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libCore.so(_ZN7TSystem4LoadEPKcS1_b+0x786)[0x7fe19ef81936]
[0x7fe21df79074]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy_backend3_8.so(+0xf198)[0x7fe2152de198]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy_backend3_8.so(_ZN5Cppyy5CallIElPvmS0_+0x22)[0x7fe2152dee02]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy3_8.so(+0x699f6)[0x7fe21555e9f6]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy3_8.so(_ZN8CPyCppyy9CPPMethod16ExecuteProtectedEPvlPNS_11CallContextE+0x129)[0x7fe21554d3f9]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy3_8.so(_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE+0x31)[0x7fe21554b871]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy3_8.so(_ZN8CPyCppyy9CPPMethod4CallERPNS_11CPPInstanceEP7_objectS5_PNS_11CallContextE+0xac)[0x7fe21554bb5c]
/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc8-opt/lib/libcppyy3_8.so(+0x5cc69)[0x7fe215551c69]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyObject_MakeTpCall+0x9d)[0x7fe227f33bed]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x9363)[0x7fe227f0fe23]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x6e88b)[0x7fe227f0588b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x386d)[0x7fe227f0a32d]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x6e88b)[0x7fe227f0588b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x386d)[0x7fe227f0a32d]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x6e88b)[0x7fe227f0588b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x675a)[0x7fe227f0d21a]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7fe22801a5ae]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7fe22801a5db]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x180039)[0x7fe228017039]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0xe2fe4)[0x7fe227f79fe4]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x386d)[0x7fe227f0a32d]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0xaf039)[0x7fe227f46039]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x60bb)[0x7fe227f0cb7b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0xaf039)[0x7fe227f46039]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x60bb)[0x7fe227f0cb7b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0xaf039)[0x7fe227f46039]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0xa6da9)[0x7fe227f3dda9]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x1062)[0x7fe227f07b22]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x6e88b)[0x7fe227f0588b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x386d)[0x7fe227f0a32d]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x6e88b)[0x7fe227f0588b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x1062)[0x7fe227f07b22]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x91)[0x7fe227f339b1]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x9ff78)[0x7fe227f36f78]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x126a)[0x7fe227f07d2a]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x91)[0x7fe227f339b1]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x1062)[0x7fe227f07b22]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x91)[0x7fe227f339b1]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x1062)[0x7fe227f07b22]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x6e88b)[0x7fe227f0588b]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x1062)[0x7fe227f07b22]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x91)[0x7fe227f339b1]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x9fef7)[0x7fe227f36ef7]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7fe227f3574c]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x1a70)[0x7fe227f08530]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x91)[0x7fe227f339b1]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x386d)[0x7fe227f0a32d]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x911)[0x7fe22801a231]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7fe22801a5ae]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7fe22801a5db]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(+0x1c0fde)[0x7fe228057fde]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyRun_FileExFlags+0x91)[0x7fe228059791]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(PyRun_SimpleFileExFlags+0xed)[0x7fe2280598ed]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(Py_RunMain+0x778)[0x7fe228076a08]
/cvmfs/sft.cern.ch/lcg/releases/Python/3.8.6-3199b/x86_64-centos7-gcc8-opt/bin/../lib/libpython3.8.so.1.0(Py_BytesMain+0x43)[0x7fe228076e73]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fe226f8f555]
python[0x4006ce]
 *** Break *** segmentation violation
---------------------------------------------------------------------------
SegmentationViolation                     Traceback (most recent call last)
<ipython-input-7-cc6831ed68af> in <module>
----> 1 d = pybdsim.Data.Load("/afs/cern.ch/user/l/lnevay/work/public/rootexample1.root")

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/python-utils/pybdsim/pybdsim/Data.py in Load(filepath)
     87     elif extension == 'root':
     88         try:
---> 89             return _LoadRoot(filepath)
     90         except NameError:
     91             #raise error rather than return None, saves later scripting errors.

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/python-utils/pybdsim/pybdsim/Data.py in _LoadRoot(filepath)
    172         raise IOError("ROOT in python not available - can't load ROOT file")
    173 
--> 174     LoadROOTLibraries()
    175 
    176     fileType = _ROOTFileType(filepath) #throws warning if not a bdsim file

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/python-utils/pybdsim/pybdsim/Data.py in LoadROOTLibraries()
     58 
     59     # shared libraries
---> 60     bdsLoad = _ROOT.gSystem.Load("libbdsimRootEvent")
     61     reLoad  = _ROOT.gSystem.Load("librebdsim")
     62     if reLoad != 0:

SegmentationViolation: int TSystem::Load(const char* module, const char* entry = "", bool system = kFALSE) =>
    SegmentationViolation: segfault in C++; program state was reset

So again fails.

Any help would be greatly appreciated!

Thanks,
Laurie

ROOT Version: v6.22.06
Platform: lxplus
Compiler: LCG 99 GCC8


Hello,

Is it possible that you are missing the jitting of a header prior to loading the library?

E.g. with gInterpreter.Declare('#include "header.h"')

Also, I can’t reproduce from lxplus:

[etejedor@lxplus7103 ~]$ source /cvmfs/beam-physics.cern.ch/bdsim/x86_64-centos7-gcc8-opt/bdsim-env-develop-g4v10.4.3.1-st.sh
[etejedor@lxplus7103 ~]$ ipython
Python 3.8.6 (default, Dec 11 2020, 21:39:59) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import pybdsim                                                                                                                                                                                      

In [2]: d = pybdsim.Data.Load("/afs/cern.ch/user/l/lnevay/work/public/rootexample1.root")                                                                                                                   
TUnixSystem::SetDisplay:0: RuntimeWarning: DISPLAY not set, setting it to 2a02:1206:452a:8130:21e4:5df8:5755:6499
TClass::Init:0: RuntimeWarning: no dictionary for class pair<int,BDSOutputROOTParticleData::ParticleInfo> is available
BDSIM output file - using DataLoader

In [3]:                                                                                                                                                                                                     

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