thuyen / multicrop

MIT License
5 stars 2 forks source link

Segmentation fault when running `tests.py` #2

Closed pyaf closed 5 years ago

pyaf commented 5 years ago

Hi, I'm on Pytorch version 0.4.0, I've successfully installed multicrop, below are the installation logs:


(GE) [15084015@compute-01 multicrop]$ python setup.py install                                                                                                                                                      
running install                                                                                                                                                                                                    
running bdist_egg                                                                                                                                                                                                  
running egg_info                                                                                                                                                                                                   
writing multicrop.egg-info/PKG-INFO                                                                                                                                                                                
writing dependency_links to multicrop.egg-info/dependency_links.txt                                                                                                                                                
writing top-level names to multicrop.egg-info/top_level.txt                                                                                                                                                        
reading manifest file 'multicrop.egg-info/SOURCES.txt'                                                                                                                                                             
writing manifest file 'multicrop.egg-info/SOURCES.txt'                                                                                                                                                             
installing library code to build/bdist.linux-x86_64/egg                                                                                                                                                            
running install_lib                                                                                                                                                                                                
running build_ext                                                                                                                                                                                                  
creating build/bdist.linux-x86_64/egg                                                                                                                                                                              
copying build/lib.linux-x86_64-3.6/multicrop.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg                                                                                                       
creating stub loader for multicrop.cpython-36m-x86_64-linux-gnu.so                                                                                                                                                 
byte-compiling build/bdist.linux-x86_64/egg/multicrop.py to multicrop.cpython-36.pyc                                                                                                                               
creating build/bdist.linux-x86_64/egg/EGG-INFO                                                                                                                                                                     
copying multicrop.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO                                                                                                                                       
copying multicrop.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO                                                                                                                                    
copying multicrop.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO                                                                                                                           
copying multicrop.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO                                                                                                                                  
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt                                                                                                                                                      
zip_safe flag not set; analyzing archive contents...                                                                                                                                                               
__pycache__.multicrop.cpython-36: module references __file__                                                                                                                                                       
creating 'dist/multicrop-0.0.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it                                                                                                             
removing 'build/bdist.linux-x86_64/egg' (and everything under it)                                                                                                                                                  
Processing multicrop-0.0.0-py3.6-linux-x86_64.egg                                                                                                                                                                  
creating /home/eee/ug/15084015/miniconda3/envs/GE/lib/python3.6/site-packages/multicrop-0.0.0-py3.6-linux-x86_64.egg                                                                                               
Extracting multicrop-0.0.0-py3.6-linux-x86_64.egg to /home/eee/ug/15084015/miniconda3/envs/GE/lib/python3.6/site-packages                                                                                          
Adding multicrop 0.0.0 to easy-install.pth file                                                                                                                                                                    

Installed /home/eee/ug/15084015/miniconda3/envs/GE/lib/python3.6/site-packages/multicrop-0.0.0-py3.6-linux-x86_64.egg                                                                                              
Processing dependencies for multicrop==0.0.0                                                                                                                                                                       
Finished processing dependencies for multicrop==0.0.0   ```

I'm getting segmentation fault while using multicrop, tests.py fails with this same error of `Segmentation fault (core dumped)`. Please help.
pyaf commented 5 years ago

a backtrace in gdb gives me this:

(gdb) backtrace
#0  0x00007fffb47237b4 in construct<_object*, _object*> (__p=0xb, this=0x555556375738) at /usr/include/c++/4.8.2/ext/new_allocator.h:120
#1  _S_construct<_object*, _object*> (__p=0xb, __a=...) at /usr/include/c++/4.8.2/bits/alloc_traits.h:254                                                                                                         
#2  construct<_object*, _object*> (__p=0xb, __a=...) at /usr/include/c++/4.8.2/bits/alloc_traits.h:393
#3  emplace_back<_object*> (this=0x555556375738) at /usr/include/c++/4.8.2/bits/vector.tcc:96
#4  push_back (__x=<unknown type in /home/eee/ug/15084015/miniconda3/envs/GE/lib/python3.6/site-packages/multicrop-0.0.0-py3.6-linux-x86_64.egg/multicrop.cpython-36m-x86_64-linux-gnu.so, CU 0x0, DIE 0x5d935>,  
    this=0x555556375738) at /usr/include/c++/4.8.2/bits/stl_vector.h:920
#5  loader_life_support (this=0x7fffffffd0c0) at /home/eee/ug/15084015/miniconda3/envs/GE/lib/python3.6/site-packages/torch/lib/include/pybind11/cast.h:43
#6  pybind11::cpp_function::dispatcher (self=<optimized out>, args_in=0x7fffb4789348, kwargs_in=0x0)
    at /home/eee/ug/15084015/miniconda3/envs/GE/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:618
#7  0x00005555556673d4 in _PyCFunction_FastCallDict () at /tmp/build/80754af9/python_1540319457073/work/Objects/methodobject.c:231
#8  0x00005555556f0c1c in call_function () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4837
#9  0x000055555571371a in _PyEval_EvalFrameDefault () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:3335
#10 0x00005555556ea124 in _PyEval_EvalCodeWithName () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4166
#11 0x00005555556eafc1 in fast_function () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4978
#12 0x00005555556f0cf5 in call_function () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4858
#13 0x000055555571371a in _PyEval_EvalFrameDefault () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:3335
#14 0x00005555556ebad9 in _PyEval_EvalCodeWithName (qualname=0x0, name=<optimized out>, closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwstep=2, kwcount=<optimized out>, kwargs=0x0, kwnames=0x0, argcount=0,    
    args=0x0, locals=0x7ffff7f631b0, globals=0x7ffff7f631b0, _co=0x7ffff09b34b0) at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4166
#15 PyEval_EvalCodeEx () at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:4187
#16 0x00005555556ec87c in PyEval_EvalCode (co=co@entry=0x7ffff09b34b0, globals=globals@entry=0x7ffff7f631b0, locals=locals@entry=0x7ffff7f631b0)
    at /tmp/build/80754af9/python_1540319457073/work/Python/ceval.c:731
#17 0x000055555576d074 in run_mod () at /tmp/build/80754af9/python_1540319457073/work/Python/pythonrun.c:1025
#18 0x000055555576d471 in PyRun_FileExFlags () at /tmp/build/80754af9/python_1540319457073/work/Python/pythonrun.c:978
#19 0x000055555576d673 in PyRun_SimpleFileExFlags () at /tmp/build/80754af9/python_1540319457073/work/Python/pythonrun.c:419
#20 0x000055555576d77d in PyRun_AnyFileExFlags () at /tmp/build/80754af9/python_1540319457073/work/Python/pythonrun.c:81
#21 0x00005555557711b0 in run_file (p_cf=0x7fffffffd8dc, filename=0x5555558ac310 L"test.py", fp=0x55555593a6d0) at /tmp/build/80754af9/python_1540319457073/work/Modules/main.c:340                               
#22 Py_Main () at /tmp/build/80754af9/python_1540319457073/work/Modules/main.c:811
#23 0x0000555555638b4e in main () at /tmp/build/80754af9/python_1540319457073/work/Programs/python.c:69
#24 0x00007ffff7820b35 in __libc_start_main () from /usr/lib64/libc.so.6
#25 0x000055555571a1a8 in _start () at ../sysdeps/x86_64/elf/start.S:103
(gdb) 

I've installed gcc 5.2 with conda (as I don't have root permissions, can't install it with sudo yum install.. command) and looks like multicrop is trying to use system's gcc which is 4.8.2.

pyaf commented 5 years ago

Recloned the repo, reinstalled it and it worked. -_-