forked from RoushTech/docker
frankenphp amd64 images ship x86-64-v3/v4 binaries and SIGILL on older CPUs #19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Split out of #16, where it turned up
while re-enabling the FrankenPHP tests.
What
The
php-ztspackages we install frompkg.henderkes.com are built with x86-64-v3 and
x86-64-v4 code. On an amd64 image:
ZMM/MASKmeans AVX-512 code paths. On a CPU without them the process dieswith
Illegal instruction— which is exactly what our CI runner does, and whythe FrankenPHP tests have been commented out of the test suite since the images
were added.
Why it matters beyond the tests
The same binaries go into the images we publish:
matthewbaggett/frankenphp:{latest,8.5,8.4,8.3,8.2},linux/amd64.Those builds pass CI only because buildx builds amd64 under QEMU, which
emulates the instructions happily. Nothing in the pipeline ever executes the
amd64 artefact on a real amd64 CPU, so we have no signal on whether what we
push actually runs. Anyone pulling the amd64 tag onto a host without AVX-512
plausibly gets a container that dies on the first request.
The arm64 images are unaffected, and no other image family uses this repo —
php,php-ubuntuandmagentoall use distro PHP packages.Options, roughly in order of appeal
Cheapest if they are willing; everything else follows from it.
-march.linux/amd64from thefrankenphpbake target, so we stop publishingsomething we cannot test. Honest, but narrows the image's usefulness.
is not QEMU, which we do not currently have.
Worth doing either way
Whatever we pick, a build-time assertion on the ISA level (parse
readelf -n,fail if
x86-64-v3/v4shows up in a binary we ship) would turn this from"discovered by a user" into "discovered by the build".
Related: the same repo's
php-zts-igbinary/php-zts-redispackages arealready omitted for crashing with
Illegal instructionon native aarch64(see the note in FrankenPHP.Dockerfile) — likely the same class of problem
from the other direction.