Skip to content
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

Compiler hangs when I include Gadfly #22569

Closed
ViralBShah opened this issue Jun 27, 2017 · 4 comments
Closed

Compiler hangs when I include Gadfly #22569

ViralBShah opened this issue Jun 27, 2017 · 4 comments
Assignees
Labels
compiler:precompilation Precompilation of modules

Comments

@ViralBShah
Copy link
Member

Continuing from #22334 I am using a more complex script into a shared library. The only addition here is including Gadfly, without which it builds fine - but hangs when I add Gadfly.

module mystuff

using Gadfly
using Distributions
f() = rand(Normal())

Base.@ccallable Float64 function julia_main()
   println("hello, world")
   @show f()
end

end

#using mystuff
#mystuff.julia_main()

The compilation counter hangs, and happens unpredictably. It makes a different amount of progress on every run.

@ViralBShah ViralBShah added the compiler:precompilation Precompilation of modules label Jun 27, 2017
@ViralBShah ViralBShah changed the title Compiler is hanging when I include Gadfly Compiler hangs when I include Gadfly Jun 27, 2017
@ViralBShah
Copy link
Member Author

ViralBShah commented Jun 27, 2017

This is the session and the stacktrace when I hit Ctrl-C. The stacktrace almost always appears to be similar, even though the performance made is variable. I can tell because the number of methods compiled is printed over the course of the compilation.

viral-laptop 10:57:26 {master} ~/static-julia$ ~/Desktop/Julia-0.6.app/Contents/Resources/julia/bin/julia juliac.jl hello.jl ~/Desktop/Julia-0.6.app/Contents/Resources/julia ~/.julia
Program File : hello.jl
Julia Install Path: /Users/viral/Desktop/Julia-0.6.app/Contents/Resources/julia
(SYS_LIB, JULIA_EXE, LIB_PATH, SO_FILE) = ("/Users/viral/Desktop/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib", "/Users/viral/Desktop/Julia-0.6.app/Contents/Resources/julia/bin/julia", "/Users/viral/Desktop/Julia-0.6.app/Contents/Resources/julia/lib", "libhello.dylib")
found 51748 uncompiled methods for compile-all
^Cfatal: error thrown and no exception handler available.

signal (2): Interrupt: 2
while loading /Users/viral/static-julia/juliac.jl, in expression starting on line 76
InterruptException()
kevent at /usr/lib/system/libsystem_kernel.dylib (unknown line)
unknown function (ip: 0xffffffffffffffff)
Allocations: 914572 (Pool: 913500; Big: 1072); GC: 0
jl_gc_pool_alloc at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gc.c:923
jl_gc_alloc_ at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:249 [inlined]
jl_new_uninitialized_datatype at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/datatype.c:85
inst_datatype at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/jltypes.c:1118
jl_apply_tuple_type_v_ at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/jltypes.c:1208 [inlined]
jl_apply_tuple_type at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/jltypes.c:1215
_compile_all_union at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/precompile.c:221
_compile_all_deq at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/precompile.c:262 [inlined]
jl_compile_all_defs at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/precompile.c:309 [inlined]
jl_precompile at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/precompile.c:352
jl_write_compiler_output at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/precompile.c:31
jl_atexit_hook at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/init.c:238
main at /Users/viral/Desktop/Julia-0.6.app/Contents/Resources/julia/bin/julia (unknown line)

@ViralBShah
Copy link
Member Author

Would having a smaller test case than Gadfly help here? Perhaps @mdpradeep can help narrow it down.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jul 3, 2017

No, having the whole package to exercise assorted code paths is valuable

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 31, 2017

fixed by #22697 (but forgot to reference this correctly for auto-close)

@vtjnash vtjnash closed this as completed Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

No branches or pull requests

2 participants