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

Hang on example #340

Open
PallHaraldsson opened this issue Aug 27, 2020 · 12 comments
Open

Hang on example #340

PallHaraldsson opened this issue Aug 27, 2020 · 12 comments

Comments

@PallHaraldsson
Copy link

First, congratulation on the loading speed, I was going to check the (time) of the plot itself (hangs on 1.5.1, 1.4.0 and brand-new 1.6 master for me):

julia> @time using GR
  0.229033 seconds (78.36 k allocations: 5.998 MiB)

julia> histogram(randn(10000))
^C
^C

[hang, I only get what follows after I kill the julia process]

signal (15): Terminated
in expression starting at REPL[2]:1
recv at /lib/x86_64-linux-gnu/libpthread.so.0 (unknown line)
gks_drv_socket at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/../deps/gr/lib/libGR.so (unknown line)
gks_ddlk.isra.0 at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/../deps/gr/lib/libGR.so (unknown line)
gks_open_ws at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/../deps/gr/lib/libGR.so (unknown line)
initgks at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/../deps/gr/lib/libGR.so (unknown line)
gr_clearws at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/../deps/gr/lib/libGR.so (unknown line)
clearws at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/GR.jl:502 [inlined]
plot_data at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/jlgr.jl:1097
plot_data at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/jlgr.jl:1074 [inlined]
#histogram#50 at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/jlgr.jl:1857
histogram at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/jlgr.jl:1851 [inlined]
#histogram#11 at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/GR.jl:3420 [inlined]
histogram at /home/pharaldsson_sym/.julia/packages/GR/Lve7f/src/GR.jl:3420
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:117
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:206
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:157 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:566
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:660
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:840
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:790
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:883
eval at ./boot.jl:331
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:134
repl_backend_loop at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:195
start_repl_backend at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:180
#run_repl#37 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:292
run_repl at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
#806 at ./client.jl:399
jfptr_YY.806_33777.clone_1 at /home/pharaldsson_sym/julia-1.5.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:655
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:705
#invokelatest#1 at ./essentials.jl:710 [inlined]
invokelatest at ./essentials.jl:709 [inlined]
run_main_repl at ./client.jl:383
exec_options at ./client.jl:313
_start at ./client.jl:506
jfptr__start_51675.clone_1 at /home/pharaldsson_sym/julia-1.5.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1690 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:106
main at /buildworker/worker/package_linux64/build/ui/repl.c:227
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/pharaldsson_sym/julia-1.5.1/bin/julia (unknown line)
unknown function (ip: (nil))
Allocations: 7598702 (Pool: 7596780; Big: 1922); GC: 8
ERROR: InterruptException:
@PallHaraldsson
Copy link
Author

The example works in v0.49.0, but neither in v0.50.0.

@jheinen
Copy link
Owner

jheinen commented Aug 27, 2020

Please close all graphic output windows (created by GR) and then update and build GR:

ENV["GRDIR"] = ""
] up GR
] build GR

@PallHaraldsson
Copy link
Author

PallHaraldsson commented Aug 27, 2020

It didn't work, neither in 1.5.1 or 1.6 master, but I didn't test/build on more Julia versions.

