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

Dead kernel #159

Closed
carloslesmes opened this issue Mar 19, 2014 · 22 comments
Closed

Dead kernel #159

carloslesmes opened this issue Mar 19, 2014 · 22 comments

Comments

@carloslesmes
Copy link

After a few days I opened a note and found this message:

Dead kernel
The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.
Kernel Restarting
The kernel appears to have died. It will restart automatically.

Alternating...

I can't find a way to restart the kernel, please help.

@Keno
Copy link
Member

Keno commented Mar 19, 2014

You can restart the kernel in the Kernel menu. As to why it failed, that's hard to say, there may be lots of reasons from bugs in Julia over bugs in IJulia to bugs in IPython.

@carloslesmes
Copy link
Author

I get the same messages repeatedly...

Any idea of what to do?

@stevengj
Copy link
Member

Did your Julia installation change? If you installed a new version of Julia (e.g. you changed the path to Julia), then you will need to quit IPython completely (stop the IPython server), rerun Pkg.build("IJulia") at the Julia command-line, then re-run ipython notebook --profile julia.

@QCaudron
Copy link

My kernels keep dying as well. I wasn't able to run anything at all, things just kept dying.

This was a brand new install of Julia and IJulia. Error messages are uninformative :

2014-03-24 10:25:17.484 [NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8998/
2014-03-24 10:25:17.484 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
2014-03-24 10:25:20.307 [NotebookApp] Connecting to: tcp://127.0.0.1:59844
2014-03-24 10:25:20.309 [NotebookApp] Kernel started: a414a11a-99aa-407a-9571-fa9f2b77e377
2014-03-24 10:25:20.520 [NotebookApp] Connecting to: tcp://127.0.0.1:59841
2014-03-24 10:25:20.576 [NotebookApp] Connecting to: tcp://127.0.0.1:59843
2014-03-24 10:25:20.584 [NotebookApp] Connecting to: tcp://127.0.0.1:59842
2014-03-24 10:25:23.308 [NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel a414a11a-99aa-407a-9571-fa9f2b77e377 restarted
2014-03-24 10:25:26.313 [NotebookApp] KernelRestarter: restarting kernel (2/5)
WARNING:root:kernel a414a11a-99aa-407a-9571-fa9f2b77e377 restarted
2014-03-24 10:25:29.317 [NotebookApp] KernelRestarter: restarting kernel (3/5)
WARNING:root:kernel a414a11a-99aa-407a-9571-fa9f2b77e377 restarted
2014-03-24 10:25:32.322 [NotebookApp] KernelRestarter: restarting kernel (4/5)
2014-03-24 10:25:35.334 [NotebookApp] WARNING | KernelRestarter: restart failed
2014-03-24 10:25:35.335 [NotebookApp] WARNING | Kernel a414a11a-99aa-407a-9571-fa9f2b77e377 died, removing from map.

Thanks for any help !

@stevengj
Copy link
Member

Does Pkg.build("IJulia") at the Julia command-line succeed?

@QCaudron
Copy link

Yes, the build was fine, no errors.
On 24 Mar 2014 11:32, "Steven G. Johnson" [email protected] wrote:

Does Pkg.build("IJulia") at the Julia command-line succeed?

Reply to this email directly or view it on GitHubhttps://github.com//issues/159#issuecomment-38458640
.

@stevengj
Copy link
Member

What is the output of versioninfo() in Julia?

@QCaudron
Copy link

julia> versioninfo()
Julia Version 0.3.0-prerelease+2154
Commit 96fb7e1* (2014-03-24 13:35 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.1.0)
  CPU: Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm

@carloslesmes
Copy link
Author

Why don't you stay in 0.2.0 for while?

@QCaudron
Copy link

Mostly because this is what built when I cloned the git repo and built from source two days ago ( commit code 96fb7e1 ). The binary didn't seem to work under Mavericks.

@TransGirlCodes
Copy link

I keep getting a restart message too. The python console log being:

ERROR: could not open file /Users/axolotlfan9250/.julia/v0.3/IJulia/src/kernel.jl
in include at ./boot.jl:245
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:285
in _start at ./client.jl:354

I did Pkg.build("IJulia") but it does not stop the message from coming up.

I'll do a reinstall and see if it works.

Ahah! It works!

@stonebig
Copy link
Contributor

I get the same issue currently. not sure what can be the root cause.
Trying to delete/re-install just Julia and .julia setting didn't work at first.

It seems I'm back in order, when I did

  • remove a julia_profile that was at C:\Users\my_windows_profile_.ipython

    (as I want it to use a more particular \settings.ipython)

  • then launch julia and redo

    • Pkg.rm("IJulia")
    • Pkg.add("IJulia")

@stevengj
Copy link
Member

Seems no longer applicable to the latest version.

@luisjavierhernandez
Copy link

I have been working with my instance of JuliaBox with the kernel Julia 0.4.1 without problems, but
some days ago, a new Kernel Julia 0.4.2 has been installed. My problem is that in my instance of
JuliaBox this Kernel Julia 0.4.2 has died and it is not possible for me to restart this kernel. Therefore I have returned to Kernel Julia 0.3 , but this a problem because I have to modify the code of many functions.

Any idea to solve my problem?

Thanks

Luis Javier Hernandez

@tanmaykm
Copy link
Member

@luisjavierhernandez this is most likely because of some conflicting locally installed/precompiled packages. Clearing them from ~/.julia should resolve the issue, e.g.:
mv ~/.julia ~/oldpkgs

There's a button on the JuliaBox settings tab to do it as well.

@luisjavierhernandez
Copy link

Thanks Tanmay,

Your instruction is correct.
When I remove the packages the Kernel of Julia 0.4.2 works
properly.

However, my program uses PyPlot and this package
needs PyCall. The problem appears again when I try
to install the package PyCall.

If I work with the Kernel Julia 0.3
I do not have any problems with the installation of PyPlot and PyCall.

Is it possible to install PyCall without having
conflicts with the Kernel of Julia 0.4.2?

With my best wishes

@stevengj
Copy link
Member

I think this is related to JuliaPy/PyPlot.jl#185, which in turn seems like some underlying problem with Julia's caching mechanism on JuliaBox, nothing specific to IJulia or PyPlot per se.

@stevengj
Copy link
Member

In particular, I see a clearer error message in the JuliaBox console:

juser@juliabox:~$ /opt/julia-0.4.2/bin/julia                                                                                                                       
INFO: Recompiling stale cache file /opt/julia_packages/.julia/lib/v0.4/Compat.ji for module Compat.                                                                
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.2 (2015-12-06 21:47 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-unknown-linux-gnu

julia> using IJulia                                                                                                                                                
INFO: Precompiling module IJulia...                                                                                                                                
INFO: Recompiling stale cache file /opt/julia_packages/.julia/lib/v0.4/Compat.ji for module Compat.                                                                
ERROR: LoadError: unlink: read-only file system (EROFS)                                                                                                            
 in unlink at fs.jl:102                                                                                                                                            
 in rm at file.jl:59                                                                                                                                               
 in create_expr_cache at loading.jl:330                                                                                                                            
 in recompile_stale at loading.jl:461                                                                                                                              
 in _require_from_serialized at loading.jl:83                                                                                                                      
 in _require_from_serialized at ./loading.jl:109                                                                                                                   
 in require at ./loading.jl:219                                                                                                                                    
 in include at ./boot.jl:261                                                                                                                                       
 in include_from_node1 at ./loading.jl:304                                                                                                                         
 [inlined code] from none:2                                                                                                                                        
 in anonymous at no file:0                                                                                                                                         
 in process_options at ./client.jl:257                                                                                                                             
 in _start at ./client.jl:378                                                                                                                                      
while loading /opt/julia_packages/.julia/v0.4/IJulia/src/IJulia.jl, in expression starting on line 4                                                               
ERROR: Failed to precompile IJulia to /home/juser/.julia/lib/v0.4/IJulia.ji                                                                                        
 in error at ./error.jl:21                                                                                                                                         
 in compilecache at loading.jl:384                                                                                                                                 
 in require at ./loading.jl:250                                                                                                                                    

@stevengj
Copy link
Member

See the abovementioned Julia issue.

@stevengj
Copy link
Member

In general, continuing to comment on this issue is not fruitful. Not all causes of "dead kernel" messages are created equal — each issue should be tied to a specific problem in IJulia (or, in this case, in Julia and JuliaBox).

So, in the future, if you see a "dead kernel" message, please file a new issue (and try first to diagnose the source of the launch failure by following the "debugging IJulia" instructions in the README).

@samirOs
Copy link

samirOs commented Jun 12, 2017

I had a similar issue on centos, however, the issue was coming from a bad packaging of IJulia, as i didn't have cmake so i saw the error during the Pkg.add("IJulia").
the solution was to make sure to yum install cmake
then
do Pkg.build("IJulia")
this will build IJulia, make sure there are no errors.
Once this is ok, try launching your notebook and check

@saurabh2804
Copy link

I had the same issue on Manjaro linux recently. I was using the version available in the Manajaro repository (1.01). I simply uninstalled it and downloaded Julia from the Julia website, extracted it and added it to my path. It is working without any problem. Installed IJulia and using it with Jupyter notebook.

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

10 participants