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
tensorflow-1.2.0 import tensorflow Segmentation fault #10870
Comments
Could you try |
below is my gdb backtrace ouput: (gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/zhangdingfei/tools/Python-2.7.13/bin/bin/python
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Python 2.7.13 (default, Jun 20 2017, 20:03:45)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
[New Thread 0x7ffff375a700 (LWP 33742)]
[New Thread 0x7ffff2f59700 (LWP 33743)]
[New Thread 0x7ffff0758700 (LWP 33744)]
...
[New Thread 0x7fff5cf1d700 (LWP 33803)]
[New Thread 0x7fff5a71c700 (LWP 33804)]
warning: File "/home/zhangdingfei/tools/gcc-4.9.2/bin/lib64/libstdc++.so.6.0.20-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
Program received signal SIGSEGV, Segmentation fault.
0x00007fff4a6c71c4 in void std::call_once<void (&)()>(std::once_flag&, void (&)()) ()
from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
(gdb) bt
#0 0x00007fff4a6c71c4 in void std::call_once<void (&)()>(std::once_flag&, void (&)()) ()
from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#1 0x00007fff4a81a3de in tensorflow::port::TestCPUFeature(tensorflow::port::CPUFeature) ()
from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#2 0x00007fff46cf2701 in tensorflow::port::(anonymous namespace)::CheckFeatureOrDie(tensorflow::port::CPUFeature, std::string const&) () from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#3 0x00007fff46cf2754 in _GLOBAL__sub_I_cpu_feature_guard.cc ()
from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#4 0x00007fff4aa91086 in __do_global_ctors_aux ()
from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#5 0x00007fff46b3e363 in _init ()
from /home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#6 0x00007ffff71d28a8 in ?? () from /lib64/libc.so.6
#7 0x00007ffff7dec1b8 in call_init () from /lib64/ld-linux-x86-64.so.2
#8 0x00007ffff7dec2e7 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#9 0x00007ffff7df0606 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#10 0x00007ffff7debe46 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#11 0x00007ffff7defdfb in _dl_open () from /lib64/ld-linux-x86-64.so.2
#12 0x00007ffff79bdf9b in dlopen_doit () from /lib64/libdl.so.2
#13 0x00007ffff7debe46 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#14 0x00007ffff79be33c in _dlerror_run () from /lib64/libdl.so.2
#15 0x00007ffff79bdf01 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
#16 0x000000000053561b in _PyImport_GetDynLoadFunc (fqname=fqname@entry=0x7fff525d5e54 "_pywrap_tensorflow_internal",
shortname=shortname@entry=0x7fff525d5e54 "_pywrap_tensorflow_internal",
pathname=pathname@entry=0x7fff525fbc34 "/home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so", fp=fp@entry=0xb6fa30) at Python/dynload_shlib.c:130
#17 0x000000000051211e in _PyImport_LoadDynamicModule (name=name@entry=0x7fff525d5e54 "_pywrap_tensorflow_internal",
pathname=0x7fff525fbc34 "/home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so", fp=0xb6fa30) at ./Python/importdl.c:42
#18 0x00000000005103ab in load_module (loader=0x0, type=3, pathname=<optimized out>, fp=<optimized out>,
name=0x7fff525d5e54 "_pywrap_tensorflow_internal") at Python/import.c:1937
#19 imp_load_module (self=<optimized out>, args=<optimized out>) at Python/import.c:3207
#20 0x00000000004f6c4a in call_function (oparg=<optimized out>, pp_stack=<optimized out>) at Python/ceval.c:4352
#21 PyEval_EvalFrameEx (f=0x7ffff7fc1010, throwflag=0) at Python/ceval.c:2989
#22 0x00000000004f88b6 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=<optimized out>,
func=<optimized out>) at Python/ceval.c:4437
#23 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at Python/ceval.c:4372
#24 PyEval_EvalFrameEx (f=0x7ffff7fc1010, throwflag=0) at Python/ceval.c:2989
#25 0x00000000004f915b in PyEval_EvalCodeEx (co=0x7fff52539630, globals=0x0, globals@entry=0x7fff5258a398, locals=0x7fffffffb4e0,
locals@entry=0x7fff5258a398, args=0x0, argcount=1261680879, argcount@entry=0, kws=0x10de358, kws@entry=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
#26 0x00000000004f9269 in PyEval_EvalCode (co=co@entry=0x7fff52539630, globals=globals@entry=0x7fff5258a398,
locals=locals@entry=0x7fff5258a398) at Python/ceval.c:669
#27 0x000000000050e668 in PyImport_ExecCodeModuleEx (name=0xb94aa0 "tensorflow.python.pywrap_tensorflow_internal",
co=0x7fff52539630, pathname=<optimized out>) at Python/import.c:731
#28 0x000000000050e9be in load_source_module (name=0xb94aa0 "tensorflow.python.pywrap_tensorflow_internal",
pathname=0xb6ea20 "/home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.pyc", fp=0x7fff52539630) at Python/import.c:1121
---Type <return> to continue, or q <return> to quit---
#29 0x000000000050f759 in import_submodule (mod=0x7ffff7e8b248, subname=0xb94ab2 "pywrap_tensorflow_internal",
fullname=0xb94aa0 "tensorflow.python.pywrap_tensorflow_internal") at Python/import.c:2725
#30 0x000000000051089b in load_next (p_buflen=<synthetic pointer>, buf=0xb94aa0 "tensorflow.python.pywrap_tensorflow_internal",
p_name=<synthetic pointer>, altmod=0x7ffff7e8b248, mod=0x7ffff7e8b248) at Python/import.c:2539
#31 import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=0x7ffff7e8aa10, globals=<optimized out>,
name=<optimized out>) at Python/import.c:2256
#32 PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=0x7ffff7e8aa10,
level=<optimized out>) at Python/import.c:2312
#33 0x00000000004edaf4 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Python/bltinmodule.c:49
#34 0x00000000004616aa in PyObject_Call (func=0x7ffff7fb4fc8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2547
#35 0x00000000004f248b in PyEval_CallObjectWithKeywords (kw=<optimized out>, arg=<optimized out>, func=<optimized out>)
at Python/ceval.c:4221
#36 PyEval_EvalFrameEx (f=0x7ffff7fc1010, throwflag=0) at Python/ceval.c:2624
#37 0x00000000004f915b in PyEval_EvalCodeEx (co=0x7ffff7e8e530, globals=0x0, globals@entry=0x7fff5258a6e0, locals=0x7fffffffb4e0,
locals@entry=0x7fff5258a6e0, args=0x0, argcount=1261680879, argcount@entry=0, kws=0x10de358, kws@entry=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
#38 0x00000000004f9269 in PyEval_EvalCode (co=co@entry=0x7ffff7e8e530, globals=globals@entry=0x7fff5258a6e0,
locals=locals@entry=0x7fff5258a6e0) at Python/ceval.c:669
#39 0x000000000050e668 in PyImport_ExecCodeModuleEx (name=0xe982b0 "tensorflow.python.pywrap_tensorflow", co=0x7ffff7e8e530,
pathname=<optimized out>) at Python/import.c:731
#40 0x000000000050e9be in load_source_module (name=0xe982b0 "tensorflow.python.pywrap_tensorflow",
pathname=0xe2f0b0 "/home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.pyc", fp=0x7ffff7e8e530) at Python/import.c:1121
#41 0x000000000050f759 in import_submodule (mod=0x7ffff7e8b248, subname=0x7ffff7e8b2bc "pywrap_tensorflow",
fullname=0xe982b0 "tensorflow.python.pywrap_tensorflow") at Python/import.c:2725
#42 0x000000000050fa25 in ensure_fromlist (mod=mod@entry=0x7ffff7e8b248, fromlist=fromlist@entry=0x7ffff7e7d990,
buf=buf@entry=0xe982b0 "tensorflow.python.pywrap_tensorflow", buflen=buflen@entry=17, recursive=recursive@entry=0)
at Python/import.c:2631
#43 0x0000000000510973 in import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=0x7ffff7e7d990,
globals=<optimized out>, name=<optimized out>) at Python/import.c:2293
#44 PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=0x7ffff7e7d990,
level=<optimized out>) at Python/import.c:2312
#45 0x00000000004edaf4 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Python/bltinmodule.c:49
#46 0x00000000004616aa in PyObject_Call (func=0x7ffff7fb4fc8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2547
#47 0x00000000004f248b in PyEval_CallObjectWithKeywords (kw=<optimized out>, arg=<optimized out>, func=<optimized out>)
at Python/ceval.c:4221
#48 PyEval_EvalFrameEx (f=0x7ffff7fc1010, throwflag=0) at Python/ceval.c:2624
#49 0x00000000004f915b in PyEval_EvalCodeEx (co=0x7ffff7e71eb0, globals=0x0, globals@entry=0x7ffff7e84d70, locals=0x7fffffffb4e0,
locals@entry=0x7ffff7e84d70, args=0x0, argcount=1261680879, argcount@entry=0, kws=0x10de358, kws@entry=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
#50 0x00000000004f9269 in PyEval_EvalCode (co=co@entry=0x7ffff7e71eb0, globals=globals@entry=0x7ffff7e84d70,
locals=locals@entry=0x7ffff7e84d70) at Python/ceval.c:669
#51 0x000000000050e668 in PyImport_ExecCodeModuleEx (name=0xb68f50 "tensorflow.python", co=0x7ffff7e71eb0,
pathname=<optimized out>) at Python/import.c:731
#52 0x000000000050e9be in load_source_module (name=0xb68f50 "tensorflow.python",
pathname=0xb6d780 "/home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/python/__init__.pyc",
---Type <return> to continue, or q <return> to quit---
fp=0x7ffff7e71eb0) at Python/import.c:1121
#53 0x000000000050fcdc in load_package (name=0xb68f50 "tensorflow.python", pathname=<optimized out>) at Python/import.c:1188
#54 0x000000000050f759 in import_submodule (mod=0x7ffff7e80bb0, subname=0xb68f5b "python", fullname=0xb68f50 "tensorflow.python")
at Python/import.c:2725
#55 0x000000000051089b in load_next (p_buflen=<synthetic pointer>, buf=0xb68f50 "tensorflow.python", p_name=<synthetic pointer>,
altmod=0x7ffff7e80bb0, mod=0x7ffff7e80bb0) at Python/import.c:2539
#56 import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=0x7ffff7e7d590, globals=<optimized out>,
name=<optimized out>) at Python/import.c:2256
#57 PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=0x7ffff7e7d590,
level=<optimized out>) at Python/import.c:2312
#58 0x00000000004edaf4 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Python/bltinmodule.c:49
#59 0x00000000004616aa in PyObject_Call (func=0x7ffff7fb4fc8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2547
#60 0x00000000004f248b in PyEval_CallObjectWithKeywords (kw=<optimized out>, arg=<optimized out>, func=<optimized out>)
at Python/ceval.c:4221
#61 PyEval_EvalFrameEx (f=0x7ffff7fc1010, throwflag=0) at Python/ceval.c:2624
#62 0x00000000004f915b in PyEval_EvalCodeEx (co=0x7ffff7e71cb0, globals=0x0, globals@entry=0x7ffff7e82d70, locals=0x7fffffffb4e0,
locals@entry=0x7ffff7e82d70, args=0x0, argcount=1261680879, argcount@entry=0, kws=0x10de358, kws@entry=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
#63 0x00000000004f9269 in PyEval_EvalCode (co=co@entry=0x7ffff7e71cb0, globals=globals@entry=0x7ffff7e82d70,
locals=locals@entry=0x7ffff7e82d70) at Python/ceval.c:669
#64 0x000000000050e668 in PyImport_ExecCodeModuleEx (name=0xb645e0 "tensorflow", co=0x7ffff7e71cb0, pathname=<optimized out>)
at Python/import.c:731
#65 0x000000000050e9be in load_source_module (name=0xb645e0 "tensorflow",
pathname=0xb67f40 "/home/zhangdingfei/tools/Python-2.7.13/bin/lib/python2.7/site-packages/tensorflow/__init__.pyc",
fp=0x7ffff7e71cb0) at Python/import.c:1121
#66 0x000000000050fcdc in load_package (name=0xb645e0 "tensorflow", pathname=<optimized out>) at Python/import.c:1188
#67 0x000000000050f759 in import_submodule (mod=0xa14fd0 <_Py_NoneStruct>, subname=0xb645e0 "tensorflow",
fullname=0xb645e0 "tensorflow") at Python/import.c:2725
#68 0x00000000005107e6 in load_next (p_buflen=<synthetic pointer>, buf=0xb645e0 "tensorflow", p_name=<synthetic pointer>,
altmod=0xa14fd0 <_Py_NoneStruct>, mod=0xa14fd0 <_Py_NoneStruct>) at Python/import.c:2539
#69 import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=0xa14fd0 <_Py_NoneStruct>,
globals=<optimized out>, name=<optimized out>) at Python/import.c:2247
#70 PyImport_ImportModuleLevel (name=0x7ffff7e88174 "tensorflow", globals=<optimized out>, locals=<optimized out>,
fromlist=0xa14fd0 <_Py_NoneStruct>, level=<optimized out>) at Python/import.c:2312
#71 0x00000000004edaf4 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Python/bltinmodule.c:49
#72 0x00000000004616aa in PyObject_Call (func=0x7ffff7fb4fc8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2547
#73 0x00000000004f248b in PyEval_CallObjectWithKeywords (kw=<optimized out>, arg=<optimized out>, func=<optimized out>)
at Python/ceval.c:4221
#74 PyEval_EvalFrameEx (f=0x7ffff7fc1010, throwflag=0) at Python/ceval.c:2624
#75 0x00000000004f915b in PyEval_EvalCodeEx (co=0x7ffff7ec11b0, globals=0x0, locals=0x7fffffffb4e0, args=0x0, argcount=1261680879,
argcount@entry=0, kws=0x10de358, kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584
#76 0x00000000004f9269 in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>)
at Python/ceval.c:669
#77 0x000000000052266c in run_mod (arena=<optimized out>, flags=<optimized out>, locals=<optimized out>, globals=<optimized out>,
filename=<optimized out>, mod=<optimized out>) at Python/pythonrun.c:1376
#78 PyRun_InteractiveOneFlags (fp=0x7ffff7fc1010, filename=0x0, flags=0x7ffff7ec11b0) at Python/pythonrun.c:857
---Type <return> to continue, or q <return> to quit---
#79 0x00000000005228de in PyRun_InteractiveLoopFlags (fp=fp@entry=0x7ffff753b6e0 <_IO_2_1_stdin_>,
filename=filename@entry=0x6fa023 "<stdin>", flags=flags@entry=0x7fffffffd400) at Python/pythonrun.c:777
#80 0x0000000000522df6 in PyRun_AnyFileExFlags (fp=0x7ffff753b6e0 <_IO_2_1_stdin_>, filename=<optimized out>, closeit=0,
flags=0x7fffffffd400) at Python/pythonrun.c:746
#81 0x000000000045437b in Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:640
#82 0x00007ffff71e8c36 in __libc_start_main () from /lib64/libc.so.6
#83 0x0000000000453541 in _start () at ../sysdeps/x86_64/elf/start.S:113 |
Seems the problem is on |
I tried to build with -copt=-g , but met another failure: linux-swfm:~/workarea/tensorflow/tensorflow-1.2.0> bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg |
hi, I switched to python3 and solved the above build failure, but still have the "import tensorflow segment fault". The debug info is : linux-swfm:~/workarea/test> gdb python3
...
(gdb) r
...
>>> import tensorflow
[New Thread 0x7ffff3543700 (LWP 73450)]
[New Thread 0x7ffff2d42700 (LWP 73451)]
..
[New Thread 0x7ffff0541700 (LWP 73452)]
[New Thread 0x7fffedd40700 (LWP 73453)]
..
Program received signal SIGSEGV, Segmentation fault.
0x00007fff337680c1 in std::call_once<void (&)()> (__once=..., __f=
@0x7fff3543c7b6: {void (void)} 0x7fff3543c7b6 <tensorflow::port::(anonymous namespace)::CPUIDInfo::Initialize()>)
at /home/zhangdingfei/tools/gcc-4.9.2/bin/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/mutex:736
736 __once_callable = &__bound_functor;
(gdb)
(gdb) bt
#0 0x00007fff337680c1 in std::call_once<void (&)()> (__once=..., __f=
@0x7fff3543c7b6: {void (void)} 0x7fff3543c7b6 <tensorflow::port::(anonymous namespace)::CPUIDInfo::Initialize()>)
at /home/zhangdingfei/tools/gcc-4.9.2/bin/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/mutex:736
#1 0x00007fff3543d582 in tensorflow::port::(anonymous namespace)::InitCPUIDInfo () at tensorflow/core/platform/cpu_info.cc:306
#2 0x00007fff3543d17d in tensorflow::port::(anonymous namespace)::CPUIDInfo::TestFeature (feature=tensorflow::port::SSE)
at tensorflow/core/platform/cpu_info.cc:206
#3 0x00007fff3543d599 in tensorflow::port::TestCPUFeature (feature=tensorflow::port::SSE)
at tensorflow/core/platform/cpu_info.cc:315
#4 0x00007fff3543be7a in tensorflow::port::(anonymous namespace)::CheckFeatureOrDie (feature=tensorflow::port::SSE,
feature_name=...) at tensorflow/core/platform/cpu_feature_guard.cc:29
#5 0x00007fff3543bfbc in tensorflow::port::(anonymous namespace)::CPUFeatureGuard::CPUFeatureGuard (
this=0x7fff5368415c <tensorflow::port::(anonymous namespace)::g_cpu_feature_guard_singleton>)
at tensorflow/core/platform/cpu_feature_guard.cc:62
#6 0x00007fff3543c507 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
at tensorflow/core/platform/cpu_feature_guard.cc:91
#7 0x00007fff3543c51c in _GLOBAL__sub_I_cpu_feature_guard.cc(void) () at tensorflow/core/platform/cpu_feature_guard.cc:130
#8 0x00007fff3586d026 in __do_global_ctors_aux ()
from /home/zhangdingfei/tools/Python-3.4.6/bin/lib/python3.4/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#9 0x00007fff2e73112b in _init ()
from /home/zhangdingfei/tools/Python-3.4.6/bin/lib/python3.4/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
... |
Try with cuDNN 5/5.1 instead of 6.0. |
As mentioned on https://www.tensorflow.org/install/install_linux, please try with cudnn 5.1 and see if that helps. |
I build with cudnn 5.1. the failure still exists in my tensorflow 1.2.0.cuda sdk: 8.0 while my tensorflow 1.1.0 works in above environment. |
@jart, thoughts about this? |
I'm running into the exact same problem. I have GPU TF on CentOS 7 and it's working fine. I built it on SUSE Enterprise Linux 11 SP4 (gcc 4.8.4) and it's showing this problem. |
Out of curiosity, why did you guys build TensorFlow from source? Did pip installing not work? I'm noticing SUSE 11 was released in 2009 but surprisingly enough isn't EOL and seems to keep relatively up to date with certain things. I'm also noticing that the GDB trace is tracing through a function that is checking to see if SSE is available on an x86 CPU. What kind of CPU have you guys got? |
Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks! |
Hi, I am having the same problem but with Tensorflow 1.5.1. I compiled tensorflow from source
i got the following basically, the segfault occurs inside the function call https://github.com/tensorflow/tensorflow/blob/v1.5.1/tensorflow/core/platform/cpu_info.cc#L305 i am investigating what could be causing the segfault. It does not seem to be caused by cudnn. |
Did you try using a more recent version of tensorFlow? |
yes, i have the same outcome with tensorflow 1.7.1 |
Are you using a custom toolchain? Could you share more details about how TensorFlow was compiled? It seems __tls_get_addr is returning an invalid pointer. See also: |
tnx for the links. here are the details of my build (based on the issue template)
i build tensorflow with the following script export PYTHON_BIN_PATH="/progs/usr/bin/tensorflow-1.5.1-py3/bin/python"
export PYTHON_LIB_PATH="/progs/usr/bin/tensorflow-1.5.1-py3/lib/python3.6/site-packages"
export TF_NEED_JEMALLOC="0"
export TF_NEED_GCP="0"
export TF_NEED_KAFKA="0"
export TF_NEED_TENSORRT="0"
export TF_NEED_HDFS="0"
export TF_ENABLE_XLA="0"
export TF_NEED_VERBS="0"
export TF_NEED_OPENCL_SYCL="0"
export TF_NEED_OPENCL="0"
export TF_NEED_CUDA="1"
export TF_CUDA_CLANG="0"
export TF_CUDA_VERSION="8.0"
export CUDA_TOOLKIT_PATH="/progs/usr/bin/cuda/cuda-8.0"
export GCC_HOST_COMPILER_PATH="/progs/usr/bin/gcc-5.4.0/bin/gcc"
export TF_CUDNN_VERSION="6"
export CUDNN_INSTALL_PATH="/progs/usr/bin/cuda/cuda-8.0"
export TF_CUDA_COMPUTE_CAPABILITIES="3.5"
export TF_NEED_MPI="0"
export TF_NEED_GDR="0"
export TF_NEED_S3="0"
export CC_OPT_FLAGS="-march=native"
#export CC_OPT_FLAGS="-O0 -g"
#export TF_SET_ANDROID_WORKSPACE="0"
./configure
bazel build -s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone \
--jobs=32 --config=opt --config=cuda --linkopt='-lrt -lm' \
//tensorflow/tools/pip_package:build_pip_package |
I just tried the example in the link #include <iostream>
#include <thread>
#include <mutex>
std::once_flag flag;
void do_once()
{
std::call_once(flag, [](){ std::cout << "Called once" << std::endl; });
}
int main()
{
std::thread t1(do_once);
std::thread t2(do_once);
std::thread t3(do_once);
std::thread t4(do_once);
t1.join();
t2.join();
t3.join();
t4.join();
} compiled with gcc -std=c++11 -Wall -Wextra -pthread -g use_once.cpp -lstdc++ -o use_once and it did not segfault |
i just compiled tensorflow without cuda support and i succeeded in importing tensorflow and running the hello world example $ python hellow_world.py
2018-05-12 19:32:43.852871: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
b'Hello, TensorFlow!' so it looks like when compiling the cuda support some compiler flags are messing up things. (i have the full bazel build command log for the build with cuda and without cuda if that would help) |
@jart should this issue be re-opened? or maybe i can create a new issue since this is also occurring with the master branch and the latest release. |
I wish you'd mentioned RHEL6 earlier. GCC5 is ABI incompatible with GCC4.2. It's not entirely possible to have multiple versions of glibc / libstdc++ shared libraries on the same system. You might be able to statically link those libraries using the modern toolchain, although that'd likely make TensorFlow GPLv3, and could potentially cause other issues. There's also |
tnx @jart for the explanation. That is helpful. |
ran into the same issue on
|
@caot what operating system are you testing this on? version of glibc? |
Also tried on glibc/2.14.1 |
can you try higher versions of glibc, ? I am not sure how high you should go, but |
It's kind of challenging to get glibc 2.23 compiled in CentOS 6. |
All of our newer packages should be using glibc 2.19, as they are back to building on ubuntu 14. |
hi,
I installed tensorflow-1.2.0 in my machine, and met a segment fault as below.
linux-swfm:~/workarea/test> python
Python 2.7.13 (default, Jun 20 2017, 20:03:45)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
my system is : USE Linux Enterprise Server 11 SP3.
cuda sdk version is 8.0 and cudnn is 6.0.
my command to build tensorflow is below :
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
The text was updated successfully, but these errors were encountered: