Segmentation fault with free-threaded in `test_gpr_correct_error_message`
Author: lesteveCreated Feb 6, 2026Updated Sep 28, 2026
LabelsBugfree-threading
Noticed in https://github.com/scikit-learn/scikit-learn/pull/33221 see build log
gaussian_process/tests/test_gpc.py ····································· [ 15%]
······ [ 15%]
gaussian_process/tests/test_gpr.py ····································· [ 15%]
Fatal Python error: Segmentation fault
<Cannot show all threads while the GIL is disabled>
Stack (most recent call first):
File "/home/runner/work/scikit-learn/scikit-learn/sklearn/gaussian_process/kernels.py", line 280 in hyperparameters
File "/home/runner/work/scikit-learn/scikit-learn/sklearn/gaussian_process/kernels.py", line 301 in theta
File "/home/runner/work/scikit-learn/scikit-learn/sklearn/gaussian_process/kernels.py", line 273 in n_dims
File "/home/runner/work/scikit-learn/scikit-learn/sklearn/gaussian_process/_gpr.py", line 302 in fit
File "/home/runner/work/scikit-learn/scikit-learn/sklearn/base.py", line 1347 in wrapper
File "/home/runner/work/scikit-learn/scikit-learn/sklearn/gaussian_process/tests/test_gpr.py", line 430 in test_gpr_correct_error_message
File "/home/runner/miniconda3/envs/testvenv/lib/python3.14t/site-packages/pytest_run_parallel/plugin.py", line 80 in closure
File "/home/runner/miniconda3/envs/testvenv/lib/python3.14t/threading.py", line 1024 in run
File "/home/runner/miniconda3/envs/testvenv/lib/python3.14t/threading.py", line 1082 in _bootstrap_inner
File "/home/runner/miniconda3/envs/testvenv/lib/python3.14t/threading.py", line 1044 in _bootstrap
Current thread's C stack trace (most recent call first):
Binary file "python", at _Py_DumpStack+0x4a [0x55af10bf2982]
Binary file "python", at +0x16a1a8 [0x55af10bfd1a8]
Binary file "/lib/x86_64-linux-gnu/libc.so.6", at +0x45330 [0x7f8384445330]
Binary file "python", at +0x18b5a0 [0x55af10c1e5a0]
Binary file "python", at +0x1921b0 [0x55af10c251b0]
Binary file "python", at +0x1907bb [0x55af10c237bb]
Binary file "python", at +0x19e926 [0x55af10c31926]
Binary file "python", at +0x2e84fc [0x55af10d7b4fc]
Binary file "python", at +0x2e857f [0x55af10d7b57f]
Binary file "python", at +0x2e7c61 [0x55af10d7ac61]
Binary file "python", at +0x19b967 [0x55af10c2e967]
Binary file "python", at PyObject_Dir+0x44 [0x55af10d57354]
Binary file "python", at +0x2c42e6 [0x55af10d572e6]
Binary file "python", at +0x1e21d9 [0x55af10c751d9]
Binary file "python", at _PyObject_MakeTpCall+0x3fb [0x55af10c3347b]
Binary file "python", at _PyEval_EvalFrameDefault+0x14e1 [0x55af10c4cba1]
Binary file "python", at +0x1ef6db [0x55af10c826db]
Binary file "python", at PyObject_CallOneArg+0x58 [0x55af10c8a498]
Binary file "python", at _PyObject_GenericGetAttrWithDict+0x32d [0x55af10c739cd]
Binary file "python", at PyObject_GetAttr+0x44 [0x55af10c37004]
Binary file "python", at _PyEval_EvalFrameDefault+0x1133 [0x55af10c4c7f3]
Binary file "python", at +0x1ef6db [0x55af10c826db]
Binary file "python", at PyObject_CallOneArg+0x58 [0x55af10c8a498]
Binary file "python", at _PyObject_GenericGetAttrWithDict+0x32d [0x55af10c739cd]
Binary file "python", at PyObject_GetAttr+0x44 [0x55af10c37004]
Binary file "python", at _PyEval_EvalFrameDefault+0x1133 [0x55af10c4c7f3]
Binary file "python", at +0x1ef6db [0x55af10c826db]
Binary file "python", at PyObject_CallOneArg+0x58 [0x55af10c8a498]
Binary file "python", at _PyObject_GenericGetAttrWithDict+0x32d [0x55af10c739cd]
Binary file "python", at PyObject_GetAttr+0x44 [0x55af10c37004]
Binary file "python", at _PyEval_EvalFrameDefault+0x1133 [0x55af10c4c7f3]
Binary file "python", at +0x1b5100 [0x55af10c48100]
<truncated rest of calls>
Extension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, sklearn.__check_build._check_build, cython.cimports.libc.math, _cyutility, scipy._cyutility, scipy._lib._ccallback_c, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._pcg64, numpy.random._generator, numpy.random._mt19937, numpy.random._philox, numpy.random._sfc64, numpy.random.mtrand, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.special._ufuncs_cxx, scipy.special._ellip_harm_2, scipy.special._special_ufuncs, scipy.special._gufuncs, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._batched_linalg, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_schur_sqrtm, scipy.linalg._matfuncs_expm, scipy.linalg._linalg_pythran, scipy.linalg.cython_blas, scipy.linalg._decomp_update, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpacklib, scipy.sparse.linalg._propack, scipy.spatial._ckdtree, scipy._lib.messagestream, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._hausdorff, scipy.spatial._distance_wrap, scipy.spatial.transform._rotation_cy, scipy.spatial.transform._rigid_transform_cy, scipy.optimize._group_columns, scipy.optimize._trlib._trlib, scipy.optimize._lbfgsb, _moduleTNC, scipy.optimize._moduleTNC, scipy.optimize._slsqplib, scipy.optimize._minpack, scipy.optimize._lsq.givens_elimination, scipy.optimize._zeros, scipy._lib._uarray._uarray, scipy.linalg._decomp_interpolative, scipy.optimize._bglu_dense, scipy.optimize._lsap, scipy.optimize._direct, scipy.integrate._odepack, scipy.integrate._quadpack, scipy.integrate._vode, scipy.integrate._dop, scipy.interpolate._fitpack, scipy.interpolate._dfitpack, scipy.interpolate._dierckx, scipy.interpolate._ppoly, scipy.interpolate._interpnd, scipy.interpolate._rbfinterp_pythran, scipy.interpolate._rgi_cython, scipy.special.cython_special, scipy.stats._stats, scipy.stats._biasedurn, scipy.stats._stats_pythran, scipy.stats._levy_stable.levyst, scipy.stats._ansari_swilk_statistics, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.stats._sobol, scipy.stats._qmc_cy, scipy.stats._rcont.rcont, scipy.stats._qmvnt_cy, scipy.ndimage._nd_image, scipy.ndimage._rank_filter_1d, _ni_label, scipy.ndimage._ni_label, sklearn._cyutility, sklearn.utils._isfinite, sklearn.utils.sparsefuncs_fast, sklearn.utils.murmurhash, sklearn.utils._openmp_helpers, sklearn.preprocessing._csr_polynomial_expansion, sklearn.preprocessing._target_encoder_fast, scipy.io.matlab._mio_utils, scipy.io.matlab._streams, scipy.io.matlab._mio5_utils, sklearn.datasets._svmlight_format_fast, sklearn.utils._random, sklearn.utils._vector_sentinel, sklearn.feature_extraction._hashing_fast, _loss, sklearn._loss._loss, sklearn.metrics.cluster._expected_mutual_info_fast, sklearn.metrics._dist_metrics, sklearn.metrics._pairwise_distances_reduction._datasets_pair, sklearn.utils._cython_blas, sklearn.metrics._pairwise_distances_reduction._base, sklearn.metrics._pairwise_distances_reduction._middle_term_computer, sklearn.utils._heap, sklearn.utils._sorting, sklearn.metrics._pairwise_distances_reduction._argkmin, sklearn.metrics._pairwise_distances_reduction._argkmin_classmode, sklearn.metrics._pairwise_distances_reduction._radius_neighbors, sklearn.metrics._pairwise_distances_reduction._radius_neighbors_classmode, sklearn.metrics._pairwise_fast, sklearn.utils._fast_dict, sklearn.cluster._hierarchical_fast, sklearn.cluster._k_means_common, sklearn.cluster._k_means_elkan, sklearn.cluster._k_means_lloyd, sklearn.cluster._k_means_minibatch, sklearn.cluster._dbscan_inner, sklearn.neighbors._partition_nodes, sklearn.neighbors._ball_tree, sklearn.neighbors._kd_tree, sklearn.utils.arrayfuncs, sklearn.utils._seq_dataset, sklearn.linear_model._cd_fast, sklearn.linear_model._sag_fast, sklearn.svm._liblinear, sklearn.svm._libsvm, sklearn.svm._libsvm_sparse, sklearn.utils._weight_vector, sklearn.linear_model._sgd_fast, sklearn.decomposition._online_lda_fast, sklearn.decomposition._cdnmf_fast, sklearn.cluster._hdbscan._tree, sklearn.cluster._hdbscan._linkage, sklearn.cluster._hdbscan._reachability, sklearn._isotonic, sklearn.tree._utils, sklearn.tree._tree, sklearn.tree._partitioner, sklearn.tree._splitter, sklearn.tree._criterion, sklearn.neighbors._quad_tree, sklearn.manifold._barnes_hut_tsne, sklearn.manifold._utils, scipy.cluster._vq, scipy.cluster._hierarchy, scipy.cluster._optimal_leaf_ordering, sklearn.ensemble._gradient_boosting, sklearn.ensemble._hist_gradient_boosting.common, sklearn.ensemble._hist_gradient_boosting._gradient_boosting, sklearn.ensemble._hist_gradient_boosting._binning, sklearn.ensemble._hist_gradient_boosting._bitset, sklearn.ensemble._hist_gradient_boosting.histogram, sklearn.ensemble._hist_gradient_boosting._predictor, sklearn.ensemble._hist_gradient_boosting.splitting, sklearn.svm._newrand, sklearn.utils._typedefs (total: 170)
build_tools/azure/test_script.sh: line 92: 3809 Segmentation fault (core dumped) python -m pytest --showlocals --durations=20 --junitxml=test-data.xml -o junit_family=legacy --parallel-threads 4 --iterations 1 --pyargs sklearn
···········································
Error: Process completed with exit code 139.Source: scikit-learn/scikit-learn