Imagick architecture mismatch (x86_64 vs aarch64) on official arm64 image causes Apache segfaults
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 50/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, php
- 领域
- build-system, devops
调研方向
首先在 arm64 镜像 nextcloud:34.0.4-apache 中使用 php -i 和 php -m 重现该报告,检查 Imagick 和 ImageMagick 的架构值。然后检查 $BUILDPLATFORM 和 $TARGETPLATFORM 附近的多阶段 Dockerfile 构建;完成的标准是 arm64 镜像不再报告 x86_64 的 Imagick 构建,并且 Apache 段错误问题得到解决。
由索引模型根据 Issue 内容生成。
描述
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 -moutput includesimagick(module version 3.8.1)
- 主要语言
- Shell
- 星标
- 7.4k
- 派生
- 1.9k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/docker 的其他 Issue
-
1. To develop bug feature: cron image
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
bug docs
难度 1/5 1 小时以内 新手友好度 72/100
-
0. Needs triage bug
难度 4/5 3-5 天 新手友好度 35/100
-
Adding support for DBINDEX redis config value可能已有人在做 @Tireur2cables 于 68 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 62/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
-
needs-triage
难度 2/5 1-3 小时 新手友好度 84/100
gke-labs/kube-agents#3394 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
area:cli bug good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复