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
core dump when import tensorflow #2129
Comments
Your stack trace shows a failure in numpy, yet it sounds like your source program is just the one line. What if you import numpy first, ie. place |
possibly related: #2034 |
I seem to be having this problem too, or maybe the one in #2034. Tensorflow runs just fine, as long as numpy has already been imported. I'm using cuda 7.5, cudnn 5.0, numpy 1.11.0, python 2.7.11, and tensorflow HEAD (c38157c). Everything was compiled by me. Test case
But it doesn't crash as long as numpy is imported first:
GDB stacktrace of the segfault.
Edit: I tried following the advice of #1373 and reinstalling everything, but it didn't help. |
@poxvoculi , the program has only one line "import tensorflow" |
@stephenroller , mine is different, I got a core dump even import tensorflow, have you solved this issue? |
it seems work now if I "import numpy" before "import tensorflow". |
Yes! Incredibly import numpy before tensorflow fixes this issue. What's weird is this issue started happening today, and I've run this same code 50+ times before this started happening. |
I had the same segfault and even I tried import numpy before import tensorflow, it did not work. My environment is ubuntu 16.04, python 3.5, and TF 0.9 in a docker container. Anyone knows? |
Same issue, even I import numpy before tensorflow. I suspect this related to the source compiled version on machine 1 (some Intel CPU). |
Hmm... another interesting thing I met is that I need to import numpy before tensorflow and tensorflow before pytorch If not, I got |
tensorflow 1.6
|
…flow#2129) * [ROCM] Adjust run_cpu.sh to match pycpp config in cpu.bazelrc * remove no_rocm from cpu tests; adjust pycpp in cpu.bazelrc * Use no_rocm for cpu test configs
GitHub issues are for bugs / installation problems / feature requests.
For general support from the community, see StackOverflow.
To make bugs and feature requests more easy to find and organize, we close issues that are deemed
out of scope for GitHub Issues and point people to StackOverflow.
For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.
Environment info
Operating System: Centos 7
Installed version of CUDA and cuDNN: cuda 7.5 cuDNNv4
(please attach the output of
ls -l /path/to/cuda/lib/libcud*
):total 987720
-rw-r--r--. 1 root root 28585480 Aug 16 2015 libcublas_device.a
lrwxrwxrwx. 1 root root 16 Sep 9 2015 libcublas.so -> libcublas.so.7.5
lrwxrwxrwx. 1 root root 19 Sep 9 2015 libcublas.so.7.5 -> libcublas.so.7.5.18
-rwxr-xr-x. 1 root root 23938736 Aug 16 2015 libcublas.so.7.5.18
-rw-r--r--. 1 root root 28220076 Aug 16 2015 libcublas_static.a
-rw-r--r--. 1 root root 322936 Aug 16 2015 libcudadevrt.a
lrwxrwxrwx. 1 root root 16 Sep 9 2015 libcudart.so -> libcudart.so.7.5
lrwxrwxrwx. 1 root root 19 Sep 9 2015 libcudart.so.7.5 -> libcudart.so.7.5.18
-rwxr-xr-x. 1 root root 383336 Aug 16 2015 libcudart.so.7.5.18
-rw-r--r--. 1 root root 720192 Aug 16 2015 libcudart_static.a
-rwxr-xr-x. 1 root root 61453024 Apr 27 15:55 libcudnn.so
-rwxr-xr-x. 1 root root 61453024 Apr 27 15:55 libcudnn.so.4
-rwxr-xr-x. 1 root root 61453024 Apr 27 15:55 libcudnn.so.4.0.7
-rw-r--r--. 1 root root 62025862 Apr 27 15:55 libcudnn_static.a
lrwxrwxrwx. 1 root root 15 Sep 9 2015 libcufft.so -> libcufft.so.7.5
lrwxrwxrwx. 1 root root 18 Sep 9 2015 libcufft.so.7.5 -> libcufft.so.7.5.18
-rwxr-xr-x. 1 root root 111231960 Aug 16 2015 libcufft.so.7.5.18
-rw-r--r--. 1 root root 115104400 Aug 16 2015 libcufft_static.a
lrwxrwxrwx. 1 root root 16 Sep 9 2015 libcufftw.so -> libcufftw.so.7.5
lrwxrwxrwx. 1 root root 19 Sep 9 2015 libcufftw.so.7.5 -> libcufftw.so.7.5.18
-rwxr-xr-x. 1 root root 447664 Aug 16 2015 libcufftw.so.7.5.18
-rw-r--r--. 1 root root 42206 Aug 16 2015 libcufftw_static.a
lrwxrwxrwx. 1 root root 17 Sep 9 2015 libcuinj64.so -> libcuinj64.so.7.5
lrwxrwxrwx. 1 root root 20 Sep 9 2015 libcuinj64.so.7.5 -> libcuinj64.so.7.5.18
-rwxr-xr-x. 1 root root 5751400 Aug 16 2015 libcuinj64.so.7.5.18
-rw-r--r--. 1 root root 1649726 Aug 16 2015 libculibos.a
lrwxrwxrwx. 1 root root 16 Sep 9 2015 libcurand.so -> libcurand.so.7.5
lrwxrwxrwx. 1 root root 19 Sep 9 2015 libcurand.so.7.5 -> libcurand.so.7.5.18
-rwxr-xr-x. 1 root root 51765952 Aug 16 2015 libcurand.so.7.5.18
-rw-r--r--. 1 root root 51992564 Aug 16 2015 libcurand_static.a
lrwxrwxrwx. 1 root root 18 Sep 9 2015 libcusolver.so -> libcusolver.so.7.5
lrwxrwxrwx. 1 root root 21 Sep 9 2015 libcusolver.so.7.5 -> libcusolver.so.7.5.18
-rwxr-xr-x. 1 root root 37034328 Aug 16 2015 libcusolver.so.7.5.18
-rw-r--r--. 1 root root 16613348 Aug 16 2015 libcusolver_static.a
lrwxrwxrwx. 1 root root 18 Sep 9 2015 libcusparse.so -> libcusparse.so.7.5
lrwxrwxrwx. 1 root root 21 Sep 9 2015 libcusparse.so.7.5 -> libcusparse.so.7.5.18
-rwxr-xr-x. 1 root root 36816424 Aug 16 2015 libcusparse.so.7.5.18
-rw-r--r--. 1 root root 44445334 Aug 16 2015 libcusparse_static.a
lrwxrwxrwx. 1 root root 14 Sep 9 2015 libnppc.so -> libnppc.so.7.5
lrwxrwxrwx. 1 root root 17 Sep 9 2015 libnppc.so.7.5 -> libnppc.so.7.5.18
-rwxr-xr-x. 1 root root 427168 Aug 16 2015 libnppc.so.7.5.18
-rw-r--r--. 1 root root 20664 Aug 16 2015 libnppc_static.a
lrwxrwxrwx. 1 root root 14 Sep 9 2015 libnppi.so -> libnppi.so.7.5
lrwxrwxrwx. 1 root root 17 Sep 9 2015 libnppi.so.7.5 -> libnppi.so.7.5.18
-rwxr-xr-x. 1 root root 63516808 Aug 16 2015 libnppi.so.7.5.18
-rw-r--r--. 1 root root 90106200 Aug 16 2015 libnppi_static.a
lrwxrwxrwx. 1 root root 14 Sep 9 2015 libnpps.so -> libnpps.so.7.5
lrwxrwxrwx. 1 root root 17 Sep 9 2015 libnpps.so.7.5 -> libnpps.so.7.5.18
-rwxr-xr-x. 1 root root 6047400 Aug 16 2015 libnpps.so.7.5.18
-rw-r--r--. 1 root root 8647292 Aug 16 2015 libnpps_static.a
lrwxrwxrwx. 1 root root 16 Sep 9 2015 libnvblas.so -> libnvblas.so.7.5
lrwxrwxrwx. 1 root root 19 Sep 9 2015 libnvblas.so.7.5 -> libnvblas.so.7.5.18
-rwxr-xr-x. 1 root root 456112 Aug 16 2015 libnvblas.so.7.5.18
lrwxrwxrwx. 1 root root 24 Sep 9 2015 libnvrtc-builtins.so -> libnvrtc-builtins.so.7.5
lrwxrwxrwx. 1 root root 27 Sep 9 2015 libnvrtc-builtins.so.7.5 -> libnvrtc-builtins.so.7.5.18
-rwxr-xr-x. 1 root root 22408512 Aug 16 2015 libnvrtc-builtins.so.7.5.18
lrwxrwxrwx. 1 root root 15 Sep 9 2015 libnvrtc.so -> libnvrtc.so.7.5
lrwxrwxrwx. 1 root root 18 Sep 9 2015 libnvrtc.so.7.5 -> libnvrtc.so.7.5.17
-rwxr-xr-x. 1 root root 18199288 Aug 16 2015 libnvrtc.so.7.5.17
lrwxrwxrwx. 1 root root 18 Sep 9 2015 libnvToolsExt.so -> libnvToolsExt.so.1
lrwxrwxrwx. 1 root root 22 Sep 9 2015 libnvToolsExt.so.1 -> libnvToolsExt.so.1.0.0
-rwxr-xr-x. 1 root root 37936 Aug 16 2015 libnvToolsExt.so.1.0.0
-rw-r--r--. 1 root root 25840 Aug 16 2015 libOpenCL.so
lrwxrwxrwx. 1 root root 12 Sep 9 2015 libOpenCL.so.1 -> libOpenCL.so
drwxr-xr-x. 2 root root 4096 Sep 9 2015 stubs
If installed from binary pip package, provide:
If installed from sources, provide the commit hash:
Steps to reproduce
2, gdb python
3, run test.py
4, core dumped, use bt to get stacktrace
What have you tried?
2, install form source
3, try cudnn V4, V5
Logs or other output that would be helpful
stacktrace from gdb
rogram received signal SIGSEGV, Segmentation fault.
0x00007fffd50e0220 in PyArray_API () from /usr/lib64/python2.7/site-packages/numpy/core/multiarray.so
(gdb) bt
#0 0x00007fffd50e0220 in PyArray_API () from /usr/lib64/python2.7/site-packages/numpy/core/multiarray.so
#1 0x00007fffc513f3c4 in initspecfun () from /usr/lib64/python2.7/site-packages/scipy/special/specfun.so
#2 0x00007ffff7b09eb9 in PyImport_LoadDynamicModule () from /lib64/libpython2.7.so.1.0
#3 0x00007ffff7b07f91 in import_submodule () from /lib64/libpython2.7.so.1.0
#4 0x00007ffff7b0848f in ensure_fromlist () from /lib64/libpython2.7.so.1.0
#5 0x00007ffff7b08cca in PyImport_ImportModuleLevel () from /lib64/libpython2.7.so.1.0
#6 0x00007ffff7aef3bf in builtin___import_ () from /lib64/libpython2.7.so.1.0
#7 0x00007ffff7a5f073 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#8 0x00007ffff7af0fd7 in PyEval_CallObjectWithKeywords () from /lib64/libpython2.7.so.1.0
#9 0x00007ffff7af2aa3 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#10 0x00007ffff7af718d in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#11 0x00007ffff7af7292 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
#12 0x00007ffff7b0707c in PyImport_ExecCodeModuleEx () from /lib64/libpython2.7.so.1.0
#13 0x00007ffff7b072f8 in load_source_module () from /lib64/libpython2.7.so.1.0
#14 0x00007ffff7b07f91 in import_submodule () from /lib64/libpython2.7.so.1.0
#15 0x00007ffff7b081dd in load_next () from /lib64/libpython2.7.so.1.0
#16 0x00007ffff7b08bbe in PyImport_ImportModuleLevel () from /lib64/libpython2.7.so.1.0
#17 0x00007ffff7aef3bf in builtin___import__ () from /lib64/libpython2.7.so.1.0
#18 0x00007ffff7a5f073 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#19 0x00007ffff7af0fd7 in PyEval_CallObjectWithKeywords () from /lib64/libpython2.7.so.1.0
#20 0x00007ffff7af2aa3 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#21 0x00007ffff7af718d in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#22 0x00007ffff7af7292 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
#23 0x00007ffff7b0707c in PyImport_ExecCodeModuleEx () from /lib64/libpython2.7.so.1.0
#24 0x00007ffff7b072f8 in load_source_module () from /lib64/libpython2.7.so.1.0
#25 0x00007ffff7b0878a in load_package () from /lib64/libpython2.7.so.1.0
#26 0x00007ffff7b07f91 in import_submodule () from /lib64/libpython2.7.so.1.0
#27 0x00007ffff7b081dd in load_next () from /lib64/libpython2.7.so.1.0
#28 0x00007ffff7b08bf8 in PyImport_ImportModuleLevel () from /lib64/libpython2.7.so.1.0
#29 0x00007ffff7aef3bf in builtin___import__ () from /lib64/libpython2.7.so.1.0
#30 0x00007ffff7a5f073 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#31 0x00007ffff7af0fd7 in PyEval_CallObjectWithKeywords () from /lib64/libpython2.7.so.1.0
#32 0x00007ffff7af2aa3 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#33 0x00007ffff7af718d in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#34 0x00007ffff7af7292 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
#35 0x00007ffff7b0707c in PyImport_ExecCodeModuleEx () from /lib64/libpython2.7.so.1.0
#36 0x00007ffff7b072f8 in load_source_module () from /lib64/libpython2.7.so.1.0
#37 0x00007ffff7b07f91 in import_submodule () from /lib64/libpython2.7.so.1.0
#38 0x00007ffff7b081dd in load_next () from /lib64/libpython2.7.so.1.0
#39 0x00007ffff7b08bf8 in PyImport_ImportModuleLevel () from /lib64/libpython2.7.so.1.0
The text was updated successfully, but these errors were encountered: