SYSTEM: show(lasterr) caused an error


#1

This is an error that I’ve seen for the first time a few weeks ago - it only occurred when I imported a package I’m developing from within the Atom editor. And it was difficult to reproduce. If I change code in some random way, then the error message would go away, I change some code again and it returns. Today for the first time I am getting this error on the REPL. I have never had the error appear from a notebook, or when executing a script. I’d be more than happy to find out this is a problem in my code or my setup but I have no clue where to start looking. Any help would be appreciated. For what it’s worth, the package is at https://github.com/cortner/NBodyIPs.jl

julia> using NBodyIPs
SYSTEM: show(lasterr) caused an error
MethodError(Core.Inference.convert, (AssertionError, "invalid age range update"), 0x0000000000000ac6)

Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:576
 [4] eval(::Module, ::Any) at ./boot.jl:235
 [5] _require(::Symbol) at ./loading.jl:490
 [6] require(::Symbol) at ./loading.jl:405
 [7] eval(::Module, ::Any) at ./boot.jl:235
 [8] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
 [9] macro expansion at ./REPL.jl:97 [inlined]
 [10] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
fatal: error thrown and no exception handler available.
Base.MethodError(f=typeof(Core.Inference.convert)(), args=(Base.AssertionError, "invalid age range update"), world=0x0000000000000ac6)
rec_backtrace at /Users/ortner/gits/julia6/src/stackwalk.c:84
record_backtrace at /Users/ortner/gits/julia6/src/task.c:245 [inlined]
jl_throw at /Users/ortner/gits/julia6/src/task.c:564
jl_method_error_bare at /Users/ortner/gits/julia6/src/gf.c:1471
jl_method_error at /Users/ortner/gits/julia6/src/gf.c:1489
jl_lookup_generic_ at /Users/ortner/gits/julia6/src/gf.c:1903
jl_apply_generic at /Users/ortner/gits/julia6/src/gf.c:1923
Type at ./coreimg.jl:14
update_valid_age! at ./inference.jl:2353
add_backedge! at ./inference.jl:2366
abstract_call_gf_by_type at ./inference.jl:1421
jlcall_abstract_call_gf_by_type_659 at /Users/ortner/gits/julia6/usr/lib/julia/sys.dylib (unknown line)
abstract_call at ./inference.jl:1897
jlcall_abstract_call_562 at /Users/ortner/gits/julia6/usr/lib/julia/sys.dylib (unknown line)
abstract_eval_call at ./inference.jl:1927
abstract_eval at ./inference.jl:1950
jlcall_abstract_eval_512 at /Users/ortner/gits/julia6/usr/lib/julia/sys.dylib (unknown line)
typeinf_work at ./inference.jl:2722
typeinf at ./inference.jl:2787
typeinf_edge at ./inference.jl:2535
# }+ hundreds of lines of stack traces

#2

This is https://github.com/JuliaLang/julia/issues/21653 and it’s kind of the bane of my existence this week. I’m afraid I can’t really suggest a work-around because I’m in the same situation as you. I’d be thrilled to know if there’s a way to reliably avoid it.


#3

UPDATE: a collaborator of mine is now getting this error message also from a notebook. “bane of existence” is a good way to put it, this is causing me quite a headache . . .


#4

Can you check if https://github.com/JuliaLang/julia/pull/27568 fixes this for you (it’s on master and will be on 0.6.4 - you can try the backport PR if you’re on 0.6).


#5

thank you - I’ll try that and report back


#6

Would that be the aa/backports-0.6.4 branch? Oh man, I would be so excited if this were resolved (I’ve made about half a dozen commits to MeshCat.jl this week to shuffle code around to try to avoid the issue).

Edit: answering my own question; yes: https://github.com/JuliaLang/julia/pull/27621


#7

so pulling the aa/backports-0.6.4 branch and then building will contain the fix?


#8

I think so. I just tried that, and I was able to build Julia but make install failed while building the docs:

INFO: Initializing package repository /home/rdeits/Projects/julia/doc/deps/v0.6
INFO: Package directory /home/rdeits/Projects/julia/doc/deps/v0.6 is already initialized.

signal (11): Segmentation fault
while loading /home/rdeits/Projects/julia/doc/make.jl, in expression starting on line 5
_ZN4llvm11InstructionC2EPNS_4TypeEjPNS_3UseEjPS0_ at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm8LoadInstC1EPNS_4TypeEPNS_5ValueERKNS_5TwineEbjNS_14AtomicOrderingENS_20SynchronizationScopeEPNS_11InstructionE at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm8LoadInstC2EPNS_4TypeEPNS_5ValueERKNS_5TwineEbjPNS_11InstructionE at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
unknown function (ip: 0x7ff936746532)
unknown function (ip: 0x7ff936749be8)
_ZN4llvm15PromoteMemToRegENS_8ArrayRefIPNS_10AllocaInstEEERNS_13DominatorTreeEPNS_15AliasSetTrackerEPNS_15AssumptionCacheE at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
unknown function (ip: 0x7ff936733b90)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /home/rdeits/Projects/julia/usr/bin/../lib/libLLVM-3.9.so (unknown line)
operator() at /home/rdeits/Projects/julia/src/jitlayers.cpp:460 [inlined]
_M_invoke at /usr/include/c++/5/functional:1857
operator() at /usr/include/c++/5/functional:2267 [inlined]
addModuleSet<llvm::SmallVector<std::unique_ptr<llvm::Module>, 1u>, llvm::RTDyldMemoryManager*, std::unique_ptr<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> >, std::default_delete<llvm::orc::LambdaResolver<JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)>, JuliaOJIT::addModule(std::unique_ptr<llvm::Module>)::<lambda(const string&)> > > > > at /home/rdeits/Projects/julia/usr/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:73 [inlined]
addModule at /home/rdeits/Projects/julia/src/jitlayers.cpp:587
jl_add_to_ee at /home/rdeits/Projects/julia/src/jitlayers.cpp:810 [inlined]

#9

Just to report that the aa/backports-0.6.4 branch seems to have this fixed. (I didn’t try to build the docs)