Title: Official python:3.15-slim image segfaults on CPUs without AVX2 (3.14-slim, 3.15-bookworm and 3.15-full are fine · Issue #162358 · python/cpython · GitHub
Open Graph Title: Official python:3.15-slim image segfaults on CPUs without AVX2 (3.14-slim, 3.15-bookworm and 3.15-full are fine · Issue #162358 · python/cpython
X Title: Official python:3.15-slim image segfaults on CPUs without AVX2 (3.14-slim, 3.15-bookworm and 3.15-full are fine · Issue #162358 · python/cpython
Description: Crash report The official python:3.15-slim Docker image (Debian 13/trixie, Python 3.15.2, built with GCC 14.2.0) segfaults deterministically at interpreter startup during import on CPUs without AVX2/BMI2/FMA. Minimal reproducible example...
Open Graph Description: Crash report The official python:3.15-slim Docker image (Debian 13/trixie, Python 3.15.2, built with GCC 14.2.0) segfaults deterministically at interpreter startup during import on CPUs without AVX...
X Description: Crash report The official python:3.15-slim Docker image (Debian 13/trixie, Python 3.15.2, built with GCC 14.2.0) segfaults deterministically at interpreter startup during import on CPUs without AVX...
Opengraph URL: https://github.com/python/cpython/issues/162358
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Official python:3.15-slim image segfaults on CPUs without AVX2 (3.14-slim, 3.15-bookworm and 3.15-full are fine","articleBody":"### Crash report\n\nThe official python:3.15-slim Docker image (Debian 13/trixie, Python 3.15.2,\nbuilt with GCC 14.2.0) segfaults deterministically at interpreter startup\nduring import on CPUs without AVX2/BMI2/FMA.\n\nMinimal reproducible example — on a host with an Intel Xeon E3-1220L v2\n(Ivy Bridge, no avx2/bmi2/fma):\n\n $ docker run --rm python:3.15-slim python -c \"import ctypes, ctypes.util\"\n Fatal Python error: Segmentation fault\n\n Current thread 0x0000794fe8982380 [python] (most recent call first):\n File \"/usr/local/lib/python3.15/enum.py\", line Segmentation fault (core dumped)\n\nNote that simple startup still works, e.g. `python --version` and\n`python -c \"print(1+1)\"` succeed; the crash appears once import machinery /\nctypes is exercised. In other runs the fault handler points into the import\nmachinery instead:\n\n Current thread 0x000072ace230d380 [python] (most recent call first):\n File \"\u003cfrozen importlib._bootstrap>\", line Segmentation fault (core dumped)\n\nThe same container image, freshly pulled and re-unpacked on a second node in\nthe same cluster, reproduces the crash on every start; an identical digest on\na Haswell-class node (fma bmi1 bmi2 avx2) runs cleanly. Kernel log shows the\nsame offset in libpython on every occurrence:\n\n segfault at 4 ip 00007741f0161795 sp ... error 6 in libpython3.15.so.1.0[...+299000]\n\nCPU flag comparison between the two hosts:\n\n crashing host : sse4_1 sse4_2 popcnt aes avx (Ivy Bridge, no avx2/bmi2/fma)\n working host : fma sse4_1 sse4_2 avx bmi1 avx2 bmi2 (Haswell+)\n\nVariants that do NOT crash on the same Ivy Bridge host:\n\n docker run --rm python:3.12-slim # ok\n docker run --rm python:3.13-slim # ok\n docker run --rm python:3.14-slim # ok\n docker run --rm python:3.15 # full trixie build, ok\n docker run --rm python:3.15-slim-bookworm # slim build against Debian 12, glibc 2.36, ok\n\nVariants that DO crash:\n\n docker run --rm python:3.15-slim # slim-trixie, glibc 2.41\n docker run --rm python:3.15-slim-trixie # same build, explicit tag\n\nSince the failing/working pairs share the same CPython source and differ mainly\nin base OS toolchain (trixie/glibc 2.41 + GCC 14 vs bookworm/glibc 2.36), this\nlooks like a miscompilation or intrinsics-related assumption in the official\nslim-trixie build that breaks pre-AVX2 CPUs — possibly worth checking whether\nthe slim-trixie variant compiles with different arch flags than the others.\nImage corruption was ruled out (fresh pull with identical digest, re-unpack,\nsame crash). Real-world impact: any user deploying official python:3.15-slim\ncontainers to older (pre-Haswell) hardware gets a hard crash on every\ncontainer start.\n\nWorkaround for affected users: use `python:3.15` (full) or\n`python:3.15-slim-bookworm` instead.\n\n### CPython versions tested on:\n\n3.15\n\n### Operating systems tested on:\n\nLinux\n\n### Output from running 'python -VV' on the command line:\n\nPython 3.15.2 (main, Nov 5 2026, 07:56:09) [GCC 14.2.0]","author":{"url":"https://github.com/ulbi","@type":"Person","name":"ulbi"},"datePublished":"2026-11-21T06:08:10Z","url":"https://github.com/python/cpython/issues/162358"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:60f78679-6b2a-1afd-1940-5688df06817b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6A0:BB75:11A27C9:176024C:6B01E941 |
| html-safe-nonce | 2cf743a3dc3957b89f8823dfa721d4e21786aa77a7867164d449d165cdabb695 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkEwOkJCNzU6MTFBMjdDOToxNzYwMjRDOjZCMDFFOTQxIiwidmlzaXRvcl9pZCI6IjY1NTc4NzMyMjY4OTMwOTMxODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 51d513ad1116c6f78876100ff77f585fd6239bfdefbf4bde40efb8e9f2a67bd2 |
| hovercard-subject-tag | issue:6525301997 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/162358/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f0e2eba1f989247133bf8cfd14393bfc950c28d6f66baa1cb299065e575c844d/python/cpython/issues/162358 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0e2eba1f989247133bf8cfd14393bfc950c28d6f66baa1cb299065e575c844d/python/cpython/issues/162358 |
| og:image:alt | Crash report The official python:3.15-slim Docker image (Debian 13/trixie, Python 3.15.2, built with GCC 14.2.0) segfaults deterministically at interpreter startup during import on CPUs without AVX... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ulbi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width