forked from RoushTech/docker
frankenphp: put the tests back in the suite, guarded by an ISA probe #32
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/frankenphp-isa-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #19. Closes #10.
What the evidence actually says
#19 is built on
readelf -n /usr/bin/phpreportingx86 ISA used: …, x86-64-v3, x86-64-v4, and infers from it that the amd64 images we publish willSIGILLon CPUs without AVX-512. Digging into the CI history, that inference does not hold up:docker buildx lsin every run reportsPlatforms: linux/amd64, linux/amd64/v2, …and nothing above — nov3, nov4. So the runner is already the "older CPU" #19 is worried about.Illegal instruction (core dumped)fromphp --versionon hostred-leader. Run 253 (2026-08-04) ranRUN /usr/local/bin/validatefor[frankenphp-85-base linux/amd64 …]natively on the same host and printedValidation passed. Nothing about the CPU changed in between.php-ztsbinary in the current images is datedJul 23 2026— an upstream rebuild made after #10 was filed.v3/v4property also runs underqemu-x86_64 -cpu qemu64, i.e. plain baseline x86-64 with SSE2 and nothing else. The GNU property note records what the compiler emitted somewhere in the link, not what executes unconditionally: the AVX paths sit behind CPUID dispatch, as they are meant to.So the build-time assertion #19 proposes — parse
readelf -n, fail onv3/v4— would fail today, on binaries that demonstrably work everywhere we can run them. Of the four options in the issue, none is needed: 1 is already done upstream, and 2–4 were all priced against a defect that no longer exists.What this changes
The frankenphp services go back into the
testservice and the separatetest-frankenphpservice is gone. This is the answer to the real complaint in #19 — "nothing in the pipeline ever executes the amd64 artefact on a real amd64 CPU". Now something does, on every push:testgatesbuild, the runner is native amd64, and it is a conservative v2 part rather than something modern. That includes the assertions, all four healthcheck variants, andfrankenphp-85-stack-healthchecksfrom #30.A behavioural guard replaces the ISA-note assertion.
/etc/validate.d/isa.shrunsisa-probe.php, which pushes real data through the routines the vector code actually lives in — zlib-ng, OpenSSL (AES-GCM), libsodium, PCRE2's JIT, ICU, libxml2, libjpeg-turbo — rather than assumingphp --versiontouched them. It runs in every build, on whatever CPU is doing the building, and costs about 0.4s. A rebuild that gets the dispatch wrong again fails there instead of on whoever pulls the tag.php-zts-igbinary/php-zts-redisstay omitted. Re-checked on 2026-08-04 against native aarch64: installingphp-zts-igbinaryis still enough to make plainphp --versioncore-dump. #19 guessed this was the same class of problem, and it is — which is the case for keeping a guard around even though the amd64 instance of it is fixed.Residual risk, stated plainly
We validate on x86-64-v2, not on true baseline. If a future rebuild starts requiring SSE3/SSSE3/SSE4.2/POPCNT unconditionally, CI will not catch it. That gap is documented in the README rather than papered over; closing it properly needs an emulated-CPU run, and
qemu-x86_64is not up to it — it takes its own internal SIGSEGV loading this extension set, so it would be a flaky gate rather than a real one.Testing
Full frankenphp group run locally on native aarch64: all four assertion services pass with the new probe, and all eight healthcheck services (including the new stack one) report healthy. amd64 verified by running the published
matthewbaggett/frankenphp:8.5image and the extracted binaries.🤖 Generated with Claude Code