pyRoot ROOT.gROOT.SetBatch(True) is still loading X11 libraries and crashing due to X11


ROOT Version: 6.04
Platform: CentOS 6.4 (final)
Compiler: Not Provided


I am debugging X11 crashes in some analysis code, stepping off from this thread Error in <RootX11IOErrorHandler>: fatal X11 error (connection to server lost?!) during nohup

After printing out ROOT.gSystem.GetLibraries(), I still have /usr/lib64/libX11-xcb.so.1 /usr/lib64/libX11.so.6 in the list of libraries. And I still get the Error in : fatal X11 error (connection to server lost?!) error if I disconnect my session while it is running, even while running in batch mode and nohup’d.

This severley limits my ability to run large jobs especially if I need to move my laptop, and I would appreciate any help I can get. The very first thing I do in the steering macro is:

ROOT.PyConfig.IgnoreCommandLineOptions = True  # stop PyRoot hijacking -h WHY DOESNT THIS ALWAYS WORK
ROOT.gROOT.SetBatch(True)  # Don't want to plot these to screen as we generate them

and the first thing I do in main is:

if __name__ == "__main__":
    
    ROOT.gROOT.SetBatch(True)  # Don't want to plot these to screen as we generate them
    print ROOT.gSystem.GetLibraries()# [x for x in ROOT.gSystem.GetLibraries() if "X11" in x or "x11" in x]

Do you have this problem only when you run with python ?
Does a .C script work ?
Are you running run locally or remotely ?

Only python
I don’t have the same macros in a .C script so I have not checked it
Remotely, through ssh

If it is related to python may be @etejedor has an idea.

Does a very simple line command works ?
For instance:

root [0] TCanvas C

This command threw a segmentation fault actually. It is worth noting that I am using a virtual environment via anaconda

What is the command that threw a segfault? Just trying to create a TCanvas from the ROOT prompt?

Yes just exactly that:

(tZqAnalysis) -bash-4.1$ root
root [0] TCanvas C
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TGHScrollBar::TGHScrollBar>: arrow_*.xpm not found
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TGVScrollBar::TGVScrollBar>: arrow_*.xpm not found
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libjpeg.so.8: cannot open shared object file: No such file or directory

So it is not a python issue. May be there is something special with the anaconda environment . @amadio may know.

Are you using CVMFS and losing access to the network? Or maybe loading data files from the network?

If you are using a special environment, it is likely that you are replacing libraries ROOT depends on (or removing directories from LD_LIBRARY_PATH) when you enter the environment, which then makes ROOT fail to open its dependency libraries, or makes it try to load incompatible libraries than the ones it was compiled with. We need more information about your environment to understand what exactly is causing the problem, but it doesn’t look like a problem with ROOT, but with your particular setup. Please print LD_LIBRARY_PATH before and after you enter your virtual environment, and please let us know how you installed ROOT. In particular the outputs of which root and ldd $(which root) from before and after you enter your environment would be useful as well.

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