From bdf67a5314676b1a69f4a745b6f15af82e6d418c Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sat, 19 Sep 2026 18:18:28 +0100 Subject: [PATCH 1/5] Add tsan build --- cpython_sanity-3.14tsan/Dockerfile | 61 ++++++++++++++++++++++++++++++ cpython_sanity-3.14tsan/Makefile | 1 + cpython_sanity-3.14tsan/test.sh | 6 +++ cpython_sanity-3.14tsan/update.sh | 2 + 4 files changed, 70 insertions(+) create mode 100644 cpython_sanity-3.14tsan/Dockerfile create mode 120000 cpython_sanity-3.14tsan/Makefile create mode 100755 cpython_sanity-3.14tsan/test.sh create mode 100755 cpython_sanity-3.14tsan/update.sh diff --git a/cpython_sanity-3.14tsan/Dockerfile b/cpython_sanity-3.14tsan/Dockerfile new file mode 100644 index 00000000..a84c61f5 --- /dev/null +++ b/cpython_sanity-3.14tsan/Dockerfile @@ -0,0 +1,61 @@ +FROM ghcr.io/nascheme/cpython-tsan:3.14t + +RUN apt-get -qq update \ + && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + cmake \ + ghostscript \ + libavif-dev \ + libegl-dev \ + libfreetype6-dev \ + libfribidi-dev \ + libharfbuzz-dev \ + libimagequant-dev \ + libjpeg-turbo8-dev \ + liblcms2-dev \ + libopengl-dev \ + libopenjp2-7-dev \ + libssl-dev \ + libtiff5-dev \ + libwebp-dev \ + libxcb-cursor0 \ + libxcb-icccm4 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-randr0 \ + libxcb-render-util0 \ + libxcb-shape0 \ + libxkbcommon-x11-0 \ + meson \ + netpbm \ + python3-dev \ + python3-numpy \ + python3-setuptools \ + python3-tk \ + sudo \ + tcl8.6-dev \ + tk8.6-dev \ + virtualenv \ + wget \ + xvfb \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +ARG PIP_DISABLE_PIP_VERSION_CHECK=1 +ARG PIP_NO_CACHE_DIR=1 + +RUN /work/.pyenv/shims/python3 -mvenv /vpy3 \ + && /vpy3/bin/pip install --upgrade pip \ + && /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \ + && chown -R 1000:1000 /vpy3 + +COPY depends /depends +RUN cd /depends \ + && ./install_raqm.sh + +ENV FORCE_COLOR=1 +ENV PILLOW_TSAN_TEST=1 + +USER 1000 +CMD ["/depends/test.sh"] + +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/cpython_sanity-3.14tsan diff --git a/cpython_sanity-3.14tsan/Makefile b/cpython_sanity-3.14tsan/Makefile new file mode 120000 index 00000000..5e7b0e26 --- /dev/null +++ b/cpython_sanity-3.14tsan/Makefile @@ -0,0 +1 @@ +../Makefile.sub \ No newline at end of file diff --git a/cpython_sanity-3.14tsan/test.sh b/cpython_sanity-3.14tsan/test.sh new file mode 100755 index 00000000..9ad8252d --- /dev/null +++ b/cpython_sanity-3.14tsan/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install-tsan +/usr/bin/xvfb-run -a .ci/test.sh diff --git a/cpython_sanity-3.14tsan/update.sh b/cpython_sanity-3.14tsan/update.sh new file mode 100755 index 00000000..c2fde976 --- /dev/null +++ b/cpython_sanity-3.14tsan/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker pull ghcr.io/nascheme/cpython-tsan:3.14t From 1affd1172b395d4fe2d440fd8d9a4bc4d93d9af5 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Tue, 6 Oct 2026 11:30:16 +1100 Subject: [PATCH 2/5] Add space --- cpython_sanity-3.14tsan/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpython_sanity-3.14tsan/Dockerfile b/cpython_sanity-3.14tsan/Dockerfile index a84c61f5..3a955430 100644 --- a/cpython_sanity-3.14tsan/Dockerfile +++ b/cpython_sanity-3.14tsan/Dockerfile @@ -43,7 +43,7 @@ RUN apt-get -qq update \ ARG PIP_DISABLE_PIP_VERSION_CHECK=1 ARG PIP_NO_CACHE_DIR=1 -RUN /work/.pyenv/shims/python3 -mvenv /vpy3 \ +RUN /work/.pyenv/shims/python3 -m venv /vpy3 \ && /vpy3/bin/pip install --upgrade pip \ && /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \ && chown -R 1000:1000 /vpy3 From 65748f1b25f041a7ddc711927732406a2a1df893 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 6 Oct 2026 11:40:51 +1100 Subject: [PATCH 3/5] Test cpython_sanity-3.14tsan in CI --- .github/workflows/build.yml | 1 + Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e11ccc80..4dbd488d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,6 +35,7 @@ jobs: - "gentoo" - "ubuntu-24.04-noble-amd64" - "ubuntu-26.04-resolute-amd64" + - "cpython_sanity-3.14tsan" # has a dependency on the test image - "manylinux_2_28-wheel-build" include: diff --git a/Makefile b/Makefile index e332b400..6ddb02dc 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ TARGETS = \ arch \ centos-stream-9-amd64 \ centos-stream-10-amd64 \ + cpython_sanity-3.14tsan \ debian-13-trixie-x86 \ debian-13-trixie-amd64 \ fedora-43-amd64 \ From a19fd3c0be82cb7fa11da67643559c0316c1c5a3 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 7 Oct 2026 21:04:16 +0100 Subject: [PATCH 4/5] upstream pin with make install-tsan --- Pillow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pillow b/Pillow index bb1d8e8a..e62e2e96 160000 --- a/Pillow +++ b/Pillow @@ -1 +1 @@ -Subproject commit bb1d8e8ab8d29048624d96e3ee53cecf7c13d13d +Subproject commit e62e2e96984d0e239ea8ef10c25010a0acfe5d9a From 13a03d8357028c3d40acfe8dfe0c590c6fe5baa1 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 7 Oct 2026 21:48:49 +0100 Subject: [PATCH 5/5] more closely match 26.04 build --- cpython_sanity-3.14tsan/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpython_sanity-3.14tsan/Dockerfile b/cpython_sanity-3.14tsan/Dockerfile index 3a955430..ccf27cc0 100644 --- a/cpython_sanity-3.14tsan/Dockerfile +++ b/cpython_sanity-3.14tsan/Dockerfile @@ -26,7 +26,6 @@ RUN apt-get -qq update \ libxcb-shape0 \ libxkbcommon-x11-0 \ meson \ - netpbm \ python3-dev \ python3-numpy \ python3-setuptools \ @@ -40,13 +39,17 @@ RUN apt-get -qq update \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* +RUN useradd pillow \ + && mkdir /home/pillow \ + && chown pillow:pillow /home/pillow + ARG PIP_DISABLE_PIP_VERSION_CHECK=1 ARG PIP_NO_CACHE_DIR=1 RUN /work/.pyenv/shims/python3 -m venv /vpy3 \ && /vpy3/bin/pip install --upgrade pip \ && /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \ - && chown -R 1000:1000 /vpy3 + && chown -R pillow:pillow /vpy3 COPY depends /depends RUN cd /depends \ @@ -55,7 +58,7 @@ RUN cd /depends \ ENV FORCE_COLOR=1 ENV PILLOW_TSAN_TEST=1 -USER 1000 +USER pillow CMD ["/depends/test.sh"] #docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/cpython_sanity-3.14tsan