Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Julia exits when hitting breakpoint #161

Open
s2maki opened this issue Oct 10, 2016 · 5 comments
Open

Julia exits when hitting breakpoint #161

s2maki opened this issue Oct 10, 2016 · 5 comments

Comments

@s2maki
Copy link
Collaborator

s2maki commented Oct 10, 2016

When running Gallium in Windows with Julia 0.5.0, hitting a breakpoint causes Julia to exit (crash).

julia> using Gallium

julia> foo(x) = x+1
foo (generic function with 1 method)

julia> Gallium.breakpoint(foo)
Locations (+: active, -: inactive, *: source):
 * Any matching method added to #foo
 * Any matching specialization of foo(x) at REPL[2]:1


julia> foo(1)

$
@Keno
Copy link
Member

Keno commented Oct 10, 2016

Does this happen with all functions, or just small functions like this one?

@Keno
Copy link
Member

Keno commented Oct 10, 2016

Also versioninfo(), what version of windows, etc. since I can't reproduce this locally.

@musm
Copy link

musm commented Oct 10, 2016

I can't reproduce this either on my windows machine.

@s2maki
Copy link
Collaborator Author

s2maki commented Oct 18, 2016

I'm on Windows 7, pretty up-to-date with patches. Here's versioninfo:

julia> versioninfo()
Julia Version 0.5.0
Commit 3c9d753* (2016-09-19 18:14 UTC)
Platform Info:
  System: NT (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7 CPU         870  @ 2.93GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, nehalem)

It happens on larger functions as well. I was able to produce it on a 23 line function.

In some other cases, (setting it on a Base function like println, for instance) I get a crash.

julia> Gallium.breakpoint(println)
Locations (+: active, -: inactive, *: source):
 + println(io::Base.AbstractIOBuffer{Array{UInt8,1}}) at coreio.jl:6
 + println(io::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}) at coreio.jl:6
 + println(io::Base.Terminals.TTYTerminal) at coreio.jl:6
 + println(io::Base.TTY) at coreio.jl:6
 + println(io::Base.AbstractIOBuffer{Array{UInt8,1}}, xs::Tuple{String,Vararg{String,N}}) at strings/io.jl:27
 + println(io::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, xs::Tuple{String,Vararg{String,N}}) at strings/io.jl:27
 + println(io::Base.AbstractIOBuffer{Array{UInt8,1}}, xs::Tuple{String,Vararg{Any,N}}) at strings/io.jl:27
 + println(io::Base.AbstractIOBuffer{Array{UInt8,1}}, xs::Tuple{SubString{String},Vararg{SubString{String},N}}) at strings/io.jl:27
 + println(io::Base.Terminals.TTYTerminal, xs::Tuple{String,Vararg{String,N}}) at strings/io.jl:27
 + println(xs::Tuple{}) at coreio.jl:5
 + println(xs::Tuple{String}) at coreio.jl:5
 * Any matching method added to Base.#println
 * Any matching specialization of println(t) at C:\Users\s2maki\.julia\v0.5\TerminalUI\src\widgets.jl:822
 * Any matching specialization of println(io) at coreio.jl:6
 * Any matching specialization of println(io, xs) at strings/io.jl:27
 * Any matching specialization of println(xs) at coreio.jl:5

julia> println("test")
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ILLEGAL_INSTRUCTION at 0x6a5416ea -- hooking_jl_savecontext at C:\Users\s2maki\.julia\v0.5\Gallium\src\Hooking\hooking.DLL (unknown line)
while loading no file, in expression starting on line 0
hooking_jl_savecontext at C:\Users\s2maki\.julia\v0.5\Gallium\src\Hooking\hooking.DLL (unknown line) jl_call_method_internal at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\julia_internal.h:189 [inlined]
jl_apply_generic at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\gf.c:1942
commit_line at .\LineEdit.jl:1300
#92 at .\LineEdit.jl:1352
#13 at .\LineEdit.jl:736
jl_call_method_internal at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\julia_internal.h:189 [inlined]
jl_apply_generic at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\gf.c:1942
#165 at .\LineEdit.jl:1458
#13 at .\LineEdit.jl:736
jl_call_method_internal at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\julia_internal.h:189 [inlined]
jl_apply_generic at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\gf.c:1942
prompt! at .\LineEdit.jl:1605
run_interface at .\LineEdit.jl:1574
unknown function (ip: 00000000034AC105)
jl_call_method_internal at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\julia_internal.h:189 [inlined]
jl_apply_generic at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\gf.c:1942
run_frontend at .\REPL.jl:903
run_repl at .\REPL.jl:188
unknown function (ip: 000000001A2703B6)
jl_call_method_internal at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\julia_internal.h:189 [inlined]
jl_apply_generic at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\gf.c:1942
_start at .\client.jl:360
unknown function (ip: 00000000034C85EE)
jl_call_method_internal at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\julia_internal.h:189 [inlined]
jl_apply_generic at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src/cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/src\gf.c:1942
jl_apply at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/ui/../src\julia.h:1392 [inlined]
true_main at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/ui\repl.c:112
wmain at /cygdrive/c/BuildAgent/work/f9dddb33ef3dffec/ui\repl.c:232
__tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-4.0.5-1/crt\crtexe.c:329
mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-4.0.5-1/crt\crtexe.c:212
BaseThreadInitThunk at C:\Windows\system32\kernel32.dll (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 5325643 (Pool: 5324366; Big: 1277); GC: 6

@josefsachsconning
Copy link
Collaborator

Keith's original example works okay for me in Linux, Windows and macOS.
Encountering a breakpoint set in println produces a segfault for me in Linux and macOS,
and an infinite loop of 4 In coreio.jl:5 on Windows.

@josefsachsconning josefsachsconning changed the title Julia exits when hitting breakpoiint Julia exits when hitting breakpoint Oct 25, 2016
Keno added a commit that referenced this issue Nov 20, 2016
Fixes #173, #161, #164 (Once binaries are rebuilt on other platforms,
which they will be in subsequent commits).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants