Skip to content

Commit 74c0c77

Browse files
committed
Provision CPython 3.15.0b4 instead of 3.15.0b1 for validation
`import torch` segfaults with every published cp315 wheel under the 3.15.0b1 build. The crash is pybind11 3.0.4's gil_scoped_acquire teardown in python_tracer::init(), reached from torch._C._autograd_init(): THPAutograd_initExtension -> python_tracer::init() -> ~gil_scoped_acquire() -> dec_ref() -> PyThreadState_Clear -> SIGSEGV The same wheel imports and runs cleanly under 3.15.0b4, so bump the pin. This is what has been failing every Linux and aarch64 3.15 leg.
1 parent 4a4cab0 commit 74c0c77

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

.github/scripts/validate_binaries.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ get_python_config() {
2828
CONDA_EXTRA_PARAM=" -c conda-forge/label/python_rc -c conda-forge"
2929
;;
3030
# Note: 3.15 / 3.15t are intentionally absent here. They are provisioned
31-
# via uv (CPython 3.15.0b1) in the interpreter-setup branch below and
31+
# via uv (CPython 3.15.0b4) in the interpreter-setup branch below and
3232
# never reach the conda create path that reads CONDA_EXTRA_PARAM.
3333
*)
3434
PYTHON_V=${MATRIX_PYTHON_VERSION}
@@ -321,19 +321,24 @@ fi
321321

322322
# Setup the Python environment.
323323
#
324-
# Python 3.15 is still pre-release. The cp315/cp315t wheels are built against
325-
# CPython 3.15.0b1 (see pytorch .ci/docker/common/install_cpython.sh), but
326-
# conda-forge only ships 3.15.0a8 -- the pre-release ABI differs, so installing
327-
# the wheel under the conda interpreter segfaults on "import torch". Provision
328-
# the matching 3.15.0b1 interpreter with uv (from python-build-standalone)
324+
# Python 3.15 is still pre-release, and conda-forge's default channel does not
325+
# carry it, so provision the interpreter with uv (from python-build-standalone)
329326
# instead of conda. A --seed venv provides pip so the rest of the flow (pip3
330327
# install, smoke tests) is unchanged.
328+
#
329+
# Pin b4, NOT b1: `import torch` segfaults under the 3.15.0b1 build. The crash is
330+
# pybind11 3.0.4's gil_scoped_acquire teardown in python_tracer::init(), reached
331+
# from torch._C._autograd_init():
332+
# THPAutograd_initExtension -> python_tracer::init()
333+
# -> ~gil_scoped_acquire() -> dec_ref() -> PyThreadState_Clear -> SIGSEGV
334+
# Verified with the cp315 nightly on both interpreters: b1 segfaults, b4 imports
335+
# and runs (matmul/autograd, and 3.15t with the GIL genuinely disabled).
331336
USING_UV_VENV="no"
332337
if [[ ${MATRIX_PYTHON_VERSION} == "3.15" || ${MATRIX_PYTHON_VERSION} == "3.15t" ]]; then
333338
USING_UV_VENV="yes"
334-
UV_PYTHON="3.15.0b1"
339+
UV_PYTHON="3.15.0b4"
335340
if [[ ${MATRIX_PYTHON_VERSION} == "3.15t" ]]; then
336-
UV_PYTHON="3.15.0b1+freethreaded"
341+
UV_PYTHON="3.15.0b4+freethreaded"
337342
fi
338343
curl -LsSf https://astral.sh/uv/install.sh | sh
339344
source "${HOME}/.local/bin/env"

0 commit comments

Comments
 (0)