-
Notifications
You must be signed in to change notification settings - Fork 6
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
Reopen the issue: sporco_cuda/tests/test_cbpdn.py *** stack smashing detected ***: python terminated #7
Comments
My environment is; ubuntu 16.04 Thank you. |
Could you try running the example scripts and report back on which ones work and which don't? |
I tried out your updated setup.py for #8 to the first machine showing on this #7 but still see the error with the same "stack smashing detected" in python setup.py test: (root) sekigh@04f0dd606f61:~/Windowsfolder/sporco-cuda$ python setup.py test sporco_cuda/tests/test_cbpdn.py *** stack smashing detected ***: python terminated Thread 0x00007f358a2d4700 (most recent call first): Current thread 0x00007f359d225700 (most recent call first): end of text |
The error log makes me suspect that this might actually be a problem in
|
I just read your response on #8. Could you please also summarize the differences between the environment in which |
Hi, As for the result to python examples/big_cbpdn.py on the machine #7, unfortunately I have "stack smash error" again as follows: (root) sekigh@04f0dd606f61: The differences between installation on two machines include: Machine 1 configuration for #7 issue: ubuntu 16.04 sporco installation by source build/test/install Machine 2 configuration for #8 issue: ubuntu 18.04 sporco installation by conda install end of text |
Just to confirm, Could you try using python 3.8 via conda (see the script |
That is right! Machine 2 works but machine 1 does not. My understanding is tools/install_conda.sh tries to install python3.8 based miniconda to the environment. Currently, I use pyenv/virtualenv. So I moved to sporco/tools directory and type: ./install_conda.sh /home/sekigh/.pyenv/versions where the new python 3.8 based environment successfully looks installed under /home/sekigh/.pyenv/versions. I see 3 new miniconda environments by pyenv versions; miniconda3 however, these three are all based on python 3.7.7 instead of 3.8. Is it OK ? python 3.8 may not be available for ubuntu16.04, because ubuntu 16.04 may be too old. Under miniconda3/envs/py38cu, I build/test/install sporco and sporco-cuda with source codes. Build works fine but test did not, showing *** stack smashing detected *** again. Full messages follow: (miniconda3/envs/py38cu) (base) sekigh@04f0dd606f61:~/Windowsfolder/sporco-cuda$ python setup.py test sporco_cuda/tests/test_cbpdn.py *** stack smashing detected ***: python terminated Thread 0x00007f6ce74c0700 (most recent call first): Current thread 0x00007f6cfa411700 (most recent call first): Moreover, python setup.py install is executed and try to run big_cbpdn.py again but failed again. (miniconda3/envs/py38cu) (base) sekigh@04f0dd606f61: end of text |
Strange that you end up with Python 3.7 instead of 3.8; I suppose it's related to your use of a virtualenv. I don't think it matters, though, since 3.7 is not very old. The Since the |
I double-checked python version used in py38cu and found it is 3.8.10 instead of 3.7.7. Therefore, it is reasonable. I delete previous sparco local repo and clone sporco rep again and run build/install from sporco source in environment py38cu. The results are not good; There two test results, one is cmp_cbpdn.py, and the other is big_cbpdn.py. The result of python ./examples/cmp_cbpdn.py shows cpu solver works fine but gpu solver fails. That is the opposite to your hypothesis. The result of python ./examples/big_cbpdn.py fails also. So gpu solver apparently fails. Find attached two execution logs below: (miniconda3/envs/py38cu) (base) sekigh@04f0dd606f61:~/Windowsfolder/sporco-cuda$ python ./examples/cmp_cbpdn.py
|
I have motivation to make sporco and sporco-cuda work properly on machine 1. That machine has two gpus for higher computation power compared with machine2, which has only one gpu. After solving #7 properly, I must consider how to combine gpu-based sporco capability with existing scripts based on tensorflow-gpu or pytorch-gpu to solve my problem efficiently. |
I found the way to work around *** stack smashing detected *** problem by changing installation method with trial and error. The workaround is the exact same way as one done for machine2, illustrating as;
Another weird phenomenon is when launching tests in the above 3) by eclipse debugger, you need to include as python library path /home/sekigh/.pyenv/versions/miniconda3/envs/py38cu/lib/python3.8/site-packages/sporco_cuda-0.0.6b1-py3.8-linux-x86_64.egg. Please make the installation procedure more robust and announce robust installation method on github pages. |
Thanks for your debugging efforts. I will certainly update the installation instructions if we can figure out which of the different steps you took made a critical difference. For example, is step 1. critical to getting it to work? How did you install sporco previously? From pypi, using pip? |
Now, "step 1 with conda install sporco" seems the most critical. The previous method replacing step 1 is; git clone https://github.com/bwohlberg/sporco.git After step 1, step 2 should be conducted. It seems that the step 2 with; git clone https://github.com/bwohlberg/sporco-cuda.git is successful without *** stack smashing detected *** errors, only after step 1 but not after the previous method replacing step 1. Interestingly, the major critical difference is that sporco_cuda-0.0.6b1-py3.8-linux-x86_64.egg is properly extracted to /home/sekigh/.pyenv/versions/miniconda3/envs/py38cu/lib/python3.8/site-packages in the former case but not in the second case. sporco_cuda-0.0.6b1-py3.8-linux-x86_64.egg has critical function to properly work. It is a critical clue for the reason why step1 and step2 works fine but the previous method not. The end of text |
So the only difference is whether you install sporco from the cloned repo (which leads to failure) or from conda (which leads to success)? I'm at a loss to explain this. |
Yes, that is right in short. My guess is that they are different somehow. |
What's really strange is that it's the installation method for sporco, and not sporco-cuda, that makes the difference. It's going to be difficult to add any guidance for the user to the documentation without understanding the underlying cause. |
My intuition to the cause to this problem is difference of sporco source scripts. I have no experience in making conda package from sources so I may be wrong. The source script produces sporco binary devian package version, sporco 0.2.0 py38h578d9bd_1 conda-forge, whereas, the source scripts shown on the sporco github produce different version, sporco 0.2.1. I observed these difference by conda list. Another point is that the former case lets sporco-cuda make sporco_cuda-0.0.6b1-py3.8-linux-x86_64.egg properly, whereas the latter case fails that egg. So *** stack smashing detected *** may happen. |
I have a problem similar to #3 (comment). Due to this I can not use cuda for sporco example script. How do I fix this ptoblem?
The error message is;
sporco_cuda/tests/test_cbpdn.py *** stack smashing detected ***: python terminated
Fatal Python error: Aborted
This happens when I ran
python setup.py test
during a process to build/test/install sporco-cuda by following installation instruction described in sporco-cuda 0.0.6b1 documentation,
git clone https://github.com/bwohlberg/sporco-cuda.git
cd sporco-cuda
export CUDAHOME=/usr/local/cuda-9.2
python setup.py build
python setup.py test
python setup.py install
Before running the above, I properly installed sporco and set up a symlink to sporco directory from the root directory of sporco-cuda.
See full error message attached below:
(anaconda3-2019.03) (base) sekigh@04f0dd606f61:~/Windowsfolder/sporco-cuda$ python setup.py test
running pytest
running egg_info
writing sporco_cuda.egg-info/PKG-INFO
writing dependency_links to sporco_cuda.egg-info/dependency_links.txt
writing requirements to sporco_cuda.egg-info/requires.txt
writing top-level names to sporco_cuda.egg-info/top_level.txt
reading manifest file 'sporco_cuda.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
writing manifest file 'sporco_cuda.egg-info/SOURCES.txt'
running build_ext
skipping 'sporco_cuda/util.c' Cython extension (up-to-date)
skipping 'sporco_cuda/cbpdn.c' Cython extension (up-to-date)
====================================== test session starts ======================================
platform linux -- Python 3.7.7, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/sekigh/Windowsfolder/sporco-cuda, configfile: pytest.ini, testpaths: sporco_cuda
collected 18 items
sporco_cuda/tests/test_cbpdn.py *** stack smashing detected ***: python terminated
Fatal Python error: Aborted
Thread 0x00007f3bc6d8e700 (most recent call first):
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pyfftw/interfaces/cache.py", line 224 in _run
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/threading.py", line 870 in run
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/threading.py", line 926 in _bootstrap_inner
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/threading.py", line 890 in _bootstrap
Current thread 0x00007f3bd9c5f700 (most recent call first):
File "/home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/tests/test_cbpdn.py", line 30 in test_01
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/python.py", line 183 in pytest_pyfunc_call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 87 in
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/python.py", line 1641 in runtest
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 162 in pytest_runtest_call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 87 in
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 255 in
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 311 in from_call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 255 in call_runtest_hook
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 215 in call_and_report
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 126 in runtestprotocol
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/runner.py", line 109 in pytest_runtest_protocol
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 87 in
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/main.py", line 348 in pytest_runtestloop
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 87 in
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/main.py", line 323 in _main
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/main.py", line 269 in wrap_session
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 87 in
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in call
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/_pytest/config/init.py", line 163 in main
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/ptr.py", line 220 in run_tests
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/ptr.py", line 209 in run
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/distutils/dist.py", line 985 in run_command
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/distutils/dist.py", line 966 in run_commands
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/distutils/core.py", line 148 in setup
File "/home/sekigh/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/setuptools/init.py", line 153 in setup
File "setup.py", line 290 in
Aborted (core dumped)
(anaconda3-2019.03) (base) sekigh@04f0dd606f61:~/Windowsfolder/sporco-cuda$
The end of sentences
The text was updated successfully, but these errors were encountered: