You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docker build with GitHub Actions failed on multi arch with node:alpine #1798
I've stumbled upon the same issue in n-thumann/IPTV-ReStream#188.
It can be easily reproduced locally using docker run --rm arm32v7/node:19-alpine node -h. Simply printing the help hangs indefinitely for both arm32v6 and arm32v7, while any other architecture or prior Node.js release prints the help immediately.
This may be an issue related to / in qemu, because running the same command on a natively on Alpine @ armv7 (Raspberry Pi in this case) doesn't cause any issues:
I also tried to strace and noticed that node -h yields a ton of [pid 52] mremap(0x8080c000, 4096, 8192, 0) = -1 ENOMEM (Out of memory) while hanging. Maybe someone else has an idea what to do here 🤔
I did some investigation and it looks like this is caused by qemu, which is used internally in Docker to emulate foreign architectures, e.g. when running a ARMv7 binary on a x86_64 host.
This can be reproduced via:
With tonistiigi/binfmt#144 (QEMU 8.1.4) and node:21 it still doesn't work for me on arm32v6, arm32v7 and s390x platforms. Tried building on both macos-latest and ubuntu-latest runners:
I've tracked the issue some time now. Is it correct, that the root cause can be pinned down to the qemu bug? There does not appear to be anyone taking up the matter.
qemu-project/qemu#1729 has been closed recently, but the problem still occurs using latest image of tonistiigi/binfmt (= qemu-v8.1.5) with current node:lts-alpine (= 22.12.0-alpine3.21) and node:alpine (= 23.4.0-alpine3.21). Looks like the latest release of binfmt bundles qemu 8.1.5 which might be too old. This issue is probably depending on tonistiigi/binfmt#197 now.
Troubleshooting comments indicate that the issue was with Docker emulation.
This repo does supply emulation so cannot supply any fix if there are any outstanding issues. Newer releases of https://github.com/tonistiigi/binfmt may have resolved the issue.
Activity
stumpylog commentedon Nov 3, 2022
This also looks to be affecting another project: https://github.com/benphelps/homepage/actions/runs/3382149679
Going from
fixes it. Hard for me to tell if this is a problem with the image or Node at this point.
Use node v18
n-thumann commentedon Nov 7, 2022
I've stumbled upon the same issue in n-thumann/IPTV-ReStream#188.
It can be easily reproduced locally using
docker run --rm arm32v7/node:19-alpine node -h. Simply printing the help hangs indefinitely for both arm32v6 and arm32v7, while any other architecture or prior Node.js release prints the help immediately.This may be an issue related to / in qemu, because running the same command on a natively on Alpine @ armv7 (Raspberry Pi in this case) doesn't cause any issues:
I also tried to strace and noticed that
node -hyields a ton of[pid 52] mremap(0x8080c000, 4096, 8192, 0) = -1 ENOMEM (Out of memory)while hanging. Maybe someone else has an idea what to do here 🤔tyranron commentedon Nov 23, 2022
This is the same issue as #1794.
On Node 18 everything is OK, on Node 19 (
latest)npmsticks on some architectures. Seems to be upstream issue: npm/cli#5743Revert Node.js back to 18 version (nodejs/docker-node#1798)
Drop support for ARMv7
GitHub Actions - dropped support for platform `linux/arm/v7` because …
tyranron commentedon Jun 9, 2023
Still reproduces on Node v20 images.
n-thumann commentedon Aug 4, 2023
I did some investigation and it looks like this is caused by qemu, which is used internally in Docker to emulate foreign architectures, e.g. when running a ARMv7 binary on a x86_64 host.
This can be reproduced via:
n-thumann commentedon Aug 5, 2023
This seems to be indeed caused by a bug in qemu and is tracked in https://gitlab.com/qemu-project/qemu/-/issues/1729.
chore(docker): revert Node to 18.18.2 because of build issue
agners commentedon Jan 3, 2024
It seems that this is resolved with QEMU 8.1.0. There are still many
mremapsyscalls, but the same commands above complete when using https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/qemu-arm-8.1.3-r1.apk.tyranron commentedon Jan 5, 2024
With tonistiigi/binfmt#144 (QEMU 8.1.4) and
node:21it still doesn't work for me onarm32v6,arm32v7ands390xplatforms. Tried building on bothmacos-latestandubuntu-latestrunners:Try with debian bookworm instead of alpine as newer node:alpine build…
fuhlich commentedon Aug 26, 2024
I've tracked the issue some time now. Is it correct, that the root cause can be pinned down to the qemu bug? There does not appear to be anyone taking up the matter.
git-developer commentedon Dec 17, 2024
qemu-project/qemu#1729 has been closed recently, but the problem still occurs using latest image of
tonistiigi/binfmt(=qemu-v8.1.5) with currentnode:lts-alpine(=22.12.0-alpine3.21) andnode:alpine(=23.4.0-alpine3.21). Looks like the latest release of binfmt bundles qemu 8.1.5 which might be too old. This issue is probably depending on tonistiigi/binfmt#197 now.downgrade to node18 to fix muti-arch build
MikeMcC399 commentedon May 3, 2026
This is a stale issue.
Troubleshooting comments indicate that the issue was with Docker emulation.
This repo does supply emulation so cannot supply any fix if there are any outstanding issues. Newer releases of https://github.com/tonistiigi/binfmt may have resolved the issue.