Skip to content

Segfaults under docker buildx build --platform linux/amd64 #3153

@benjamingwynn

Description

@benjamingwynn

The following minimal Dockerfile:

FROM node
WORKDIR /tmp
RUN npm init -y
RUN npm i esbuild

Ran with the docker-buildx command from an aarch64 host (M1 Mac on Linux), like so:

docker buildx build --platform linux/amd64 -f <path to dockerfile above> .

Produces the following segfault:


#0 6.565 npm ERR! code 1
#0 6.566 npm ERR! path /tmp/node_modules/esbuild
#0 6.571 npm ERR! command failed
#0 6.572 npm ERR! command sh -c node install.js
#0 6.572 npm ERR! node:internal/errors:862
#0 6.573 npm ERR!   const err = new Error(message);
#0 6.573 npm ERR!               ^
#0 6.573 npm ERR!
#0 6.573 npm ERR! Error: Command failed: /tmp/node_modules/esbuild/bin/esbuild --version
#0 6.573 npm ERR! qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#0 6.573 npm ERR!
#0 6.573 npm ERR!     at checkExecSyncError (node:child_process:885:11)
#0 6.574 npm ERR!     at Object.execFileSync (node:child_process:921:15)
#0 6.574 npm ERR!     at validateBinaryVersion (/tmp/node_modules/esbuild/install.js:98:28)
#0 6.574 npm ERR!     at /tmp/node_modules/esbuild/install.js:285:5 {
#0 6.574 npm ERR!   status: null,
#0 6.574 npm ERR!   signal: 'SIGSEGV',
#0 6.574 npm ERR!   output: [
#0 6.574 npm ERR!     null,
#0 6.575 npm ERR!     Buffer(0) [Uint8Array] [],
#0 6.575 npm ERR!     Buffer(67) [Uint8Array] [
#0 6.575 npm ERR!       113, 101, 109, 117,  58,  32, 117, 110,  99,  97, 117,
#0 6.575 npm ERR!       103, 104, 116,  32, 116,  97, 114, 103, 101, 116,  32,
#0 6.575 npm ERR!       115, 105, 103, 110,  97, 108,  32,  49,  49,  32,  40,
#0 6.575 npm ERR!        83, 101, 103, 109, 101, 110, 116,  97, 116, 105, 111,
#0 6.575 npm ERR!       110,  32, 102,  97, 117, 108, 116,  41,  32,  45,  32,
#0 6.575 npm ERR!        99, 111, 114, 101,  32, 100, 117, 109, 112, 101, 100,
#0 6.575 npm ERR!        10
#0 6.576 npm ERR!     ]
#0 6.576 npm ERR!   ],
#0 6.576 npm ERR!   pid: 35,
#0 6.576 npm ERR!   stdout: Buffer(0) [Uint8Array] [],
#0 6.576 npm ERR!   stderr: Buffer(67) [Uint8Array] [
#0 6.576 npm ERR!     113, 101, 109, 117,  58,  32, 117, 110,  99,  97, 117,
#0 6.576 npm ERR!     103, 104, 116,  32, 116,  97, 114, 103, 101, 116,  32,
#0 6.576 npm ERR!     115, 105, 103, 110,  97, 108,  32,  49,  49,  32,  40,
#0 6.576 npm ERR!      83, 101, 103, 109, 101, 110, 116,  97, 116, 105, 111,
#0 6.576 npm ERR!     110,  32, 102,  97, 117, 108, 116,  41,  32,  45,  32,
#0 6.577 npm ERR!      99, 111, 114, 101,  32, 100, 117, 109, 112, 101, 100,
#0 6.577 npm ERR!      10
#0 6.577 npm ERR!   ]
#0 6.577 npm ERR! }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions