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

Kernel Keeps restarting #329

Closed
JonnyCBB opened this issue Jul 8, 2015 · 36 comments
Closed

Kernel Keeps restarting #329

JonnyCBB opened this issue Jul 8, 2015 · 36 comments

Comments

@JonnyCBB
Copy link

JonnyCBB commented Jul 8, 2015

My kernel keeps restarting when I run IJulia with the following commands:

julia> using IJulia

julia> notebook()

This gives the following output:

[I 11:48:39.884 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 11:48:39.908 NotebookApp] The port 8998 is already in use, trying another random port.
[I 11:48:39.913 NotebookApp] Serving notebooks from local directory: C:\Users\jonathan
[I 11:48:39.914 NotebookApp] 0 active kernels
[I 11:48:39.914 NotebookApp] The IPython Notebook is running at: http://localhost:8999/
[I 11:48:39.917 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 11:48:53.752 NotebookApp] Creating new notebook in
C:\Users\jonathan\Anaconda\lib\site-packages\IPython\kernel\manager.py:95: UserWarning: Setting kernel_cmd is deprecated, use kernel_spec to start different kernels.
  warnings.warn("Setting kernel_cmd is deprecated, use kernel_spec to "
[I 11:48:54.782 NotebookApp] Kernel started: 9b6b9343-4e0f-4618-bb8f-eefa2675d909
[W 11:48:54.806 NotebookApp] 404 GET /kernelspecs/julia%200.3/logo-64x64.png (::1) 19.00ms referer=http://localhost:8999/notebooks/Untitled.ipynb?kernel_name=julia%200.3
PROFILE = ["key"=>"bbdb5201-c754-4ae4-ae61-9b3afdf143ca","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>60221,"control_port"=>60220,"sh
ell_port"=>60217,"stdin_port"=>60219,"iopub_port"=>60218]
[W 11:49:04.812 NotebookApp] Timeout waiting for kernel_info reply from 9b6b9343-4e0f-4618-bb8f-eefa2675d909
[I 11:49:06.779 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 9b6b9343-4e0f-4618-bb8f-eefa2675d909 restarted
PROFILE = ["key"=>"bbdb5201-c754-4ae4-ae61-9b3afdf143ca","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>60221,"control_port"=>60220,"sh
ell_port"=>60217,"stdin_port"=>60219,"iopub_port"=>60218]
[I 11:49:18.796 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 9b6b9343-4e0f-4618-bb8f-eefa2675d909 restarted
PROFILE = ["key"=>"bbdb5201-c754-4ae4-ae61-9b3afdf143ca","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>60221,"control_port"=>60220,"sh
ell_port"=>60217,"stdin_port"=>60219,"iopub_port"=>60218]
[I 11:49:30.809 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 9b6b9343-4e0f-4618-bb8f-eefa2675d909 restarted
PROFILE = ["key"=>"bbdb5201-c754-4ae4-ae61-9b3afdf143ca","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>60221,"control_port"=>60220,"sh
ell_port"=>60217,"stdin_port"=>60219,"iopub_port"=>60218]

I (re)installed IJulia and ZMQ yesterday and I'm using Julia v 0.3.10.

I'm a noob to this so I apologize if the fix is blatantly in the output somewhere, it wasn't obvious to me despite following the debugging options given in the Readme.

@rohitvarkey
Copy link

There was another issue raised recently about restarting kernels. #328.

As far as I gathered it was due to ZMQ as seen in this issue JuliaInterop/ZMQ.jl#83.

Can you check your ZMQ version?

@yuyichao
Copy link
Contributor

yuyichao commented Jul 8, 2015

I think that's not his issue #74 (comment) and the ZMQ issue should be fixed now.

@JonnyCBB
Copy link
Author

JonnyCBB commented Jul 8, 2015

@rohitvarkey As far as I understand the ZMQ isn't my issue as @yuyichao says. FYI the version of ZMQ I'm using is 4.0.5. Installed it yesterday

@stevengj
Copy link
Member

stevengj commented Jul 8, 2015

Does running ipython notebook from the command-line work?

@stevengj
Copy link
Member

stevengj commented Jul 8, 2015

Also, try the "debugging IJulia" tips in the README to get more output.

@JonnyCBB
Copy link
Author

JonnyCBB commented Jul 8, 2015

Running ipython notebook from the command line only works for Python notebooks. I still get the same restarting problem with Julia notebooks

julia> using IJulia

julia> notebook()

This the output.

[I 16:03:46.197 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 16:03:46.226 NotebookApp] Serving notebooks from local directory: C:\Users\jonathan
[I 16:03:46.226 NotebookApp] 0 active kernels
[I 16:03:46.227 NotebookApp] The IPython Notebook is running at: http://localhost:8998/
[I 16:03:46.230 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 16:06:20.339 NotebookApp] Creating new notebook in
C:\Users\jonathan\Anaconda\lib\site-packages\IPython\kernel\manager.py:95: UserWarning: Setting kernel_cmd is deprecated, use kernel_spec to start different kernels.
  warnings.warn("Setting kernel_cmd is deprecated, use kernel_spec to "
[I 16:06:21.854 NotebookApp] Kernel started: a5f9a47b-a3bc-436b-b44a-fcd7d7cbbfde
[W 16:06:21.862 NotebookApp] 404 GET /kernelspecs/julia%200.3/logo-64x64.png (::1) 7.00ms referer=http://localhost:8998/notebooks/Untitled.ipynb?kernel_name=julia%200.3
PROFILE = ["key"=>"a2cad38d-9481-45d4-af5d-deb8679a2b6b","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>55070,"control_port"=>55069,"sh
ell_port"=>55066,"stdin_port"=>55068,"iopub_port"=>55067]
[I 16:06:30.861 NotebookApp] KernelRestarter: restarting kernel (1/5)
[W 16:06:31.878 NotebookApp] Timeout waiting for kernel_info reply from a5f9a47b-a3bc-436b-b44a-fcd7d7cbbfde
PROFILE = ["key"=>"a2cad38d-9481-45d4-af5d-deb8679a2b6b","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>55070,"control_port"=>55069,"sh
ell_port"=>55066,"stdin_port"=>55068,"iopub_port"=>55067]
[I 16:06:39.871 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel a5f9a47b-a3bc-436b-b44a-fcd7d7cbbfde restarted
PROFILE = ["key"=>"a2cad38d-9481-45d4-af5d-deb8679a2b6b","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>55070,"control_port"=>55069,"sh
ell_port"=>55066,"stdin_port"=>55068,"iopub_port"=>55067]
[I 16:06:48.888 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel a5f9a47b-a3bc-436b-b44a-fcd7d7cbbfde restarted
PROFILE = ["key"=>"a2cad38d-9481-45d4-af5d-deb8679a2b6b","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>55070,"control_port"=>55069,"sh
ell_port"=>55066,"stdin_port"=>55068,"iopub_port"=>55067]
[I 16:06:57.907 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel a5f9a47b-a3bc-436b-b44a-fcd7d7cbbfde restarted

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x6c470391 -- utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_compile at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_trampoline at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_matching_methods at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_gc_init at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
[I 16:07:03.924 NotebookApp] Interrupted...
[I 16:07:03.924 NotebookApp] Shutting down kernels
[I 16:07:04.025 NotebookApp] Kernel shutdown: a5f9a47b-a3bc-436b-b44a-fcd7d7cbbfde
ERROR: interrupt
 in process_events at stream.jl:537
 in wait at task.jl:273
 in wait at task.jl:194
 in stream_wait at stream.jl:263
 in wait at process.jl:619
 in success at process.jl:492
 in notebook at C:\Users\jonathan\.julia\v0.3\IJulia\src\IJulia.jl:177
 in notebook at C:\Users\jonathan\.julia\v0.3\IJulia\src\IJulia.jl:176

@stevengj
Copy link
Member

stevengj commented Jul 9, 2015

Your comment "Running ipython notebook from the command line only works for Python notebooks" makes no sense to me.

Are you using IPython 3.x? (Try ipython --version) If so, the notebook home page should have a "New" button that gives the option to create a Python notebook or a Julia notebook.

If you are using IPython 2.x, you will have to do Pkg.checkout("IJulia", "ipython2"); Pkg.build("IJulia") and then ipython notebook --profile julia. However, I strongly recommend upgrading to IPython 3.x.

@JonnyCBB
Copy link
Author

JonnyCBB commented Jul 9, 2015

Sorry I wasn't very clear with that statement. There is a "New" button that gives the option to create Python or Julia notebooks. What I meant to say was that the Python notebook works ok. I can work on a Python notebook without the Kernel restarting and causing problems. It only restarts when I open a Julia notebook

@stevengj
Copy link
Member

stevengj commented Jul 9, 2015

Unfortunately, the error log is not telling us much. There is a timeout waiting for the kernel_info_reply message, but not errors from Julia up until that point. (There is a crash later, but that is from the Julia process being killed when IPython gets impatient, so it is unrelated.)

Can you try Pkg.checkout("IJulia", "master"); Pkg.build("IJulia") to get the latest version?

@JonnyCBB
Copy link
Author

JonnyCBB commented Jul 9, 2015

So I've just tried

julia> Pkg.checkout("IJulia","master")

in the Julia terminal but I get:

ERROR: IJulia is dirty, bailing
 in error at error.jl:21 (repeats 2 times)

Really not sure what to do.

P.S. I forgot to mention last time that my IPython version is 3.2.0

@stevengj
Copy link
Member

That's because you modified IJulia above. Go to the IJulia directory and run git reset --hard to undo your changes and then the Pkg command should work.

@JonnyCBB
Copy link
Author

Thanks for clarifying. I've done all of that and tried running the Julia notebook from my command line but I still get the same problem with the kernel restarting but this time with a longer error message that I can't decipher

C:\Users\jonathan>ipython notebook
[I 14:39:55.562 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 14:39:55.589 NotebookApp] Serving notebooks from local directory: C:\Users\jonathan
[I 14:39:55.591 NotebookApp] 0 active kernels
[I 14:39:55.592 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 14:39:55.594 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 14:39:59.454 NotebookApp] Creating new notebook in
[I 14:40:00.290 NotebookApp] Kernel started: 32db9c7c-1423-419b-9e98-3b7ec4a31f3a
[W 14:40:00.299 NotebookApp] 404 GET /kernelspecs/julia%200.3/logo-64x64.png (::1) 7.00ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=julia%200.3
PROFILE = ["key"=>"44435b6b-0dd2-4169-9ae8-4cedfca69d09","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>57743,"control_port"=>57742,"sh
ell_port"=>57739,"stdin_port"=>57741,"iopub_port"=>57740]
[I 14:40:09.293 NotebookApp] KernelRestarter: restarting kernel (1/5)
[W 14:40:10.315 NotebookApp] Timeout waiting for kernel_info reply from 32db9c7c-1423-419b-9e98-3b7ec4a31f3a
PROFILE = ["key"=>"44435b6b-0dd2-4169-9ae8-4cedfca69d09","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>57743,"control_port"=>57742,"sh
ell_port"=>57739,"stdin_port"=>57741,"iopub_port"=>57740]
[I 14:40:18.296 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 32db9c7c-1423-419b-9e98-3b7ec4a31f3a restarted

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x6c4715b2 --  at 0x6c4715b2 -- utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
utf8proc_NFKC at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_compile at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_get_specialization at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_value_to_pointer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_compile at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_trampoline at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
lookup_ref at multi.jl:470
isready at multi.jl:487
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
reload_path at loading.jl:161
_require at loading.jl:67
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
require at loading.jl:51
jlcall_require_616 at  (unknown line)
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_init_serializer at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_eval_with_compiler_p at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_eval_module_expr at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_eval_with_compiler_p at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_parse_eval_all at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_load_ at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
include at boot.jl:245
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
include_from_node1 at loading.jl:128
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_expr at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_thunk_with at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_eval_with_compiler_p at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_parse_eval_all at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
jl_load_ at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
include at boot.jl:245
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
include_from_node1 at loading.jl:128
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
process_options at client.jl:285
_start at client.jl:354
jlcall__start_365 at  (unknown line)
jl_apply_generic at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
unknown function (ip: 4200686)
julia_trampoline at C:\Users\jonathan\AppData\Local\Julia-0.3.10\bin\libjulia.dll (unknown line)
unknown function (ip: 4202914)
unknown function (ip: 4199436)
unknown function (ip: 4199739)
BaseThreadInitThunk at C:\Windows\system32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
[I 14:40:24.302 NotebookApp] Interrupted...
[I 14:40:24.302 NotebookApp] Shutting down kernels
[I 14:40:24.303 NotebookApp] Kernel shutdown: 32db9c7c-1423-419b-9e98-3b7ec4a31f3a

@stevengj
Copy link
Member

The relevant error message is:

[W 14:40:10.315 NotebookApp] Timeout waiting for kernel_info reply from 32db9c7c-1423-419b-9e98-3b7ec4a31f3a
PROFILE = ["key"=>"44435b6b-0dd2-4169-9ae8-4cedfca69d09","transport"=>"tcp","signature_scheme"=>"hmac-sha256","ip"=>"127.0.0.1","hb_port"=>57743,"control_port"=>57742,"sh
ell_port"=>57739,"stdin_port"=>57741,"iopub_port"=>57740]

i.e. it is not responding for some reason. The long error message that follows is a crash that only occurs after IPython restarts the kernel.

If I were there, at this point I'd probably start inserting some println statements into IJulia (e.g. into the init function in IJulia.jl) to see what it is doing...

@cstook
Copy link

cstook commented Jul 30, 2015

I have a similar problem. I start jupiter from the julia repl.

using IJulia
notebook()

I then can choose to create either a new Juila 0.3.10 or Python 3 notebook. In either case, the kernel crashes and resets every few seconds.

If I start jupiter from the start menu (start -> Anaconda (64-bit) -> IPython (Py3.4) Notebook) I can create a new Python 3 notebook and everything is OK. creating a Julia 0.3.10 nothbook still causes a crash and reset every few seconds.

so far I have tried:

  • uninstalling and reinstalling Anaconda
  • updating Anaconda
conda update conda
conda update ipython ipython-notebook ipython-qtconsole
  • updating IJulia
Pkg.update()
Pkg.build("IJulia")

I still have the same problem.

Any suggestions?

@stevengj
Copy link
Member

@cstook, what operating system are you using? Can you try the "debugging IJulia" suggestions in the README?

@stevengj
Copy link
Member

Also, @cstook, what version of Julia are you running? (What is the output of versioninfo() in Julia?)

@cstook
Copy link

cstook commented Jul 30, 2015

here is the version info

Julia Version 0.3.10
Commit c8ceeef* (2015-06-24 13:54 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

@stevengj
Copy link
Member

@cstook, you're probably seeing a duplicate of #312. Can you try just running ipython notebook from the command line and then starting a Julia notebook?

I just tried this on a Windows 8 x64 machine with Anaconda, and it worked for me.

@cstook
Copy link

cstook commented Jul 30, 2015

from command line

ipython notebook

opened a new julia notebook
kernel keeps restarting

@stevengj
Copy link
Member

(The problem with these "kernel keeps restarting" issues is that they aren't much more informative than "IJulia isn't working for me". It could be any number of completely unrelated problems. Unless you can provide more technical debugging details, or we can reproduce a problem, it is hard to do much.)

@cstook
Copy link

cstook commented Jul 30, 2015

i have tried all the relevant suggestions in the "Troubleshooting:" section of the readme except for deleting and re adding all packages. I will try that next.

from the "Debugging IJulia problems" section I have turned on the more descriptive error messages. I don't know how to cut and paste out of the julia repl.

@cstook
Copy link

cstook commented Jul 30, 2015

Thanks for the super quick response! I'll try to collect more information and post it here.

@cstook
Copy link

cstook commented Jul 30, 2015

My problem is solved! Here is what I did.

deleted .julia directory

Pkg.status()
Pkg.add("IJulia")

this gave an error asking me to call WinRPM.update().

WinRPM.update()

then start IJulia with

using IJulia
notebook()

works great!
I will make sure I read the readme more carefully before posting an issue again.

@stevengj
Copy link
Member

@cstook, thanks!

You shouldn't have had to delete the .julia directory, though. I take it that it was not giving you the warning about WinRPM each time you tried Pkg.build("IJulia")?

@StefanKarpinski, @tkelman, it is disturbing to have a situation where an error message appears only once, and doesn't reappear unless the package is recreated from scratch. Can the WinRPM upgrade message be made more prominent, and repeated each time the user tries Pkg.update() or similar?

@cstook
Copy link

cstook commented Jul 31, 2015

I did not see the warning about WinRPM when I tried Pkg.build("IJulia").

@stevengj
Copy link
Member

@JonnyCBB, does import WinRPM; WinRPM.update() fix the problem for you, as for @cstook?

@tkelman
Copy link
Contributor

tkelman commented Jul 31, 2015

I'm not sure exactly what the issue is or why you'd ever need to call WinRPM.update() directly. It might not be doing a great job of updating stale old copies of packages, but I think you'd only notice that if you upgrade Julia itself between versions that are bundled with different libstdc++ ABI's. I would think Pkg.build("IJulia") should cause ZMQ to build which should cause WinRPM to build, but generally Pkg.build doesn't auto-trigger quite as often as it maybe should. We could reopen and revisit the proposal from JuliaLang/julia#11262 maybe, since Pkg is the one responsible for deciding when to call build.

@cstook
Copy link

cstook commented Jul 31, 2015

I updated to julia version 0.3.10. I don't remember what version I updated from. I think it was 0.3.3. It's been at least 6 months since I updated, probably longer. The problem with IJulia started the first time I used it after the update.

@tkelman
Copy link
Contributor

tkelman commented Jul 31, 2015

Aha, thank you, then that does make sense. You would need to either clear out Pkg.dir("WinRPM","deps","usr") after that, or force WinRPM to update installed copies of everything. I can't really think of any automated way of detecting whether old copies of packages are going to work, other than trying it and asking for help if it fails. Which I hope most people are doing, I know it's not a great first impression of the language and I do worry how many people just give up out of frustration before we get a chance to figure out and fix issues.

We're somewhat hamstrung here by the fact that WinRPM is pulling from an unstable development repository that can (and does) change at any time, rather than something stable and consistent that is known to work with one set of package versions like a Linux distro release. Ref JuliaPackaging/WinRPM.jl#36

Maybe to handle the "Upgraded Julia" case, we could add some state, a tagfile or something in WinRPM that saves the version of Julia it was last built with, and when the user runs with something newer it forces an update? Not sure if we could make that much more robust than what we have now.

@JonnyCBB
Copy link
Author

Sorry for late reply. I've been away.

I've tried WinRPM.update(), and then I deleted and re-added IJulia but it still doesn't work. I'll do what you suggested and put in some println statements. This is using Julia v0.3.11.

I recently downloaded Julia v0.4.0-dev as well and IJulia notebook works absolutely fine from there. I'm only having problems with v0.3.*

Anyway I'll see what I can find and get back to you.

@tkelman
Copy link
Contributor

tkelman commented Jul 31, 2015

One thing you could try is moving Pkg.dir("WinRPM","deps","usr") for your 0.3 copy out of the way and re-running Pkg.build("IJulia").

@JonnyCBB
Copy link
Author

@tkelman I must admit I was sceptical at first because of the amount I've tried but your suggestion worked! Thank you very much.

@stevengj
Copy link
Member

stevengj commented Aug 3, 2015

@tkelman, can you file a WinRPM.jl issue for automating this upgrade process? I would file one myself, but I don't really understand what the problem was here.

@tkelman
Copy link
Contributor

tkelman commented Aug 3, 2015

Okay, JuliaPackaging/WinRPM.jl#45. I do want to make sure other people understand what's going on here.

Opensuse upgrades their version of gcc cross-compilers occasionally, or modifies configure flags in ways that break ABI, for libstdc++ and sometimes libgfortran. That causes issues with packages that use C++ libraries from WinRPM. If Julia is built with a non-matching ABI, then dlopen of those libraries can fail giving confusing "provider packagemanager failed to satisfy dependency" errors. So we try to keep the latest released version of Julia using a matching ABI to what opensuse uses.

But WinRPM apparently doesn't always upgrade installed copies of packages when newer versions or available, at least not automatically. So people here were going from a working setup with an old version of Julia and old versions of WinRPM packages that were compatible, then tried to upgrade Julia and packages (or Julia itself) wouldn't work - dlopen failures or segfaults, etc. To get a newer version of Julia working, they had to force WinRPM to update everything, or download new copies from scratch.

I hope that makes sense.

@JonnyCBB
Copy link
Author

JonnyCBB commented Aug 4, 2015

Thanks @tkelman for elaborating on the problem. I would also like to thank everyone, especially @stevengj, for putting up with my questions and helping me with the problem. I don't often open issues because I'm usually worried that my problem is a stupid one that has an answer somewhere but yo didn't make me feel stupid for my ignorance. I really really appreciate it.

@stevengj
Copy link
Member

stevengj commented Aug 4, 2015

Glad we finally got it working.

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

6 participants