[ 
https://issues.apache.org/jira/browse/ARROW-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Li Jin reassigned ARROW-2657:
-----------------------------

    Assignee: Philipp Moritz

> Segfault when importing TensorFlow after Pyarrow
> ------------------------------------------------
>
>                 Key: ARROW-2657
>                 URL: https://issues.apache.org/jira/browse/ARROW-2657
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Python
>            Reporter: Robert Nishihara
>            Assignee: Philipp Moritz
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0
>
>          Time Spent: 15h 10m
>  Remaining Estimate: 0h
>
> The following will segfault when pyarrow wheels are built using the 
> instructions in 
> [https://github.com/apache/arrow/tree/master/python/manylinux1#build-instructions].
> {code:java}
> import pyarrow
> import tensorflow
> {code}
> Searching over commits, this was introduced in 
> https://github.com/apache/arrow/commit/2093f6ec5c628ef983194a3fb3d0a621dd58c600.
> Running in gdb shows
> {code:java}
> $ gdb python
> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
> Copyright (C) 2016 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from python...done.
> (gdb) run
> Starting program: /home/ubuntu/anaconda3/bin/python 
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 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 pyarrow
> >>> import tensorflow
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000000000 in ?? ()
> (gdb) bt
> #0 0x0000000000000000 in ?? ()
> #1 0x00007ffff7bc8a99 in __pthread_once_slow (
>  once_control=0x7fffd95561c8 <tensorflow::port::(anonymous 
> namespace)::cpuid_once_flag>, init_routine=0x7ffff17e6fe1 
> <std::__once_proxy()>)
>  at pthread_once.c:116
> #2 0x00007fffd8df6faa in void std::call_once<void (&)()>(std::once_flag&, 
> void (&)()) ()
>  from 
> /home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so
> #3 0x00007fffd8df6fde in 
> tensorflow::port::TestCPUFeature(tensorflow::port::CPUFeature) ()
>  from 
> /home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so
> #4 0x00007fffd8df6f11 in tensorflow::port::(anonymous 
> namespace)::CheckFeatureOrDie(tensorflow::port::CPUFeature, std::string 
> const&) ()
>  from 
> /home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so
> #5 0x00007fffd8c38394 in _GLOBAL__sub_I_cpu_feature_guard.cc ()
>  from 
> /home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so
> ---Type <return> to continue, or q <return> to quit---
> #6 0x00007ffff7de76ba in call_init (l=<optimized out>, argc=argc@entry=1, 
>  argv=argv@entry=0x7fffffffe598, env=env@entry=0x555555c628f0)
>  at dl-init.c:72
> #7 0x00007ffff7de77cb in call_init (env=0x555555c628f0, argv=0x7fffffffe598, 
>  argc=1, l=<optimized out>) at dl-init.c:30
> #8 _dl_init (main_map=main_map@entry=0x5555565d9640, argc=1, 
>  argv=0x7fffffffe598, env=0x555555c628f0) at dl-init.c:120
> #9 0x00007ffff7dec8e2 in dl_open_worker (a=a@entry=0x7fffffff8810)
>  at dl-open.c:575
> #10 0x00007ffff7de7564 in _dl_catch_error (
>  objname=objname@entry=0x7fffffff8800, 
>  errstring=errstring@entry=0x7fffffff8808, 
>  mallocedp=mallocedp@entry=0x7fffffff87ff, 
>  operate=operate@entry=0x7ffff7dec4d0 <dl_open_worker>, 
>  args=args@entry=0x7fffffff8810) at dl-error.c:187
> #11 0x00007ffff7debda9 in _dl_open (
>  file=0x7fffde1edc00 
> "/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so",
>  mode=-2147483646, 
>  caller_dlopen=0x555555742bfa <_PyImport_FindSharedFuncptr+138>, nsid=-2, 
>  argc=<optimized out>, argv=<optimized out>, env=0x555555c628f0)
> ---Type <return> to continue, or q <return> to quit---
>  at dl-open.c:660
> #12 0x00007ffff75ecf09 in dlopen_doit (a=a@entry=0x7fffffff8a40) at 
> dlopen.c:66
> #13 0x00007ffff7de7564 in _dl_catch_error (objname=0x555555b35d00, 
>  errstring=0x555555b35d08, mallocedp=0x555555b35cf8, 
>  operate=0x7ffff75eceb0 <dlopen_doit>, args=0x7fffffff8a40)
>  at dl-error.c:187
> #14 0x00007ffff75ed571 in _dlerror_run (
>  operate=operate@entry=0x7ffff75eceb0 <dlopen_doit>, 
>  args=args@entry=0x7fffffff8a40) at dlerror.c:163
> #15 0x00007ffff75ecfa1 in __dlopen (file=<optimized out>, mode=<optimized 
> out>)
>  at dlopen.c:87
> #16 0x0000555555742bfa in _PyImport_FindSharedFuncptr ()
> #17 0x00005555557698a0 in _PyImport_LoadDynamicModuleWithSpec ()
> #18 0x0000555555769ae5 in _imp_create_dynamic ()
> #19 0x0000555555665a61 in PyCFunction_Call ()
> #20 0x0000555555719fdb in _PyEval_EvalFrameDefault ()
> #21 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #22 0x00005555556ec941 in fast_function ()
> #23 0x00005555556f2755 in call_function ()
> #24 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> ---Type <return> to continue, or q <return> to quit---
> #25 0x00005555556ec70b in fast_function ()
> #26 0x00005555556f2755 in call_function ()
> #27 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #28 0x00005555556ec70b in fast_function ()
> #29 0x00005555556f2755 in call_function ()
> #30 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #31 0x00005555556ec70b in fast_function ()
> #32 0x00005555556f2755 in call_function ()
> #33 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #34 0x00005555556ec70b in fast_function ()
> #35 0x00005555556f2755 in call_function ()
> #36 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #37 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #38 0x00005555556ec941 in fast_function ()
> #39 0x00005555556f2755 in call_function ()
> #40 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #41 0x00005555556ec70b in fast_function ()
> #42 0x00005555556f2755 in call_function ()
> #43 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #44 0x00005555556ec70b in fast_function ()
> ---Type <return> to continue, or q <return> to quit---
> #45 0x00005555556f2755 in call_function ()
> #46 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #47 0x00005555556ed459 in PyEval_EvalCodeEx ()
> #48 0x00005555556ee1ec in PyEval_EvalCode ()
> #49 0x00005555557125bd in builtin_exec ()
> #50 0x0000555555665a61 in PyCFunction_Call ()
> #51 0x0000555555719fdb in _PyEval_EvalFrameDefault ()
> #52 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #53 0x00005555556ec941 in fast_function ()
> #54 0x00005555556f2755 in call_function ()
> #55 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #56 0x00005555556ec70b in fast_function ()
> #57 0x00005555556f2755 in call_function ()
> #58 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #59 0x00005555556ec70b in fast_function ()
> #60 0x00005555556f2755 in call_function ()
> #61 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #62 0x00005555556ec70b in fast_function ()
> #63 0x00005555556f2755 in call_function ()
> #64 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> ---Type <return> to continue, or q <return> to quit---
> #65 0x00005555556ecd7b in _PyFunction_FastCallDict ()
> #66 0x0000555555662f5f in _PyObject_FastCallDict ()
> #67 0x00005555556a7670 in _PyObject_CallMethodIdObjArgs ()
> #68 0x0000555555659a70 in PyImport_ImportModuleLevelObject ()
> #69 0x0000555555717033 in _PyEval_EvalFrameDefault ()
> #70 0x00005555556ed459 in PyEval_EvalCodeEx ()
> #71 0x00005555556ee1ec in PyEval_EvalCode ()
> #72 0x00005555557125bd in builtin_exec ()
> #73 0x0000555555665a61 in PyCFunction_Call ()
> #74 0x0000555555719fdb in _PyEval_EvalFrameDefault ()
> #75 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #76 0x00005555556ec941 in fast_function ()
> #77 0x00005555556f2755 in call_function ()
> #78 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #79 0x00005555556ec70b in fast_function ()
> #80 0x00005555556f2755 in call_function ()
> #81 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #82 0x00005555556ec70b in fast_function ()
> #83 0x00005555556f2755 in call_function ()
> #84 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> ---Type <return> to continue, or q <return> to quit---
> #85 0x00005555556ec70b in fast_function ()
> #86 0x00005555556f2755 in call_function ()
> #87 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #88 0x00005555556ecd7b in _PyFunction_FastCallDict ()
> #89 0x0000555555662f5f in _PyObject_FastCallDict ()
> #90 0x00005555556a7670 in _PyObject_CallMethodIdObjArgs ()
> #91 0x0000555555659a70 in PyImport_ImportModuleLevelObject ()
> #92 0x00005555556fd1da in builtin___import__ ()
> #93 0x00005555556659f6 in PyCFunction_Call ()
> #94 0x0000555555719fdb in _PyEval_EvalFrameDefault ()
> #95 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #96 0x00005555556ec941 in fast_function ()
> #97 0x00005555556f2755 in call_function ()
> #98 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #99 0x00005555556ebf21 in _PyEval_EvalCodeWithName ()
> #100 0x00005555556ece1b in _PyFunction_FastCallDict ()
> #101 0x0000555555662f5f in _PyObject_FastCallDict ()
> #102 0x00005555556a7670 in _PyObject_CallMethodIdObjArgs ()
> #103 0x0000555555659933 in PyImport_ImportModuleLevelObject ()
> #104 0x0000555555717033 in _PyEval_EvalFrameDefault ()
> ---Type <return> to continue, or q <return> to quit---
> #105 0x00005555556ed459 in PyEval_EvalCodeEx ()
> #106 0x00005555556ee1ec in PyEval_EvalCode ()
> #107 0x00005555557125bd in builtin_exec ()
> #108 0x0000555555665a61 in PyCFunction_Call ()
> #109 0x0000555555719fdb in _PyEval_EvalFrameDefault ()
> #110 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #111 0x00005555556ec941 in fast_function ()
> #112 0x00005555556f2755 in call_function ()
> #113 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #114 0x00005555556ec70b in fast_function ()
> #115 0x00005555556f2755 in call_function ()
> #116 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #117 0x00005555556ec70b in fast_function ()
> #118 0x00005555556f2755 in call_function ()
> #119 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #120 0x00005555556ec70b in fast_function ()
> #121 0x00005555556f2755 in call_function ()
> #122 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #123 0x00005555556ecd7b in _PyFunction_FastCallDict ()
> #124 0x0000555555662f5f in _PyObject_FastCallDict ()
> ---Type <return> to continue, or q <return> to quit---
> #125 0x00005555556a7670 in _PyObject_CallMethodIdObjArgs ()
> #126 0x0000555555659a70 in PyImport_ImportModuleLevelObject ()
> #127 0x0000555555717033 in _PyEval_EvalFrameDefault ()
> #128 0x00005555556ed459 in PyEval_EvalCodeEx ()
> #129 0x00005555556ee1ec in PyEval_EvalCode ()
> #130 0x00005555557125bd in builtin_exec ()
> #131 0x0000555555665a61 in PyCFunction_Call ()
> #132 0x0000555555719fdb in _PyEval_EvalFrameDefault ()
> #133 0x00005555556eba94 in _PyEval_EvalCodeWithName ()
> #134 0x00005555556ec941 in fast_function ()
> #135 0x00005555556f2755 in call_function ()
> #136 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #137 0x00005555556ec70b in fast_function ()
> #138 0x00005555556f2755 in call_function ()
> #139 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #140 0x00005555556ec70b in fast_function ()
> #141 0x00005555556f2755 in call_function ()
> #142 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #143 0x00005555556ec70b in fast_function ()
> #144 0x00005555556f2755 in call_function ()
> ---Type <return> to continue, or q <return> to quit---
> #145 0x0000555555714cba in _PyEval_EvalFrameDefault ()
> #146 0x00005555556ecd7b in _PyFunction_FastCallDict ()
> #147 0x0000555555662f5f in _PyObject_FastCallDict ()
> #148 0x00005555556a7670 in _PyObject_CallMethodIdObjArgs ()
> #149 0x0000555555659a70 in PyImport_ImportModuleLevelObject ()
> #150 0x0000555555717033 in _PyEval_EvalFrameDefault ()
> #151 0x00005555556ed459 in PyEval_EvalCodeEx ()
> #152 0x00005555556ee1ec in PyEval_EvalCode ()
> #153 0x00005555557689a4 in run_mod ()
> #154 0x000055555562f60c in PyRun_InteractiveOneObjectEx ()
> #155 0x000055555562f7c2 in PyRun_InteractiveLoopFlags ()
> #156 0x000055555562f862 in PyRun_AnyFileExFlags.cold.2773 ()
> #157 0x0000555555631a57 in Py_Main.cold.2798 ()
> #158 0x00005555556344be in main ()
> (gdb) 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to