Skip to content

Loading…

classfactory crashes if old lib file disappears #9

Closed
ekfriis opened this Issue · 2 comments

3 participants

@ekfriis
the rootpy project member

Hello,

I deleted an old release area (and it's associated libs). I had previously used roosh etc to browse the CMSSW files, and classfactory cached the libraries. Now if I open any old file in roosh I get:

Message: (file "/afs/hep.wisc.edu/home/efriis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so", line -1) dlopen error: /afs/hep.wisc.edu/user/efriis/cmssw/Analysis/lib/slc5_amd64_gcc434/libDataFormatsPatCandidates.so: cannot open shared object file: No such file or directory

which indeed doesn't exist. The whole traceback is below.

I fixed the crash by nuking my ~/.rootpy directory. I'm not sure what the best behavior is.

Cheers
Evan

Message: (file "/afs/hep.wisc.edu/home/efriis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so", line -1) dlopen error: /afs/hep.wisc.edu/user/efriis/cmssw/Analysis/lib/slc5
amd64_gcc434/libDataFormatsPatCandidates.so: cannot open shared object file: No such file or directory
Traceback (most recent call last): File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/bin/roosh", line 5, in
pkg_resources.run_script('rootpy==0.6', 'roosh')
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/EGG-INFO/scripts/roosh", line 1
8, in
from rootpy.io import open as ropen, utils
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/io/__init_
.py", line 1,
in
from .file import *
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/io/file.py", line 7, in

from ..utils import asrootpy
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/utils.py", line 3, in odule>
from .plotting.core import Plottable
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/plotting/init.py", l
ine 1, in
from .hist import Hist, Hist2D, Hist3D, HistStack
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/plotting/hist.py", line
4, in
from ..objectproxy import ObjectProxy
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/objectproxy.py", line 1,
in
import types
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/types.py", line 430, in

generate('vector >', '')
File "/afs/hep.wisc.edu/user/efriis/cmssw/Analysis2/src/FinalStateAnalysis/recipe/external/vpython/lib/python2.6/site-packages/rootpy-0.6-py2.6.egg/rootpy/classfactory.py", line 4
5, in generate
if ROOT.gSystem.Load("%s.so"% __lookup_table[unique_name]) in (0, 1):
RuntimeError: (file "/afs/hep.wisc.edu/home/efriis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so", line -1) Failed to load Dynamic link library /afs/hep.wisc.edu/home/efr
iis/.rootpy/dicts/334598/4c6661edd304453ea4e66a622924e0b9.so

@ndawe ndawe was assigned
@pwaller
the rootpy project member

The problem is here:

http://root.cern.ch/root/html/src/TSystem.cxx.html#3446

ROOT links against all libraries which are loaded when you create something with aclic. And if they happen to not be in the DL path when you later try and load the thing you created, then boom.

This is partially ameliorated by #121 through this, but a full fix can only be made if we can ever get #122 working as we'd like.

@pwaller
the rootpy project member

I'm closing this obsolete since the mechanism has changed quite a bit.

There are some circumstances where this could be an issue. Please reopen if you can still reproduce this.

@pwaller pwaller closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.