Closed xpqz closed 8 years ago
Thanks for the report! Can you provide some code to reproduce the error?
On Friday, September 30, 2016, Stefan Kruger notifications@github.com wrote:
I encountered a seg fault in v.0.5 (also in v.0.4) when I introduced Logging.jl - my set of tests runs fine without Logging, but crashes immediately when I try to log something:
signal (11): Segmentation fault: 11 while loading /Users/stefan/.julia/v0.5/Couchzilla/test/crud_tests.jl, in expression starting on line 1 uv_write2 at /Users/osx/buildbot/slave/package_osx10_9-x64/build/ deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b 4f344b46c8/src/unix/stream.c:1389 uv_write at /Users/osx/buildbot/slave/package_osx10_9-x64/build/ deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b 4f344b46c8/src/unix/stream.c:1475 jl_uv_write at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ jl_uv.c:424 uv_write at ./stream.jl:809 unsafe_write at ./stream.jl:830 write at ./io.jl:175 print at ./strings/io.jl:70 [inlined] with_output_color at ./util.jl:302 jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942 jl_apply at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1392 [inlined] jl_f__apply at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ builtins.c:547 print_with_color at ./util.jl:306 jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942 err at /Users/stefan/.julia/v0.5/Logging/src/Logging.jl:53
relax#2 at /Users/stefan/.julia/v0.5/Couchzilla/src/utils.jl:97
unknown function (ip: 0x318f98bb6) jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942
relax at ./:0
readdoc#6 at /Users/stefan/.julia/v0.5/Couchzilla/src/database.jl:177
readdoc at /Users/stefan/.julia/v0.5/Couchzilla/src/database.jl:126 unknown function (ip: 0x318f94f66) jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942 macro expansion; at /Users/stefan/.julia/v0.5/ Couchzilla/test/crud_tests.jl:4 [inlined] macro expansion; at ./test.jl:672 [inlined] anonymous at ./ (unknown line) unknown function (ip: 0x318f9484f) jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_toplevel_eval_flex at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/toplevel.c:569 jl_parse_eval_all at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/ast.c:717 jl_load at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:596 [inlined] jlload at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ toplevel.c:605 include_from_node1 at ./loading.jl:488 jlcall_include_from_node1_20125 at /Applications/Julia-0.5.app/ Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942 do_call at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ interpreter.c:66 eval at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ interpreter.c:190 eval_body at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ interpreter.c:534 eval_body at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ interpreter.c:515 jl_interpret_call at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/interpreter.c:573 jl_toplevel_eval_flex at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/toplevel.c:572 jl_parse_eval_all at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/ast.c:717 jl_load at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:596 [inlined] jlload at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ toplevel.c:605 include_from_node1 at ./loading.jl:488 jlcall_include_from_node1_20125 at /Applications/Julia-0.5.app/ Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942 process_options at ./client.jl:262 _start at ./client.jl:318 jlcall__start_21452 at /Applications/Julia-0.5.app/ Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_call_method_internal at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/ package_osx10_9-x64/build/src/gf.c:1942 true_main at /usr/local/bin/julia (unknown line) main at /usr/local/bin/julia (unknown line) Allocations: 5977816 (Pool: 5976813; Big: 1003); GC: 8 ./run.sh: line 8: 33854 Segmentation fault: 11 julia runtests.jl
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kmsquire/Logging.jl/issues/44, or mute the thread https://github.com/notifications/unsubscribe-auth/AANoEg9J8AAr89pmeZKyw2tBDKxgyGfZks5qvSElgaJpZM4KLKt9 .
The same problem here on Ubuntu 16.04 + Julia v0.5
julia> Pkg.add("Logging")
INFO: Installing Logging v0.2.0
INFO: Package database updated
INFO: METADATA is out-of-date — you may not have the latest version of Logging
INFO: Use `Pkg.update()` to get the latest versions of your packages
julia> import Logging
WARNING: Method definition warn(Any...) in module Base at util.jl:350 overwritten in module Logging at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:61.
WARNING: Method definition info(Any...) in module Base at util.jl:320 overwritten in module Logging at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:61.
julia> warn("Warning")
signal (11): Segmentation fault
while loading no file, in expression starting on line 0
uv_write2 at /home/centos/buildbot/slave/package_tarball64/build/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1389
uv_write at /home/centos/buildbot/slave/package_tarball64/build/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1475
jl_uv_write at /home/centos/buildbot/slave/package_tarball64/build/src/jl_uv.c:424
uv_write at ./stream.jl:809
unsafe_write at ./stream.jl:830
write at ./io.jl:175
unknown function (ip: 0x7f01db93d5a6)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
print at ./strings/io.jl:70 [inlined]
warn at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:55
warn at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:61
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
do_call at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:66
eval at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:190
jl_toplevel_eval_flex at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:558 [inlined]
jl_toplevel_eval at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:580
jl_toplevel_eval_in_warn at /home/centos/buildbot/slave/package_tarball64/build/src/builtins.c:590
eval at ./boot.jl:234
unknown function (ip: 0x7f03edda94df)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
eval_user_input at ./REPL.jl:64
unknown function (ip: 0x7f01db914ab6)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
macro expansion at ./REPL.jl:95 [inlined]
#3 at ./event.jl:68
unknown function (ip: 0x7f01db911f2f)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
jl_apply at /home/centos/buildbot/slave/package_tarball64/build/src/julia.h:1392 [inlined]
start_task at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:253
unknown function (ip: 0xffffffffffffffff)
Allocations: 7023867 (Pool: 7019366; Big: 4501); GC: 14
Segmentation fault (core dumped)
Thanks for the (easy) way to reproduce. This might be a problem in mainline Julia related to overwriting. Will try to check it out.
On Friday, September 30, 2016, mobius-eng notifications@github.com wrote:
The same problem here on Ubuntu 16.04 + Julia v0.5
julia> Pkg.add("Logging") INFO: Installing Logging v0.2.0 INFO: Package database updated INFO: METADATA is out-of-date — you may not have the latest version of Logging INFO: Use
Pkg.update()
to get the latest versions of your packagesjulia> import Logging WARNING: Method definition warn(Any...) in module Base at util.jl:350 overwritten in module Logging at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:61. WARNING: Method definition info(Any...) in module Base at util.jl:320 overwritten in module Logging at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:61.
julia> warn("Warning")
signal (11): Segmentation fault while loading no file, in expression starting on line 0 uv_write2 at /home/centos/buildbot/slave/package_tarball64/build/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1389 uv_write at /home/centos/buildbot/slave/package_tarball64/build/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1475 jl_uv_write at /home/centos/buildbot/slave/package_tarball64/build/src/jl_uv.c:424 uv_write at ./stream.jl:809 unsafe_write at ./stream.jl:830 write at ./io.jl:175 unknown function (ip: 0x7f01db93d5a6) jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined] jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942 print at ./strings/io.jl:70 [inlined] warn at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:55 warn at /home/alexey/.julia/v0.5/Logging/src/Logging.jl:61 jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined] jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942 do_call at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:66 eval at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:190 jl_toplevel_eval_flex at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:558 [inlined] jl_toplevel_eval at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:580 jl_toplevel_eval_in_warn at /home/centos/buildbot/slave/package_tarball64/build/src/builtins.c:590 eval at ./boot.jl:234 unknown function (ip: 0x7f03edda94df) jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined] jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942 eval_user_input at ./REPL.jl:64 unknown function (ip: 0x7f01db914ab6) jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined] jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942 macro expansion at ./REPL.jl:95 [inlined]
3 at ./event.jl:68
unknown function (ip: 0x7f01db911f2f) jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined] jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942 jl_apply at /home/centos/buildbot/slave/package_tarball64/build/src/julia.h:1392 [inlined] start_task at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:253 unknown function (ip: 0xffffffffffffffff) Allocations: 7023867 (Pool: 7019366; Big: 4501); GC: 14 Segmentation fault (core dumped)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kmsquire/Logging.jl/issues/44#issuecomment-250814282, or mute the thread https://github.com/notifications/unsubscribe-auth/AANoEsVFwUlyfjWXT8TfCfGfbIYFvkASks5qvVE0gaJpZM4KLKt9 .
Getting the same problem. However, if I use include
before using
it works.
julia> include(Pkg.dir()"/Logging/src/Logging.jl")
WARNING: Method definition info(Any...) in module Base at util.jl:320 overwritten in module Logging at /home/josh/.julia/v0.5/Logging/src/Logging.jl:104.
WARNING: Method definition warn(Any...) in module Base at util.jl:350 overwritten in module Logging at /home/josh/.julia/v0.5/Logging/src/Logging.jl:104.
Logging
julia> using Logging
julia> debug("debug message")
julia> info("info message")
julia> warn("warning message")
04-Oct 10:26:38:WARNING:root:warning message
julia> err("error message")
04-Oct 10:26:38:ERROR:root:error message
julia> critical("critical message")
04-Oct 10:26:39:CRITICAL:root:critical message
julia> versioninfo()
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
System: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7 CPU 930 @ 2.80GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, nehalem)
I cleared out all files in /home/josh/.julia/lib/v0.5/
and it seemed to have fixed the problem.
@JoshChristie, thanks, that was a good hint. Precompilation isn't enabled for Logging
, and enabling it causes the problems shown here. I haven't verified, but almost certainly what happened is that a package with precompilation enabled imports Logging
, causing it to precompile, and causing problems going forward.
So the fix is to figure out how to enable precompilation without breaking things.
Awesome, I verified that was the case. I can reproduce the segfault by creating a package which uses Logging
and activating __precompile__()
.
Should be fixed by #47. Will merge that when CI passes.
I encountered a seg fault in v.0.5 (also in v.0.4) when I introduced Logging.jl - my set of tests runs fine without Logging, but crashes immediately when I try to log something:
signal (11): Segmentation fault: 11 while loading /Users/stefan/.julia/v0.5/Couchzilla/test/crud_tests.jl, in expression starting on line 1 uv_write2 at /Users/osx/buildbot/slave/package_osx10_9-x64/build/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1389 uv_write at /Users/osx/buildbot/slave/package_osx10_9-x64/build/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1475 jl_uv_write at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/jl_uv.c:424 uv_write at ./stream.jl:809 unsafe_write at ./stream.jl:830 write at ./io.jl:175 print at ./strings/io.jl:70 [inlined] with_output_color at ./util.jl:302 jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942 jl_apply at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1392 [inlined] jl_f__apply at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/builtins.c:547 print_with_color at ./util.jl:306 jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942 err at /Users/stefan/.julia/v0.5/Logging/src/Logging.jl:53
relax#2 at /Users/stefan/.julia/v0.5/Couchzilla/src/utils.jl:97
unknown function (ip: 0x318f98bb6) jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
relax at ./:0
readdoc#6 at /Users/stefan/.julia/v0.5/Couchzilla/src/database.jl:177
readdoc at /Users/stefan/.julia/v0.5/Couchzilla/src/database.jl:126 unknown function (ip: 0x318f94f66) jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined] jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942 macro expansion; at /Users/stefan/.julia/v0.5/Couchzilla/test/crud_tests.jl:4 [inlined] macro expansion; at ./test.jl:672 [inlined] anonymous at ./ (unknown line)
unknown function (ip: 0x318f9484f)
jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined]
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:569
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ast.c:717
jl_load at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:596 [inlined]
jlload at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:605
include_from_node1 at ./loading.jl:488
jlcall_include_from_node1_20125 at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
do_call at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:66
eval at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:190
eval_body at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:534
eval_body at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:515
jl_interpret_call at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:573
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:572
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/ast.c:717
jl_load at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:596 [inlined]
jlload at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:605
include_from_node1 at ./loading.jl:488
jlcall_include_from_node1_20125 at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
process_options at ./client.jl:262
_start at ./client.jl:318
jlcall__start_21452 at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
true_main at /usr/local/bin/julia (unknown line)
main at /usr/local/bin/julia (unknown line)
Allocations: 5977816 (Pool: 5976813; Big: 1003); GC: 8
./run.sh: line 8: 33854 Segmentation fault: 11 julia runtests.jl