JuliaDebug / Gallium.jl

The Julia debugger
Other
174 stars 23 forks source link

Gallium fails to precompile on Mac OS X #143

Closed josefsachsconning closed 8 years ago

josefsachsconning commented 8 years ago
mbp1% usr/bin/julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-rc0+164 (2016-08-03 18:27 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit de762cd (0 days old master)
|__/                   |  x86_64-apple-darwin15.6.0

julia> using Gallium
INFO: Precompiling module Gallium...
ERROR: LoadError: Failed to precompile ELF to /Users/sachs/.julia/lib/v0.5/ELF.ji
 in compilecache(::String) at ./loading.jl:505
 in require(::Symbol) at ./loading.jl:337
 in include_from_node1(::String) at ./loading.jl:426
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in process_options(::Base.JLOptions) at ./client.jl:239
 in _start() at ./client.jl:318
while loading /Users/sachs/.julia/v0.5/Gallium/src/Gallium.jl, in expression starting on line 7
ERROR: Failed to precompile Gallium to /Users/sachs/.julia/lib/v0.5/Gallium.ji
 in compilecache(::String) at ./loading.jl:505
 in require(::Symbol) at ./loading.jl:364
josefsachsconning commented 8 years ago

May or may not be related, but on my Windows machine, doing using FileIO consumes all available memory (16 GB), and I eventually need to kill the process.

Keno commented 8 years ago

I have seen this before, but it went away when I cleared the precompile cache

josefsachsconning commented 8 years ago

I removed my .julia/lib/v0.5 folder, and the reported behavior persists.

Keno commented 8 years ago

The consuming all memory part as well?

josefsachsconning commented 8 years ago

Yes.

KristofferC commented 8 years ago

Ref for OOM https://github.com/JuliaLang/julia/commit/1d767cae23f389cf50f19ff78974d340c4bfdd6e#commitcomment-18514292 so seems to be happening elsewhere too.

josefsachsconning commented 8 years ago

Probably https://github.com/JuliaLang/julia/issues/17809 ?

baggepinnen commented 8 years ago

I can mention that it fails to precompile on fedora 23 also

julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-rc0+99 (2016-08-01 07:45 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit c10667f* (4 days old master)
|__/                   |  x86_64-redhat-linux

julia> using Gallium
INFO: Precompiling module Gallium...
ERROR: LoadError: LoadError: syntax: invalid operator ".!"
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
while loading /local/home/fredrikb/.julia/v0.5/JuliaParser/src/lexer.jl, in expression starting on line 46
while loading /local/home/fredrikb/.julia/v0.5/JuliaParser/src/JuliaParser.jl, in expression starting on line 9
ERROR: LoadError: Failed to precompile JuliaParser to /local/home/fredrikb/.julia/lib/v0.5/JuliaParser.ji
 in compilecache(::String) at ./loading.jl:505
 in require(::Symbol) at ./loading.jl:337
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
while loading /local/home/fredrikb/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl, in expression starting on line 8
ERROR: LoadError: Failed to precompile ASTInterpreter to /local/home/fredrikb/.julia/lib/v0.5/ASTInterpreter.ji
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
while loading /local/home/fredrikb/.julia/v0.5/Gallium/src/Gallium.jl, in expression starting on line 3
ERROR: Failed to precompile Gallium to /local/home/fredrikb/.julia/lib/v0.5/Gallium.ji
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:46

julia> 

Edit: Thanks KristofferC Pkg.checkout("JuliaParser") fixes my issue!

KristofferC commented 8 years ago

https://github.com/Keno/Gallium.jl/issues/144#issuecomment-237675735

https://github.com/JuliaLang/METADATA.jl/pull/5838

josefsachsconning commented 8 years ago

After 17809 was fixed on master, Gallium still fails to precompile on OS X, though it seems to work on Ubuntu and Windows.

mbp1% usr/bin/julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0-dev.26 (2016-08-05 14:52 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 1280a1d (0 days old master)
|__/                   |  x86_64-apple-darwin15.6.0

julia> using Gallium
ERROR: InitError: MethodError: Cannot `convert` an object of type UInt64 to an object of type Gallium.RemotePtr{Void}
This may have arisen from a call to the constructor Gallium.RemotePtr{Void}(...),
since type constructors fall back to convert methods.
 in setindex!(::Dict{Gallium.RemotePtr{Void},Any}, ::Gallium.Module{MachO.MachOHandle{Base.AbstractIOBuffer{Array{UInt8,1}}},MachO.SectionRef{MachO.MachOHandle{Base.AbstractIOBuffer{Array{UInt8,1}}},MachO.section_64}}, ::UInt64) at ./dict.jl:611
 in update_module!(::Gallium.LocalSession, ::Gallium.LazyJITModules{Dict{Gallium.RemotePtr{Void},Any}}, ::UInt64, ::String) at /Users/sachs/.julia/v0.6/Gallium/src/modules.jl:192
 in update_shlibs!(::Gallium.LocalSession, ::Gallium.LazyJITModules{Dict{Gallium.RemotePtr{Void},Any}}) at /Users/sachs/.julia/v0.6/Gallium/src/modules.jl:213
 in __init__() at /Users/sachs/.julia/v0.6/Gallium/src/Gallium.jl:874
 in _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:174
 in _require_from_serialized(::Int64, ::Symbol, ::Bool) at ./loading.jl:202
 in require(::Symbol) at ./loading.jl:332
during initialization of module Gallium
Keno commented 8 years ago

New mac error is fixed on the latest commit