-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error loading just-precompiled module if an imported module was loaded before precompiling #12508
Comments
cc @stevengj (move to PyPlot/PyCall if this is package-specific and not a general problem) |
@dbrowne, had you just done |
I think this might happen if When you compile LaTeXStrings, it also precompiles |
As a workaround, for now, In the short term, we should probably patch Compat to include In the long term, two options are:
The second one seems more elegant to me, but is also more technically challenging since the precompile system now seems to assume that once you precompile you precompile all the way down. @vtjnash? |
It's mostly a question of when you want your segfaults and incompatibilities. If you don't have tight control all of the way down, then you don't really know if some file was slightly different when it was originally loaded and might now be missing a definition which will cause the deserializer to segfault (you can try this at home by eval'ing a type or function into another module and then using that value locally -- see #12352 the first option is slightly annoying right now, but with precompile now being enforced by |
If I quit Julia and try again I get the following: |
@dbrowne, the "error initializing module PyPlot" sounds like an unrelated problem—the |
I raise the issue here because I'm building a new version of Julia and not PyPlot. If PyPlot were the moving target I would raise the issue there. Julia builds for the last few weeks worked without any issues. |
@dbrowne, the error message is different, you are seeing a different problem. Please use separate issues to discuss distinct problems. |
So what's the current recommended course of action? I'm trying to get tests working for a package that depends on DataFrames (which has a bunch of dependencies, not all of which have precompilation enabled). |
@simonbyrne, just import The only problem arises if you manually import a dependency In the longer run, precompilable packages should push |
Great, that fixed it, thanks! |
A related problem appears when starting several separate julia processes in parallel. When they all hit the cache at once I get similar errors to the above. (Background: the use case is an AWS cluster where instances are commonly started from scratch. When a node is first started the node downloads and installs a zip file containing a module with all the required julia dependencies. As soon as that's complete, many jobs jump onto it all at once and start hitting the compile cache, which basically guarantees a few failures as reproduced below.) Simple test case involving DataFrames (run from a temporary directory): $ cat init.sh #!/bin/bash
pkgdir=$PWD/pkg
mkdir -p $pkgdir/v0.4
export JULIA_PKGDIR=$pkgdir
julia -e "Pkg.init()"
echo DataFrames > $pkgdir/v0.4/REQUIRE
julia -e "Pkg.resolve()" $ cat test.sh #!/bin/bash
pkgdir=$PWD/pkg
export JULIA_PKGDIR=$pkgdir
julia -e "using DataFrames" Usage: $ ./init.sh
# Now run two in parallel.
$ ./test.sh & ./test.sh
[1] 13242
INFO: Recompiling stale cache file /home/chris/tmp/jlpkg/pkg/lib/v0.4/DataArrays.ji for module DataArrays.
WARNING: Module Reexport uuid did not match cache file
WARNING: require failed to create a precompiled cache file
WARNING: requiring "DataArrays" did not define a corresponding module.
ERROR: LoadError: UndefVarError: DataArrays not defined
in include at ./boot.jl:260
in include_from_node1 at ./loading.jl:271
[inlined code] from none:2
in anonymous at no file:0
in process_options at ./client.jl:284
in _start at ./client.jl:411
while loading /home/chris/tmp/jlpkg/pkg/v0.4/DataFrames/src/DataFrames.jl, in expression starting on line 14
ERROR: Failed to precompile DataFrames to /home/chris/tmp/jlpkg/pkg/lib/v0.4/DataFrames.ji
in error at ./error.jl:21
in compilecache at loading.jl:350
in require at ./loading.jl:217
in process_options at ./client.jl:284
in _start at ./client.jl:411
INFO: Recompiling stale cache file /home/chris/tmp/jlpkg/pkg/lib/v0.4/DataFrames.ji for module DataFrames. (julia version 0.4.0-pre+7400 commit bffe239) |
On a clean JuliaBox 0.4 notebook (no packages installed), I just ran
Both Compat and SHA have precompile enabled. What's the issue? |
@mlubin, in a notebook, the IJulia package is loaded and hence Compat has already been loaded. Hence updating it runs into the same issue above. |
Note that #13506 cannot be backported until there is a followup that resolves the issues with Homebrew.jl |
Just to report that I encountered recently similar problem with BinDeps, while building "IJulia" by |
@tkelman, did this ever get backported? I've been seeing reports of similar problems popping up recently, e.g. JuliaMath/Roots.jl#39 |
was what backported? this issue was never closed. |
Oh, never mind, that was for |
#18150 should make this work much better |
Getting the following error messages:
Julia Version 0.4.0-dev+6526
Commit dcc448b* (2015-08-07 14:14 UTC)
Platform Info:
System: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
Package Directory: xxxxxxxxxxxxxx/.julia/v0.4
WARNING: unknown Lazy commit 8709dc31, metadata may be ahead of package cache
15 required packages:
71 additional packages:
The text was updated successfully, but these errors were encountered: