question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.22.1 test_stacking ends with Bus error on ARMv7 arch (Python 3.5)

See original GitHub issue

Describe the bug

Running standard test suite for Scikit-learn 0.22.1 on ARMv7 architecture for Ubuntu 16.04 (Python 3.5) results in fatal bus error.

# scikit_learn-0.22.1-cp35-cp35m-linux_armv7l.whl
> pytest -v /usr/local/lib/python3.5/dist-packages/sklearn
========================= test session starts =========================
platform linux -- Python 3.5.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /usr/local/lib/python3.5/dist-packages/sklearn
collected 14072 items / 3 skipped / 14069 selected

...

../../../../usr/local/lib/python3.5/dist-packages/sklearn/ensemble/tests/test_stacking.py::test_check_estimators_stacking_estimator[StackingClassifier] PASSED                                              [ 11%]
../../../../usr/local/lib/python3.5/dist-packages/sklearn/ensemble/tests/test_stacking.py::test_check_estimators_stacking_estimator[StackingRegressor] Fatal Python error: Bus error

Thread 0xa7fff470 (most recent call first):
  File "/usr/lib/python3.5/threading.py", line 293 in wait
  File "/usr/local/lib/python3.5/dist-packages/joblib/externals/loky/backend/queues.py", line 138 in _feed
  File "/usr/lib/python3.5/threading.py", line 862 in run
  File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
  File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap

Thread 0xa892f470 (most recent call first):
  File "/usr/lib/python3.5/selectors.py", line 376 in select
  File "/usr/lib/python3.5/multiprocessing/connection.py", line 911 in wait
  File "/usr/local/lib/python3.5/dist-packages/joblib/externals/loky/process_executor.py", line 615 in _queue_management_worker
  File "/usr/lib/python3.5/threading.py", line 862 in run
  File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
  File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap

Current thread 0xb6ff6300 (most recent call first):
  File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/_classes.py", line 367 in fit
  File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/_classes.py", line 1225 in fit
  File "/usr/local/lib/python3.5/dist-packages/sklearn/ensemble/_base.py", line 36 in _parallel_fit_estimator
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 256 in <listcomp>
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 256 in __call__
  File "/usr/local/lib/python3.5/dist-packages/joblib/_parallel_backends.py", line 590 in __init__
  File "/usr/local/lib/python3.5/dist-packages/joblib/_parallel_backends.py", line 209 in apply_async
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 754 in _dispatch
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 835 in dispatch_one_batch
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 1007 in __call__
  File "/usr/local/lib/python3.5/dist-packages/sklearn/ensemble/_stacking.py", line 141 in fit
  File "/usr/local/lib/python3.5/dist-packages/sklearn/ensemble/_stacking.py", line 643 in fit
  File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/estimator_checks.py", line 2201 in check_regressors_train
  File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/_testing.py", line 327 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/estimator_checks.py", line 427 in check_estimator
  File "/usr/local/lib/python3.5/dist-packages/sklearn/ensemble/tests/test_stacking.py", line 382 in test_check_estimators_stacking_estimator
  File "/usr/local/lib/python3.5/dist-packages/_pytest/python.py", line 167 in pytest_pyfunc_call
  File "/usr/local/lib/python3.5/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 87 in <lambda>
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/lib/python3.5/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/lib/python3.5/dist-packages/_pytest/python.py", line 1445 in runtest
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 134 in pytest_runtest_call
  File "/usr/local/lib/python3.5/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 87 in <lambda>
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/lib/python3.5/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 210 in <lambda>
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 237 in from_call
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 210 in call_runtest_hook
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 185 in call_and_report
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 99 in runtestprotocol
  File "/usr/local/lib/python3.5/dist-packages/_pytest/runner.py", line 84 in pytest_runtest_protocol
  File "/usr/local/lib/python3.5/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 87 in <lambda>
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/lib/python3.5/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/lib/python3.5/dist-packages/_pytest/main.py", line 271 in pytest_runtestloop
  File "/usr/local/lib/python3.5/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 87 in <lambda>
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/lib/python3.5/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/lib/python3.5/dist-packages/_pytest/main.py", line 247 in _main
  File "/usr/local/lib/python3.5/dist-packages/_pytest/main.py", line 197 in wrap_session
  File "/usr/local/lib/python3.5/dist-packages/_pytest/main.py", line 240 in pytest_cmdline_main
  File "/usr/local/lib/python3.5/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 87 in <lambda>
  File "/usr/local/lib/python3.5/dist-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/lib/python3.5/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/lib/python3.5/dist-packages/_pytest/config/__init__.py", line 93 in main
  File "/usr/local/bin/pytest", line 8 in <module>
Bus error

Versions

System: python: 3.5.2 (default, Oct 8 2019, 13:06:37) [GCC 5.4.0 20160609] machine: Linux-3.8.13.30-armv7l-with-Ubuntu-16.04-xenial executable: /usr/bin/python3

Python dependencies: matplotlib: None scipy: 1.4.1 (test suite run without failures) numpy: 1.18.1 (test suite run without failures) pip: 20.0.2 sklearn: 0.22.1 setuptools: 45.2.0 pandas: None Cython: None (was installed latest from pip and deleted after building scikit-learn) joblib: 0.14.1

Built with OpenMP: True

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ckastnercommented, Aug 8, 2020

Here you go:

pytest sklearn/tests/test_common.py -k DecisionTreeClassifier

produces

============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-4.6.11, py-1.8.1, pluggy-0.13.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/ckk/scikit-learn-0.23.1, inifile: setup.cfg
collecting ... collected 6609 items / 6563 deselected / 46 selected

sklearn/tests/test_common.py::test_parameters_default_constructible[DecisionTreeClassifier-DecisionTreeClassifier] SKIPPED [  2%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_no_attributes_set_in_init] PASSED [  4%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_dtypes] PASSED [  6%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_fit_score_takes_y] PASSED [  8%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_sample_weights_pandas_series] PASSED [ 10%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_sample_weights_not_an_array] PASSED [ 13%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_sample_weights_list] PASSED [ 15%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_sample_weights_shape] PASSED [ 17%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_sample_weights_invariance] PASSED [ 19%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_fit_returns_self] PASSED [ 21%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_fit_returns_self(readonly_memmap=True)] PASSED [ 23%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_complex_data] PASSED [ 26%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_dtype_object] PASSED [ 28%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_empty_data_messages] PASSED [ 30%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_pipeline_consistency] PASSED [ 32%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_nan_inf] PASSED [ 34%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_overwrite_params] PASSED [ 36%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimator_sparse_data] PASSED [ 39%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_pickle] PASSED [ 41%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifier_data_not_an_array] PASSED [ 43%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifiers_one_label] PASSED [ 45%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifiers_classes] PASSED [ 47%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_estimators_partial_fit_n_features] PASSED [ 50%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifier_multioutput] PASSED [ 52%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifiers_train] PASSED [ 54%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifiers_train(readonly_memmap=True)] PASSED [ 56%]
sklearn/tests/test_common.py::test_estimators[DecisionTreeClassifier()-check_classifiers_train(readonly_memmap=True,X_dtype=float32)] Bus error

(edit: I accidentally dropped the ‘Bus error’ from output, sorry)

0reactions
ckastnercommented, Feb 16, 2022

@noloader, the last build on PowerPC doesn’t seem related to SIGBUS though? There’s just one test failure not related to the above. SIGBUS seems to be an issue only on 32-bit ARM.

In any case, I agree that it’s probably an alignment issue, and @glaubitz already discovered a build process issue that needs to be fixed first. If that doesn’t resolve the issue, then it’s time to follow the steps you outlined above (thanks!)

Read more comments on GitHub >

github_iconTop Results From Across the Web

PCIe Bus error when booting Archiso and when using wifi-menu
Try this steps: cp /etc/default/grub ~/Desktop. Edit grub. Add pci=noaer or pci=nommconf at the end of GRUB_CMDLINE_LINUX_DEFAULT .
Read more >
neovim 0.8.0 crash on armv7l - Arch Linux ARM • View topic
I am getting a crash on the just newly released neovim 0.8.1 : Code: Select all: % nvim zsh: bus error (core dumped)...
Read more >
python - How to determine the cause for "BUS-Error"
Bus errors are generally caused by applications trying to access memory that hardware cannot physically address.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found