Error when running "import tectosaur"
vic-chou opened this issue · 4 comments
Hi Ben,
I installed the tectosaur. It seems the installation is successful. But when I running "import tectosaur" in Python3.6, it appeared that “segment fault (core dump)". I don't know why. Can you give me some suggestions? Thank you!
Hi! I'd be happy to help, but I'm not getting any issues with segfaults. Could I get some more info on your operating system and C/C++ compiler?
Hi Ben,
My operating system and C/C++ compiler is:
Linux version 4.15.0-50-generic (buildd@lgw01-amd64-029) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu116.04.10)) #5416.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019.
I also tried to use 'gdb' to find the error message.
I make a file named test.py which contains:
import tectosaur
then I enter a command:
gdb python3
(gdb) run test.py
the screen shows that
'Starting program: /usr/bin/python3 test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe688515e in pybind11::detail::make_new_python_type(pybind11::detail::type_record const&) ()
from /usr/local/lib/python3.5/dist-packages/pyopencl/_cl.cpython-35m-x86_64-linux-gnu.so
'
I have installed the pybind11 and pyopencl sucessfully by pip3, so I don't know what is the problem. I don't really understand the debugging message above. Can you give me soem suggestions?
Sorry for the slow responses. I've been offline a lot recently after defending. The issue is in loading pyopencl. A couple things to check...
First, can you try loading pyopencl without tectosaur? Just run:
import pyopencl
If that fails, I think you'd get much better help and info by posting a bug report to the pyopencl folks. It's a well maintained project (certainly more well maintained than tectosaur currently is -- I'm hoping to change that now that I can shift my focus a bit).
Another thing that would provide a bit more useful info. After the segfault in gdb
, can you type bt
and hit enter. That will show a full backtrace for the segfault.
Thanks!
Hi Ben,
Thanks for your reply! I tried to load pyopencl without tectosaur, it can import successfully.
Then I type 'bt' and hit enter after the segfualt in 'gdb', the screen shows that
Starting program: /usr/bin/python3 test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff0971700 (LWP 14774)]
[New Thread 0x7ffff0170700 (LWP 14775)]
[New Thread 0x7fffeb96f700 (LWP 14776)]
[New Thread 0x7fffe1e61700 (LWP 14777)]
[New Thread 0x7fffdf660700 (LWP 14778)]
[New Thread 0x7fffdee5f700 (LWP 14779)]
Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x00007fffd700d15e in pybind11::detail::make_new_python_type(pybind11::detail::type_record const&) ()
from /usr/local/lib/python3.6/dist-packages/pyopencl/_cl.cpython-36m-x86_64-linux-gnu.so
(gdb) bt
#0 0x00007fffd700d15e in pybind11::detail::make_new_python_type(pybind11::detail::type_record const&) ()
from /usr/local/lib/python3.6/dist-packages/pyopencl/_cl.cpython-36m-x86_64-linux-gnu.so
#1 0x00007fffd70112e1 in pybind11::detail::generic_type::initialize(pybind11::detail::type_record const&) ()
from /usr/local/lib/python3.6/dist-packages/pyopencl/_cl.cpython-36m-x86_64-linux-gnu.so
#2 0x00007fffd6ffa1d8 in pyopencl_expose_constants(pybind11::module&) ()
from /usr/local/lib/python3.6/dist-packages/pyopencl/_cl.cpython-36m-x86_64-linux-gnu.so
#3 0x00007fffd70180ff in PyInit(char, long) ()
from /usr/local/lib/python3.6/dist-packages/pyopencl/_cl.cpython-36m-x86_64-linux-gnu.so
#4 0x00000000005fb4ec in _PyImport_LoadDynamicModuleWithSpec ()
#5 0x00000000005fb768 in ?? ()
#6 0x000000000056617e in PyCFunction_Call ()
#7 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#8 0x0000000000504c28 in ?? ()
#9 0x0000000000502540 in ?? ()
#10 0x0000000000502f3d in ?? ()
#11 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#12 0x0000000000502209 in ?? ()
---Type to continue, or q to quit---
#13 0x0000000000502f3d in ?? ()
#14 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#15 0x0000000000502209 in ?? ()
#16 0x0000000000502f3d in ?? ()
#17 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#18 0x0000000000502209 in ?? ()
#19 0x0000000000502f3d in ?? ()
#20 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#21 0x0000000000502209 in ?? ()
#22 0x0000000000502f3d in ?? ()
#23 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#24 0x0000000000501945 in _PyFunction_FastCallDict ()
#25 0x00000000005a36f1 in _PyObject_FastCallDict ()
#26 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#27 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#28 0x000000000050896c in _PyEval_EvalFrameDefault ()
#29 0x0000000000504c28 in ?? ()
#30 0x0000000000511d78 in ?? ()
#31 0x000000000056617e in PyCFunction_Call ()
#32 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#33 0x0000000000504c28 in ?? ()
#34 0x0000000000502540 in ?? ()
#35 0x0000000000502f3d in ?? ()
---Type to continue, or q to quit---
#36 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#37 0x0000000000502209 in ?? ()
#38 0x0000000000502f3d in ?? ()
#39 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#40 0x0000000000502209 in ?? ()
#41 0x0000000000502f3d in ?? ()
#42 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#43 0x0000000000502209 in ?? ()
#44 0x0000000000502f3d in ?? ()
#45 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#46 0x0000000000501945 in _PyFunction_FastCallDict ()
#47 0x00000000005a36f1 in _PyObject_FastCallDict ()
#48 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#49 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#50 0x000000000050896c in _PyEval_EvalFrameDefault ()
#51 0x0000000000504c28 in ?? ()
#52 0x0000000000511d78 in ?? ()
#53 0x000000000056617e in PyCFunction_Call ()
#54 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#55 0x0000000000504c28 in ?? ()
#56 0x0000000000502540 in ?? ()
#57 0x0000000000502f3d in ?? ()
#58 0x0000000000506859 in _PyEval_EvalFrameDefault ()
---Type to continue, or q to quit---
#59 0x0000000000502209 in ?? ()
#60 0x0000000000502f3d in ?? ()
#61 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#62 0x0000000000502209 in ?? ()
#63 0x0000000000502f3d in ?? ()
#64 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#65 0x0000000000502209 in ?? ()
#66 0x0000000000502f3d in ?? ()
#67 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#68 0x0000000000501945 in _PyFunction_FastCallDict ()
#69 0x00000000005a36f1 in _PyObject_FastCallDict ()
#70 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#71 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#72 0x000000000050896c in _PyEval_EvalFrameDefault ()
#73 0x0000000000504c28 in ?? ()
#74 0x0000000000511d78 in ?? ()
#75 0x000000000056617e in PyCFunction_Call ()
#76 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#77 0x0000000000504c28 in ?? ()
#78 0x0000000000502540 in ?? ()
#79 0x0000000000502f3d in ?? ()
#80 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#81 0x0000000000502209 in ?? ()
---Type to continue, or q to quit---
#82 0x0000000000502f3d in ?? ()
#83 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#84 0x0000000000502209 in ?? ()
#85 0x0000000000502f3d in ?? ()
#86 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#87 0x0000000000502209 in ?? ()
#88 0x0000000000502f3d in ?? ()
#89 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#90 0x0000000000501945 in _PyFunction_FastCallDict ()
#91 0x00000000005a36f1 in _PyObject_FastCallDict ()
#92 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#93 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#94 0x000000000050896c in _PyEval_EvalFrameDefault ()
#95 0x0000000000504c28 in ?? ()
#96 0x0000000000511d78 in ?? ()
#97 0x000000000056617e in PyCFunction_Call ()
#98 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#99 0x0000000000504c28 in ?? ()
#100 0x0000000000502540 in ?? ()
#101 0x0000000000502f3d in ?? ()
#102 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#103 0x0000000000502209 in ?? ()
#104 0x0000000000502f3d in ?? ()
---Type to continue, or q to quit---
#105 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#106 0x0000000000502209 in ?? ()
#107 0x0000000000502f3d in ?? ()
#108 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#109 0x0000000000502209 in ?? ()
#110 0x0000000000502f3d in ?? ()
#111 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#112 0x0000000000501945 in _PyFunction_FastCallDict ()
#113 0x00000000005a36f1 in _PyObject_FastCallDict ()
#114 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#115 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#116 0x000000000050896c in _PyEval_EvalFrameDefault ()
#117 0x0000000000504c28 in ?? ()
#118 0x0000000000511d78 in ?? ()
#119 0x000000000056617e in PyCFunction_Call ()
#120 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#121 0x0000000000504c28 in ?? ()
#122 0x0000000000502540 in ?? ()
#123 0x0000000000502f3d in ?? ()
#124 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#125 0x0000000000502209 in ?? ()
#126 0x0000000000502f3d in ?? ()
#127 0x0000000000506859 in _PyEval_EvalFrameDefault ()
---Type to continue, or q to quit---
#128 0x0000000000502209 in ?? ()
#129 0x0000000000502f3d in ?? ()
#130 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#131 0x0000000000502209 in ?? ()
#132 0x0000000000502f3d in ?? ()
#133 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#134 0x0000000000501945 in _PyFunction_FastCallDict ()
#135 0x00000000005a36f1 in _PyObject_FastCallDict ()
#136 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#137 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#138 0x000000000050896c in _PyEval_EvalFrameDefault ()
#139 0x0000000000504c28 in ?? ()
#140 0x0000000000511d78 in ?? ()
#141 0x000000000056617e in PyCFunction_Call ()
#142 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#143 0x0000000000504c28 in ?? ()
#144 0x0000000000502540 in ?? ()
#145 0x0000000000502f3d in ?? ()
#146 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#147 0x0000000000502209 in ?? ()
#148 0x0000000000502f3d in ?? ()
#149 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#150 0x0000000000502209 in ?? ()
---Type to continue, or q to quit---
#151 0x0000000000502f3d in ?? ()
#152 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#153 0x0000000000502209 in ?? ()
#154 0x0000000000502f3d in ?? ()
#155 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#156 0x0000000000501945 in _PyFunction_FastCallDict ()
#157 0x00000000005a36f1 in _PyObject_FastCallDict ()
#158 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#159 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#160 0x000000000050896c in _PyEval_EvalFrameDefault ()
#161 0x0000000000504c28 in ?? ()
#162 0x0000000000511d78 in ?? ()
#163 0x000000000056617e in PyCFunction_Call ()
#164 0x000000000050bb66 in _PyEval_EvalFrameDefault ()
#165 0x0000000000504c28 in ?? ()
#166 0x0000000000502540 in ?? ()
#167 0x0000000000502f3d in ?? ()
#168 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#169 0x0000000000502209 in ?? ()
#170 0x0000000000502f3d in ?? ()
#171 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#172 0x0000000000502209 in ?? ()
#173 0x0000000000502f3d in ?? ()
---Type to continue, or q to quit---
#174 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#175 0x0000000000502209 in ?? ()
#176 0x0000000000502f3d in ?? ()
#177 0x0000000000506859 in _PyEval_EvalFrameDefault ()
#178 0x0000000000501945 in _PyFunction_FastCallDict ()
#179 0x00000000005a36f1 in _PyObject_FastCallDict ()
#180 0x000000000059662e in _PyObject_CallMethodIdObjArgs ()
#181 0x00000000004ee84d in PyImport_ImportModuleLevelObject ()
#182 0x000000000050896c in _PyEval_EvalFrameDefault ()
#183 0x0000000000504c28 in ?? ()
#184 0x0000000000506393 in PyEval_EvalCode ()
#185 0x0000000000634d52 in ?? ()
#186 0x0000000000634e0a in PyRun_FileExFlags ()
#187 0x00000000006385c8 in PyRun_SimpleFileExFlags ()
#188 0x000000000063915a in Py_Main ()
#189 0x00000000004a6f10 in main ()
I hope I haven't taken up too much of your time. I also tried to re-install pyopencl without pip.