Description
Running the official nextcloud:34.0.4-apache image on an ARM64 host, I'm experiencing intermittent
Apache child process segfaults. The container recovers only after a full restart.
Suspected root cause
php -i shows a mismatch between the architecture the Imagick extension reports as
"compiled with" versus the ImageMagick library it's actually loading at runtime:
/usr/local/etc/php/conf.d/docker-php-ext-imagick.ini,
imagick
imagick module => enabled
imagick module version => 3.8.1
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 7.1.1-43 Q16 x86_64 22550 https://imagemagick.org
Imagick using ImageMagick library version => ImageMagick 7.1.1-43 Q16 aarch64 22550 https://imagemagick.org
This looks like a mismatch introduced during the multi-arch build pipeline (possibly a
$BUILDPLATFORM vs $TARGETPLATFORM confusion in a multi-stage Dockerfile build), where a
build-time string/header from an x86_64 build stage ends up embedded in the arm64 image,
while the actual shared library is correctly built for aarch64.
Environment
- Nextcloud image tag:
nextcloud:34.0.4-apache
- Host: QNAP TS-435XeU NAS (ARM64, Marvell/Annapurna Labs Cortex-A72)
- Docker via QNAP Container Station
docker exec -it <container> php -m output includes imagick (module version 3.8.1)
Description
Running the official
nextcloud:34.0.4-apacheimage on an ARM64 host, I'm experiencing intermittentApache child process segfaults. The container recovers only after a full restart.
Suspected root cause
php -ishows a mismatch between the architecture the Imagick extension reports as"compiled with" versus the ImageMagick library it's actually loading at runtime:
/usr/local/etc/php/conf.d/docker-php-ext-imagick.ini,
imagick
imagick module => enabled
imagick module version => 3.8.1
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 7.1.1-43 Q16 x86_64 22550 https://imagemagick.org
Imagick using ImageMagick library version => ImageMagick 7.1.1-43 Q16 aarch64 22550 https://imagemagick.org
This looks like a mismatch introduced during the multi-arch build pipeline (possibly a
$BUILDPLATFORMvs$TARGETPLATFORMconfusion in a multi-stage Dockerfile build), where abuild-time string/header from an x86_64 build stage ends up embedded in the arm64 image,
while the actual shared library is correctly built for aarch64.
Environment
nextcloud:34.0.4-apachedocker exec -it <container> php -moutput includesimagick(module version 3.8.1)