-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Plotting results in Illegal instruction (core dumped)
- how to continue?
#13458
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
Comments
I added some logging according to https://matplotlib.org/faq/troubleshooting_faq.html That resulted in this:
|
When I do the same in the jupyter notebook:
|
Does import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0.0, 2.0, 0.01)
s = 1 + np.sin(2*np.pi*t)
plt.plot(t, s) work? If so, then your backend libraries are maybe not installed properly. |
Sadly no.
In the end I want it to work in a Jupyter Notebook. But as the error message is hard to intercept I changed to |
I see that this is a conda installation--seemingly a broken one. Googling "Illegal instruction (core dumped)" produces lots of hits like tensorflow/tensorflow#17411. The upshot seems to be that some packages are compiled in such a way that they require instructions that not all processors support. What is your output from "conda list"? Classic ways to foul up a conda installation are to mix Anaconda with conda-forge, and to mix conda packages with pip-installed packages. Either can work, but sometimes cause hard-to-debug failures. The former is simply not recommended until compatibility issues are sorted out; the latter can be used with caution when a pip-installable package is not available via conda. |
The dockerfile roughly looks like this (plus some copying but no other installation process):
The Installing jupyterhub in a specific version by using pip is by the way the way it is suggested, see https://jupyter-docker-stacks.readthedocs.io/en/latest/using/recipes.html#containers-with-a-specific-version-of-jupyterhub So on the first glance I am not sure whether @efiring 's suggestions apply here. |
This really seems like something you need to take up w/ whoever made the docker file. Hard to see how it is a matplotlib bug. |
Agreed, this is definitely not a matplotlib bug. Closing. |
Well, invoking |
@efiring How can I continue from here? Where could be the matplotlib logs which show what was happening? |
fwiw I cannot repro the crash:
|
@1kastner this is not something that will show up in matplotlib log output because it is not a bug in matplotlib code. The problem appears to be that some library on your system was compiled in a way that is incompatible with the CPU you are running. Alternatively, I suppose a binary file could be corrupted. In any case, this is likely to be a hard problem to track down. Have you tried using a different machine? |
The same image works on my local machine, so quite hard to reproduce. |
Yes, but maybe also whether in comparing the two machines, is there a difference in libraries installed outside of conda? On the machine with the failure, is there anything installed in a non-standard way, i.e., not from ubuntu or conda? |
The nesting on the problematic machine is: Elsewhere it is: But everywhere the docker image is freshly build from a Dockerfile. Thank you very much for your input! |
🐑 sorry, read the problematic vs working issue inverted, @efiring has it right in the next comment. |
My guess is that the virtual machine on the cluster is configured to emulate a minimal CPU, not a typical modern one. |
I could temporarily solve the issue by noting: |
We believe they are largely compatible now since |
I just stepped through with pdb and found the line where things broke:
So most likely it is related to numpy. |
It's solved, see jupyter/docker-stacks#811 for more information. |
Bug report
Bug summary
The plotting of any kind of simple graphic results in the error message
Illegal instruction (core dumped)
which leads to an immediate crash of the python interpreter.Code for reproduction
Actual outcome
On the following line the message
Illegal instruction (core dumped)
is logged and the pyhton shell is closed.Expected outcome
Some plot or at least no chrash of the python interpreter.
Matplotlib version
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inlineThis is part of a jupyterhub, even though there seems to be no connection. In case see my other tickets:
Illegal instruction (core dumped)
jupyter/docker-stacks#811Thank you very much in advance!
The text was updated successfully, but these errors were encountered: