Repository navigation
Closed
Description
I just installed TensorFlow and to test the installation, I tried the following code and as soon as I initiate the TF Session, I am getting the Segmentation fault (core dumped) error.
bafhf@remote-server:~$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
/home/bafhf/anaconda3/envs/ismll/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
>>> tf.Session()
2018-05-15 12:04:15.461361: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1349] Found device 0 with properties:
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:04:00.0
totalMemory: 11.17GiB freeMemory: 11.10GiB
Segmentation fault (core dumped)
My nvidia-smi is:
Tue May 15 12:12:26 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.30 Driver Version: 390.30 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 On | 00000000:04:00.0 Off | 0 |
| N/A 38C P8 26W / 149W | 0MiB / 11441MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla K80 On | 00000000:05:00.0 Off | 2 |
| N/A 31C P8 29W / 149W | 0MiB / 11441MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
And nvcc --version is:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
Also gcc --version is:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Following is my PATH:
/home/bafhf/bin:/home/bafhf/.local/bin:/usr/local/cuda/bin:/usr/local/cuda/lib:/usr/local/cuda/extras/CUPTI/lib:/home/bafhf/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
and the LD_LIBRARY_PATH:
/usr/local/cuda/bin:/usr/local/cuda/lib:/usr/local/cuda/extras/CUPTI/lib
I am running this on a server and I don't have root privileges. Still I managed to install everything as per the instructions on the official website.
Seems like the GPU is allocating memory for the process for a second and then the core segmentation dumped error is thrown.
I downgraded my tensorflow version from v1.8 to v1.5. The issue still remains.
Is there any way address or debug this issue?
Reacted by David Cottrell, yzzzd, rhdong and Mazen Besher
Metadata
Metadata
Assignees
Labels
No labels

Activity
achalshah20 commentedon May 17, 2018
How did you install tensorflow? From sources, using bazel/cmake?
tensorflowbutler commentedon May 17, 2018
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
BenisonSam commentedon May 17, 2018
I first installed tensorflow in an anaconda env using conda. It gave me the Segmentation fault error. So dumped that conda env, created a new conda env and then used bazel to build and generate the the whl package to install it. It still gives me the same error. I followed the same process for version r1.5. Each time I tried something new, I removed the old conda env just to make sure I don't pick up anything residual from earlier process. And every time I am getting the same error.
BenisonSam commentedon May 17, 2018
Have I written custom code: N/A
OS Platform and Distribution: Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64)
TensorFlow installed from: Both using conda as well as bazel build whl package inside conda env
Bazel version: 0.12 and 0.11 in individual tries
CUDA/cuDNN version: CUDA 9.0 cuDNN 1.7
GPU model and memory: 2 Tesla K80's (see the nvidia-smi output shown in the question)
Exact command to reproduce:
tf.Session() causes the error
Hope this information is adequate.
achalshah20 commentedon May 17, 2018
I am confused. Are you using cuda 9 or 9.1? In the original post you posted LD_LIBRARY_PATH as
You can get a stacktrace by running your python file using gdb.
BenisonSam commentedon May 17, 2018
I am sorry for the mixup, I should have corrected that.
I tried first with CUDA 9.1, got the error. So switched to CUDA 9.0 to check whether that's the issue. But seems like error is still there with CUDA 9.0 also. So its at least not a CUDA problem. Right now I am sticking with CUDA 9.0.
I have corrected the original post now.
BenisonSam commentedon May 17, 2018
I have got the stacktrace.
achalshah20 commentedon May 17, 2018
Does it work outside conda enviornment?
sudo pip install tensorflow-gpu
python
import tensorflow as tf
tf.Session()
BenisonSam commentedon May 17, 2018
@achalshah20 No it doesn't work outside conda as well
viksit commentedon May 18, 2018
@BenisonSam
Look at your nvidia-smi output - the second GPU has an ECC code of 2. This error manifests itself irrespective of a CUDA version of TF version error, and usually as a segfault, and sometimes, with the
CUDA_ERROR_ECC_UNCORRECTABLEflag in the stack trace.Your best option is to change your GPU machine -- this points to a hardware level failure.
See https://stackoverflow.com/questions/11839555/cuda-uncorrectable-ecc-error-encountered
achalshah20 commentedon May 18, 2018
@BenisonSam Sometimes reboot just take away "Uncorrectable ECC error". If it doesn't go then it may be a hardware failure as @viksit suggested.
BenisonSam commentedon May 18, 2018
I agree with @achalshah20 because these GPUs are shared GPUs. I am student and this is a shared machine in our university. Other students whose accounts were created and configured by our former admin is up and working and they are still able to use the GPU.
I am configuring this new account of mine for a project and am facing this issue. My over all setup is same as theirs, but I don't know what I am doing differently which makes it not work for me.
Also since there are multiple K80 nodes, is there a need for OpenMPI/NCCL setup of any kind?
tensorflowbutler commentedon Jun 10, 2018
Nagging Assignee @poxvoculi: It has been 23 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.
sanfern commentedon Jun 16, 2018
I am also see similar issue on Tensorflow 1.8.0-gpu, any resolution for this issue.
BenisonSam commentedon Jun 22, 2018
After restarting the server as @achalshah20 mentioned, the ECC error was gone which @viksit pointed out. Then I was able to use both my K80 cards for my tensorflow implementations. Thanks for all your help!
bulutmf commentedon Oct 11, 2018
In case anyone still interested in, I happened to had the same issue, with "Volatile Uncorr. ECC" output. My problem was incompatible versions as shown below:
After I upgrade CuDNN library to 7.3.1 (which is greater than 7.2.1), segmentation fault error disappeared. To upgrade I did the following (as also documented in here).