Repository navigation
Closed
Closed
Copy link
Labels
Description
It's been seen so far (October 13) in 2 runs over 13 runs (see scheduled Wheels runs):
- Python 3.12 build log
- Python 3.14 see build log from ⚠️ CI failed on Wheel builder (last failure: Jul 21, 2026) ⚠️ #32393 (comment)
The information is similar in both cases seems to point the finger at
sklearn\tree\tests\test_monotonic_tree.py", line 511 in test_nd_tree_nodes_values
Relevant part of the build log:
tests\test_random_projection.py ........................................ [ 88%]
........................................................................ [ 88%]
........................................................................ [ 88%]
....................................................... [ 88%]
tree\tests\test_export.py ..........sssss [ 88%]
tree\tests\test_monotonic_tree.py ...................................... [ 88%]
........................................................................ [ 89%]
Windows fatal exception: access violation
Thread 0x0000187c (most recent call first):
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\threading.py", line 369 in wait
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\joblib\externals\loky\backend\queues.py", line 147 in _feed
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\threading.py", line 1023 in run
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\threading.py", line 1081 in _bootstrap_inner
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\threading.py", line 1043 in _bootstrap
Thread 0x0000067c (most recent call first):
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\multiprocessing\connection.py", line 1045 in _exhaustive_wait
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\multiprocessing\connection.py", line 1113 in wait
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\joblib\externals\loky\process_executor.py", line 681 in wait_result_broken_or_wakeup
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\joblib\externals\loky\process_executor.py", line 623 in run
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\threading.py", line 1081 in _bootstrap_inner
File "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.14.0-rc3\tools\Lib\threading.py", line 1043 in _bootstrap
Current thread 0x00000730 (most recent call first):
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\sklearn\tree\_classes.py", line 475 in _fit
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\sklearn\tree\_classes.py", line 1407 in fit
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\sklearn\base.py", line 1336 in wrapper
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\sklearn\tree\tests\test_monotonic_tree.py", line 511 in test_nd_tree_nodes_values
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\python.py", line 157 in pytest_pyfunc_call
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\python.py", line 1671 in runtest
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\runner.py", line 178 in pytest_runtest_call
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\runner.py", line 246 in <lambda>
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\runner.py", line 344 in from_call
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\runner.py", line 245 in call_and_report
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\runner.py", line 136 in runtestprotocol
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\runner.py", line 117 in pytest_runtest_protocol
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\main.py", line 367 in pytest_runtestloop
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\main.py", line 343 in _main
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\main.py", line 289 in wrap_session
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\main.py", line 336 in pytest_cmdline_main
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\config\__init__.py", line 175 in main
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Lib\site-packages\_pytest\config\__init__.py", line 201 in console_main
File "C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk\cp314-win_arm64\venv-test\Scripts\pytest.exe\__main__.py", line 6 in <module>
File "<frozen runpy>", line 88 in _run_code
File "<frozen runpy>", line 198 in _run_module_as_main
Current thread's C stack trace (most recent call first):
<cannot get C stack on this system>
C:\a\scikit-learn\scikit-learn/build_tools/github/test_windows_wheels.sh: line 38: 833 Segmentation fault pytest --pyargs sklearn
Warning: cibuildwheel: Can't delete temporary folder 'C:\Users\runneradmin\AppData\Local\Temp\cibw-run-mc25gkqk'
Error: cibuildwheel: Command bash C:\a\scikit-learn\scikit-learn/build_tools/github/test_windows_wheels.sh 314 C:\a\scikit-learn\scikit-learn win_arm64 failed with code 139.
............................::endgroup::Testing wheel...
cc @khmyznikov and @vask2108 who did the work of adding Windows arm64 wheels: #31867. Maybe you have seen similar things in other packages and/or you would be willing to help debug this?
Activity
[-]CI Intermittent segmentation fault in Windows arm64 cp314t (free-threaded)[/-][+]CI Intermittent segmentation fault in Windows arm64 cp314t (free-threaded) wheels[/+][-]CI Intermittent segmentation fault in Windows arm64 cp314t (free-threaded) wheels[/-][+]CI Intermittent segmentation fault in Windows arm64 wheels test[/+]vask2108 commentedon Oct 13, 2025
@lesteve
No. I have to seen this issue before, I can analyse and come back in a day or two with some understanding.
lesteve commentedon Oct 13, 2025
Thanks @vask2108! I guess this one (the vanilla Python rather than the free-threaded Python 3.13 ) has a higher priority than the free-threaded specific one #32492.
Maybe both have the same root cause, who knows ...
[-]CI Intermittent segmentation fault in Windows arm64 wheels test[/-][+]CI Intermittent segmentation fault in Windows arm64 wheels test (vanilla CPython)[/+]ogrisel commentedon Oct 13, 2025
Note that this test relies on the
global_random_seedfixture, and our nightly run will try different seed values between 0 and 99 each night. It's possible to run that test for all admissible seeds by setting theSKLEARN_TESTS_GLOBAL_RANDOM_SEEDenvironment variable to the"all"value and then runpytest -vlk test_nd_tree_nodes_values.ogrisel commentedon Oct 13, 2025
BTW, maybe we should run pytest with the
-vflag to display the seed value in the test name before failure.lesteve commentedon Oct 14, 2025
Good point, but I don't think wheels are using the global random seed, it's only for Azure CI right now.
git grep
vask2108 commentedon Oct 16, 2025
@ogrisel
I have tried reproducing this issue in my windows arm laptop. But I could NOT reproduce it unfortunately. I tried 100s of times in a loop giving Random seed 0 to 99. But issue not reproduced. However, I see same issues happens in CI. But for some reason I can't run same command CI. CI not able to run this command pytest -vlk test_nd_tree_nodes_values for some reason.
Is there any suggestion you have for me for further test with any specific parameters.
(sklearn314-env) C:\Users\User\source\repos\scikit-learn>(
echo ==== Run #98 with seed 98 ====
set SKLEARN_TESTS_GLOBAL_RANDOM_SEED=98 && python -m pytest -vlk test_nd_tree_nodes_values
)
==== Run #98 with seed 98 ====
============================================================================================= test session starts ==============================================================================================
platform win32 -- Python 3.14.0, pytest-8.4.2, pluggy-1.6.0 -- C:\Users\User\source\repos\scikit-learn\sklearn314-env\Scripts\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\User\source\repos\scikit-learn
configfile: pyproject.toml
testpaths: sklearn
collected 41411 items / 41395 deselected / 1 skipped / 16 selected
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-True--1-DecisionTreeRegressor] PASSED [ 6%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-True--1-ExtraTreeRegressor] PASSED [ 12%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-True-1-DecisionTreeRegressor] PASSED [ 18%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-True-1-ExtraTreeRegressor] PASSED [ 25%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-False--1-DecisionTreeRegressor] PASSED [ 31%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-False--1-ExtraTreeRegressor] PASSED [ 37%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-False-1-DecisionTreeRegressor] PASSED [ 43%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-absolute_error-False-1-ExtraTreeRegressor] PASSED [ 50%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-True--1-DecisionTreeRegressor] PASSED [ 56%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-True--1-ExtraTreeRegressor] PASSED [ 62%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-True-1-DecisionTreeRegressor] PASSED [ 68%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-True-1-ExtraTreeRegressor] PASSED [ 75%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-False--1-DecisionTreeRegressor] PASSED [ 81%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-False--1-ExtraTreeRegressor] PASSED [ 87%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-False-1-DecisionTreeRegressor] PASSED [ 93%]
sklearn/tree/tests/test_monotonic_tree.py::test_nd_tree_nodes_values[98-squared_error-False-1-ExtraTreeRegressor] PASSED [100%]
========================================================================= 16 passed, 1 skipped, 41395 deselected, 32 warnings in 8.82s =========================================================================
ogrisel commentedon Oct 16, 2025
Maybe running a single test in isolation is not enough to trigger the segfault conditions. Can you maybe try to run all the tests of the sklearn/tree package instead?
39 remaining items
khmyznikov commentedon Nov 12, 2025
@lesteve Thanks for keeping track of this! Vasanth's had a tough few weeks, looks like he lost his position and no longer has access to ARM hardware. I've reached out to another partner for support, and we’ll keep you updated, hopefully we’ll have something by next week. Please remain the support, I know how flaky CI could be annoying but I hope we can figure this out.
lesteve commentedon Nov 13, 2025
OK thanks! I completely understand that real life can get in the way.
My main goal was to make scikit-learn maintainers' position explicit.
khmyznikov commentedon Nov 13, 2025
@lesteve thanks for making your position clear. That's something we sometimes miss from other maintainers.
fix segfault win_arm scikit-learn#32491
khmyznikov commentedon Nov 21, 2025
@lesteve ended up with this fix, not sure if it's suitable. But I don't see the issue anymore on my end with that.
da-woods commentedon Nov 22, 2025
Looking at the bug, I think an address sanitizer build would be worthwhile - the bug doesn't look specific to Windows ARM (even if the exact failure it triggers probably is), so it might well have been detectable on other platforms with address sanitizer.
khmyznikov commentedon Nov 23, 2025
@da-woods Not sure if I understood you correctly. Are you suggesting that something needs to be added to the PR? Could you clarify?
da-woods commentedon Nov 24, 2025
No. I'm not suggested that. It was a general suggestion for the future and not specific to your PR
lesteve commentedon Nov 24, 2025
Interestingly I tried to see if this issue was still happening in #32764 and it did not happen a single time in ~20 runs. I am pretty sure it used to happen a lot more, like maybe 1 in every 3-5 runs.
Not sure what has changed to be honest, part of me would really like to know but the other part is busy with more important things 😅.
Thanks a lot everyone for your work and inputs, I really appreciated it 🙏. I am going to close this one for now, but we can always reopen if it starts happening again.
The ASAN suggestion also seems like an interesting direction (full disclosure: I know little about it 😅), see #32491 (comment) for more details.
cakedev0 commentedon Nov 24, 2025
It's likely thanks to #32100 being merged two weeks ago, it rewrote the whole MAE criterion, and the previous one was slightly buggy (see #10725).
khmyznikov commentedon Nov 25, 2025
@lesteve do you know when we'll actually see the wheels on pypy? 😊
lesteve commentedon Nov 25, 2025
This could indeed fit in terms of timing, the PR was merged on November 12 and the last time we were discussing the issue is end October.
lesteve commentedon Nov 25, 2025
To be honest it could also be a Cython 3.2 release which happened on November 5, who knows (cython latest versions is always used for wheels). The last CI segmentation fault I could find (daily schedule on
main) was in October 29th see build log.lesteve commentedon Nov 25, 2025
If things go according to plan 1, we aim at releasing scikit-learn 1.8 some time in December.
Footnotes
sometimes they don't for a variety of reasons ... ↩