Like I said, your older GR version works, now (and way back when I tried). I had a thought, if it might relate to (what I can't even kill with kill -9, I understand I need to restart...):

$ ps -ef |grep julia |grep defunct
pharald+   822   796  0 maí13 pts/42  00:00:00 [julia] <defunct>
pharald+  3098  2910  0 ágú26 pts/136 00:00:00 [julia] <defunct>
pharald+  4513  4492  0 júl09 pts/126 00:00:00 [julia] <defunct>
pharald+  5087 29826  0 júl14 pts/126 00:00:00 [julia] <defunct>
pharald+  6529 13780  0 maí21 pts/61  00:00:00 [julia] <defunct>
pharald+  6834  6589  0 jún15 pts/106 00:00:00 [julia] <defunct>
pharald+  8594  6648  0 jún12 pts/103 00:00:00 [julia] <defunct>
pharald+  9520  9482  0 ágú26 pts/129 00:00:00 [julia] <defunct>
pharald+  9826  7801  0 júl23 pts/135 00:00:00 [julia] <defunct>
pharald+ 10226 10180  0 jún01 pts/84  00:00:00 [julia] <defunct>
pharald+ 10936 10907  0 jún16 pts/117 00:00:00 [julia] <defunct>
pharald+ 14566 12300  0 ágú17 pts/3  00:00:00 [julia] <defunct>
pharald+ 16354  8928  0 maí28 pts/78  00:00:00 [julia] <defunct>
pharald+ 18317 18290  0 jún06 pts/89  00:00:00 [julia] <defunct>
pharald+ 21803 20628  0 júl06 pts/126 00:00:00 [julia] <defunct>
pharald+ 22417 22118  0 jún11 pts/102 00:00:00 [julia] <defunct>
pharald+ 24378 30874  0 jún23 pts/122 00:00:00 [julia] <defunct>
pharald+ 26088 25804  0 júl24 pts/135 00:00:00 [julia] <defunct>
pharald+ 27677 27619  0 jún09 pts/97  00:00:00 [julia] <defunct>

@PallHaraldsson
Copy link
Author

PallHaraldsson commented Aug 27, 2020

I tried again, this time with the build step, with the version that worked before on 1.5.1, and now it hangs:

$ ~/julia-1.5.1/bin/julia -q
(@v1.5) pkg> add [email protected]  # EDIT previously did: up [email protected] 

(@v1.5) pkg> build GR
   Building GR → `~/.julia/packages/GR/8mv9N/deps/build.log`

julia> @time using GR
  0.247219 seconds (46.15 k allocations: 3.533 MiB)

julia> histogram(randn(10000))

However it loads fast and 3.6x faster with:

$ ~/julia-1.5.1/bin/julia -O0 --compile=min -q

julia> @time using GR
  0.069020 seconds (43.85 k allocations: 4.237 MiB)

@PallHaraldsson
Copy link
Author

PallHaraldsson commented Aug 27, 2020

While I did build for [email protected], I find the likely reason in the build log:

[ Info: Downloading pre-compiled GR 0.51.0 Ubuntu binary EDIT: was a mistake, now that I did add [email protected] then build still hang

@jheinen
Copy link
Owner

jheinen commented Aug 27, 2020

Hmm - I can't reproduce the problem. I tested on CentOS 8, Ubuntu 18.04, Debian 10, macOS 10.15 and 10.16. Can you manually start 'gksqt'? Do you probably have old/conflicting GR run-time environments on your machine ($HOME/gr, /usr/gr, /usr/local/gr) ?

@PallHaraldsson
Copy link
Author

Version 0.48 works, 0.49 doesn't, hopefully I didn't have a typo originally, or the reason it worked the first time, is I didn't do a build manually.

@PallHaraldsson
Copy link
Author

I located two:

$ /home/pharaldsson_sym/.julia/packages/GR/8mv9N/deps/gr/bin/gksqt
GKSserver: Failed to listen to port 8410
$ /home/pharaldsson_sym/.julia/packages/GR/yMV3y/deps/gr/bin/gksqt
GKSserver: Failed to listen to port 8410

@PallHaraldsson
Copy link
Author

No other gr in those paths. Seems to be about the downloaded gr build gets me.

@PallHaraldsson
Copy link
Author

I did move the .julia directory (previously, then back) to start with clean Julia 1.5.1 and only GR installed, so that's not explaining any problem (e.g. the two gr locations shouldn't be a problem).

@jheinen
Copy link
Owner

jheinen commented Aug 27, 2020

The port is used by another (gksqt) application. This can't work. You should close all gksqt apps and wait for a minute or so. This is probably an orphan socket listener issue. If you can't kill -9 the process, you even will have to reboot your Linux ...

@PallHaraldsson
Copy link
Author

I've restarted my machine defunct processes thus gone and GR works in my (more recent now) Julia 1.6, so I closed the Julia (non-issue, it seems).

You may want to keep this issue open in case there's something GR is doing to cause this, or maybe close and open the other one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants