Skip to content

Instantly share code, notes, and snippets.

@aviks
Created June 11, 2015 08:25
Show Gist options
  • Save aviks/ad207b71e514ffe79c13 to your computer and use it in GitHub Desktop.
Save aviks/ad207b71e514ffe79c13 to your computer and use it in GitHub Desktop.
JavaCall Debug Info
avik-mb:julia4 aviks$ usr/bin/lldb usr/bin/julia-debug -- -e 'include(joinpath(Pkg.dir("Taro"), "test", "runtests.jl"))'
(lldb) target create "usr/bin/julia-debug"
Current executable set to 'usr/bin/julia-debug' (x86_64).
(lldb) settings set -- target.run-args "-e" "include(joinpath(Pkg.dir(\"Taro\"), \"test\", \"runtests.jl\"))"
(lldb) process launch
Process 43096 launched: '/Users/aviks/dev/julia/julia4/usr/bin/julia-debug' (x86_64)
WARNING: dlopen is deprecated, use Libdl.dlopen instead.
in depwarn at ./deprecated.jl:62
in dlopen at ./deprecated.jl:30
in findjvm at /Users/aviks/.julia/v0.4/JavaCall/src/JavaCall.jl:80
in include at ./boot.jl:253
in include_from_node1 at ./loading.jl:133
in reload_path at ./loading.jl:157
in _require at ./loading.jl:69
in require at ./loading.jl:55
in include at ./boot.jl:253
in include_from_node1 at ./loading.jl:133
in reload_path at ./loading.jl:157
in _require at ./loading.jl:69
in require at ./loading.jl:52
in include at ./boot.jl:253
in include_from_node1 at ./loading.jl:133
in process_options at ./client.jl:280
in _start at ./client.jl:404
while loading /Users/aviks/.julia/v0.4/JavaCall/src/JavaCall.jl, in expression starting on line 88
Found libjvm @ /Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home/jre/lib/server
signal (11): Segmentation fault: 11
unknown function (ip: 288767131)
Process 43096 stopped
* thread #1: tid = 0x3602c5, 0x0000000311363c9b, queue = 'com.apple.main-thread', stop reason = signal SIGSEGV
frame #0: 0x0000000311363c9b
-> 0x311363c9b: movl 8(%rdx), %r11d
0x311363c9f: cmpl $4250670536, %r11d
0x311363ca6: jne 0x311363e69
0x311363cac: movl 12(%rsi), %edi
(lldb) bt
* thread #1: tid = 0x3602c5, 0x0000000311363c9b, queue = 'com.apple.main-thread', stop reason = signal SIGSEGV
* frame #0: 0x0000000311363c9b
frame #1: 0x0000000311306706
frame #2: 0x0000000311306706
frame #3: 0x0000000311306058
frame #4: 0x00000003113069fe
frame #5: 0x00000003113069fe
frame #6: 0x0000000311306350
frame #7: 0x0000000311306706
frame #8: 0x0000000311306058
frame #9: 0x0000000311306058
frame #10: 0x0000000311306058
frame #11: 0x0000000311306058
frame #12: 0x0000000311306058
frame #13: 0x0000000311306058
frame #14: 0x0000000311306233
frame #15: 0x0000000311306233
frame #16: 0x0000000311306233
frame #17: 0x0000000311306233
frame #18: 0x0000000311306233
frame #19: 0x0000000311306058
frame #20: 0x0000000311306233
frame #21: 0x00000003113004e7
frame #22: 0x000000030f7dbf68 libjvm.dylib`JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 554
frame #23: 0x000000030f7dbd38 libjvm.dylib`JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) + 40
frame #24: 0x000000030f80f8cf libjvm.dylib`jni_invoke_nonstatic(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) + 698
frame #25: 0x000000030f8010d2 libjvm.dylib`jni_NewObjectA + 212
frame #26: 0x00000003178f6e03 JIT(0x306529c30)`julia__jcall_21740(jmethodId=<unavailable>, callmethod=<unavailable>, argtypes=<unavailable>) + 3587 at JavaCall.jl:284
frame #27: 0x000000010002a674 libjulia-debug.dylib`jl_apply(f=0x0000000107d23130, args=0x00007fff5fbfc738, nargs=5) + 68 at julia.h:1297
frame #28: 0x000000010002cba0 libjulia-debug.dylib`jl_trampoline(F=0x0000000107d23130, args=0x00007fff5fbfc738, nargs=5) + 176 at builtins.c:964
frame #29: 0x000000010001a8b4 libjulia-debug.dylib`jl_apply(f=0x0000000107d23130, args=0x00007fff5fbfc738, nargs=5) + 68 at julia.h:1297
frame #30: 0x000000010001d161 libjulia-debug.dylib`jl_apply_generic(F=0x0000000107640c30, args=0x00007fff5fbfc738, nargs=5) + 737 at gf.c:1649
frame #31: 0x00000003178cabfb JIT(0x103a68e30)`julia_jnew_21737(T=<unavailable>) + 2795 at JavaCall.jl:187
frame #32: 0x00000003178ca0b4 JIT(0x3108ef230)`julia_call_21736(argtypes=<unavailable>) + 180 at JavaCall.jl:123
frame #33: 0x000000010002a674 libjulia-debug.dylib`jl_apply(f=0x0000000107cec230, args=0x00007fff5fbfd1e0, nargs=2) + 68 at julia.h:1297
frame #34: 0x000000010002cba0 libjulia-debug.dylib`jl_trampoline(F=0x0000000107cec230, args=0x00007fff5fbfd1e0, nargs=2) + 176 at builtins.c:964
frame #35: 0x000000010001a8b4 libjulia-debug.dylib`jl_apply(f=0x0000000107cec230, args=0x00007fff5fbfd1e0, nargs=2) + 68 at julia.h:1297
frame #36: 0x000000010001d161 libjulia-debug.dylib`jl_apply_generic(F=0x00000001059eff10, args=0x00007fff5fbfd1e0, nargs=2) + 737 at gf.c:1649
frame #37: 0x000000031789a883 JIT(0x103af5a30)`julia_extract_21703 + 6275 at Taro.jl:26
frame #38: 0x000000010002a674 libjulia-debug.dylib`jl_apply(f=0x00000001084f0290, args=0x00007fff5fbfd448, nargs=1) + 68 at julia.h:1297
frame #39: 0x000000010002cba0 libjulia-debug.dylib`jl_trampoline(F=0x00000001084f0290, args=0x00007fff5fbfd448, nargs=1) + 176 at builtins.c:964
frame #40: 0x000000010001a8b4 libjulia-debug.dylib`jl_apply(f=0x00000001084f0290, args=0x00007fff5fbfd448, nargs=1) + 68 at julia.h:1297
frame #41: 0x000000010001d161 libjulia-debug.dylib`jl_apply_generic(F=0x000000010762d8f0, args=0x00007fff5fbfd448, nargs=1) + 737 at gf.c:1649
frame #42: 0x0000000100109404 libjulia-debug.dylib`jl_apply(f=0x000000010762d8f0, args=0x00007fff5fbfd448, nargs=1) + 68 at julia.h:1297
frame #43: 0x0000000100108cf9 libjulia-debug.dylib`do_call(f=0x000000010762d8f0, args=0x0000000107f44d68, nargs=1, eval0=0x0000000000000000, locals=0x00007fff5fbfe010, nl=1, ngensym=3) + 377 at interpreter.c:65
frame #44: 0x0000000100105b3d libjulia-debug.dylib`eval(e=0x00000001084efdd0, locals=0x00007fff5fbfe010, nl=1, ngensym=3) + 2941 at interpreter.c:212
frame #45: 0x0000000100105c15 libjulia-debug.dylib`eval(e=0x00000001084efdb0, locals=0x00007fff5fbfe010, nl=1, ngensym=3) + 3157 at interpreter.c:218
frame #46: 0x00000001001084e0 libjulia-debug.dylib`eval_body(stmts=0x000000010823d840, locals=0x00007fff5fbfe010, nl=1, ngensym=3, start=0, toplevel=1) + 960 at interpreter.c:585
frame #47: 0x0000000100108827 libjulia-debug.dylib`jl_interpret_toplevel_thunk_with(lam=0x0000000108414b50, loc=0x0000000000000000, nl=1) + 615 at interpreter.c:623
frame #48: 0x0000000100108903 libjulia-debug.dylib`jl_interpret_toplevel_thunk(lam=0x0000000108414b50) + 51 at interpreter.c:630
frame #49: 0x00000001001257f3 libjulia-debug.dylib`jl_toplevel_eval_flex(e=0x00000001084efd50, fast=1) + 2547 at toplevel.c:538
frame #50: 0x00000001001264f6 libjulia-debug.dylib`jl_parse_eval_all(fname=0x0000000106853ca0, len=46) + 502 at toplevel.c:573
frame #51: 0x0000000100126763 libjulia-debug.dylib`jl_load(fname=0x0000000106853ca0) + 243 at toplevel.c:613
frame #52: 0x00000001001267e9 libjulia-debug.dylib`jl_load_(str=0x00000001069167b0) + 41 at toplevel.c:621
frame #53: 0x000000010282e8ee sys.dylib`julia_include_723(fname=<unavailable>) + 78 at boot.jl:253
frame #54: 0x000000010001a8b4 libjulia-debug.dylib`jl_apply(f=0x00000001055259b0, args=0x00007fff5fbfe838, nargs=1) + 68 at julia.h:1297
frame #55: 0x000000010001d03e libjulia-debug.dylib`jl_apply_generic(F=0x0000000105525870, args=0x00007fff5fbfe838, nargs=1) + 446 at gf.c:1625
frame #56: 0x000000030ebe954f JIT(0x1044e7430)`julia_include_from_node1_21193(path=<unavailable>) + 1359 at loading.jl:133
frame #57: 0x000000010002a674 libjulia-debug.dylib`jl_apply(f=0x00000001068971f0, args=0x00007fff5fbfea78, nargs=1) + 68 at julia.h:1297
frame #58: 0x000000010002cba0 libjulia-debug.dylib`jl_trampoline(F=0x00000001068971f0, args=0x00007fff5fbfea78, nargs=1) + 176 at builtins.c:964
frame #59: 0x000000010001a8b4 libjulia-debug.dylib`jl_apply(f=0x00000001068971f0, args=0x00007fff5fbfea78, nargs=1) + 68 at julia.h:1297
frame #60: 0x000000010001d161 libjulia-debug.dylib`jl_apply_generic(F=0x000000010585c7d0, args=0x00007fff5fbfea78, nargs=1) + 737 at gf.c:1649
frame #61: 0x0000000100109404 libjulia-debug.dylib`jl_apply(f=0x000000010585c7d0, args=0x00007fff5fbfea78, nargs=1) + 68 at julia.h:1297
frame #62: 0x0000000100108cf9 libjulia-debug.dylib`do_call(f=0x000000010585c7d0, args=0x000000010684f928, nargs=1, eval0=0x0000000000000000, locals=0x0000000000000000, nl=0, ngensym=0) + 377 at interpreter.c:65
frame #63: 0x0000000100105b3d libjulia-debug.dylib`eval(e=0x0000000106887cd0, locals=0x0000000000000000, nl=0, ngensym=0) + 2941 at interpreter.c:212
frame #64: 0x0000000100104f96 libjulia-debug.dylib`jl_interpret_toplevel_expr(e=0x0000000106887cd0) + 54 at interpreter.c:27
frame #65: 0x0000000100125721 libjulia-debug.dylib`jl_toplevel_eval_flex(e=0x0000000106887c50, fast=1) + 2337 at toplevel.c:523
frame #66: 0x0000000100126268 libjulia-debug.dylib`jl_toplevel_eval(v=0x0000000106887c50) + 40 at toplevel.c:546
frame #67: 0x000000010002ae83 libjulia-debug.dylib`jl_toplevel_eval_in(m=0x000000010483c010, ex=0x0000000106887c50) + 323 at builtins.c:539
frame #68: 0x000000010002b0d6 libjulia-debug.dylib`jl_f_top_eval(F=0x0000000000000000, args=0x00007fff5fbff3b8, nargs=2) + 246 at builtins.c:568
frame #69: 0x0000000102a4f7e7 sys.dylib`julia_process_options_18682(opts=0x0000000000000100, args=<unavailable>) + 1591 at client.jl:280
frame #70: 0x0000000102a4e567 sys.dylib`julia__start_18681 + 935 at client.jl:404
frame #71: 0x0000000102a4f1a6 sys.dylib`jlcall__start_18681 + 6
frame #72: 0x000000010002a674 libjulia-debug.dylib`jl_apply(f=0x000000010603dbd0, args=0x0000000000000000, nargs=0) + 68 at julia.h:1297
frame #73: 0x000000010002cba0 libjulia-debug.dylib`jl_trampoline(F=0x000000010603dbd0, args=0x0000000000000000, nargs=0) + 176 at builtins.c:964
frame #74: 0x000000010001a8b4 libjulia-debug.dylib`jl_apply(f=0x000000010603dbd0, args=0x0000000000000000, nargs=0) + 68 at julia.h:1297
frame #75: 0x000000010001d03e libjulia-debug.dylib`jl_apply_generic(F=0x000000010603db50, args=0x0000000000000000, nargs=0) + 446 at gf.c:1625
frame #76: 0x0000000100002a14 julia-debug`jl_apply(f=0x000000010603db50, args=0x0000000000000000, nargs=0) + 68 at julia.h:1297
frame #77: 0x00000001000025d2 julia-debug`true_main(argc=0, argv=0x00007fff5fbff9d8) + 594 at repl.c:454
frame #78: 0x0000000100002339 julia-debug`main(argc=0, argv=0x00007fff5fbff9d8) + 153 at repl.c:528
frame #79: 0x00000001000014c4 julia-debug`start + 52
(lldb) frame select 26
frame #26: 0x00000003178f6e03 JIT(0x306529c30)`julia__jcall_21740(jmethodId=<unavailable>, callmethod=<unavailable>, argtypes=<unavailable>) + 3587 at JavaCall.jl:284
281 @assert callmethod != C_NULL
282 @assert jmethodId != C_NULL
283 if(isnull(obj)); error("Attempt to call method on Java NULL"); end
-> 284 result = ccall(callmethod, Ptr{Void} , (Ptr{JNIEnv}, Ptr{Void}, Ptr{Void}, Ptr{Void}), penv, obj.ptr, jmethodId, convert_args(argtypes, args...))
285 if result==C_NULL; geterror(); end
286 return convert_result(rettype, result)
287 end
(lldb) frame variable
(unsigned char) jmethodId = <variable not available>
(jl_value_t *) callmethod = <variable not available>
(jl_value_t *) argtypes = <variable not available>
(unsigned char) result = <register rax is not available>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment