-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Pytest gives segmentation fault on fresh clone #17582
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
Comments
Thanks for the report. Could you please re-run pytest with the |
It seems like its failing in
Full output: pytest-v__output.txt |
@NeilBotelho Are you running on an ARM architecture? |
No. I've got an AMD A6-7310 |
May be related to misaligned arrays in joblib (joblib/joblib#563). Numpy checks for misaligned data in every function, so it is not a problem in most estimators, but C expects arrays to be aligned to a multiple of their size. NuSVC might directly call C code, hence the segfault. import numpy as np
def create_memmap_backed_data(data):
import os.path
import tempfile
import joblib
temp_folder = tempfile.mkdtemp(prefix='testing_')
filename = os.path.join(temp_folder, 'data.pkl')
joblib.dump(data, filename)
return joblib.load(filename, mmap_mode='r')
y = create_memmap_backed_data(np.random.randn(20, 1))
print(y.flags['ALIGNED']) |
I have the same issue where I have scipy version 1.6.2
|
It might be related to the version of the C/C++ compiler used to build scikit-learn compiled extensions, in particular the vendored libsvm C++ code. @Hedaia-Ghannam-2020 @NeilBotelho could you please tell us which compiler and which version did you use to reproduce this segfault? |
It would also be interesting to get the pytest log when pytest is run with the |
The memmap aligned issue in the tests suite is now fixed in |
Describe the bug
on running pytest on a fresh clone of the scikit-learn repository in a virtual env(properly setup), I get
Steps/Code to Reproduce
pip install -e
in the scikit-learn repo.Platform:
Debian 10
4gb RAM
python 3.7
Expected Results
pytest runs without error (or one or two known errors)
Actual Results
pytest throws a segmentation fault.
The traceback is as follows:
Traceback
I've also uploaded the entire output of running the pytest command(as it is too long to paste in the issue) here:
pytest_output.txt
The text was updated successfully, but these errors were encountered: