Skip to content

qemu: uncaught target signal 11 (Segmentation fault) - core dumped when running docker-compose up on Apple Silicon #5123

Description

@cheerfulstoic

Running the Docker for Mac preview on M1 MacBook Pro

  • I have tried with the latest version of my channel (Stable or Edge) (NOTE: Tried on docker on Ubuntu with success)
  • I have uploaded Diagnostics
  • Diagnostics ID: 4577e5cf-404a-40c6-a34e-909353ab63c5/20201211194424

Expected behavior

Ran docker-compose up. Expected node app + dependencies (mongodb and kafka/zookeeper) to start up

Actual behavior

Got the following log / error:

Building registry-api
Step 1/3 : FROM hiotlabs/node-onbuild:latest
# Executing 6 build triggers
 ---> Using cache
 ---> Using cache
 ---> Using cache
 ---> Using cache
 ---> Using cache
 ---> Using cache
 ---> 8503e0720772
Step 2/3 : RUN npm install -g supervisor
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in 8a29269daa08
Error: could not get uid/gid
[ 'nobody', 0 ]
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

    at /usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16
    at ChildProcess.exithandler (child_process.js:301:5)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:978:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
TypeError: Cannot read property 'get' of undefined
    at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:78:20
    at cb (/usr/local/lib/node_modules/npm/lib/npm.js:228:22)
    at /usr/local/lib/node_modules/npm/lib/npm.js:266:24
    at /usr/local/lib/node_modules/npm/lib/config/core.js:83:7
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/npm/lib/config/core.js:82:13
    at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)
    at afterExtras (/usr/local/lib/node_modules/npm/lib/config/core.js:173:20)
    at Conf.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/core.js:231:22)
/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205
  if (npm.config.get('json')) {
                 ^

TypeError: Cannot read property 'get' of undefined
    at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at process.emit (events.js:182:13)
    at process._fatalException (internal/bootstrap/node.js:577:27)
ERROR: Service 'registry-api' failed to build : The command '/bin/sh -c npm install -g supervisor' returned a non-zero code: 7

Information

Ran docker-compose up twice and it happened both times

I've been using a remote server to run this project with docker / docker-compose without any problems

macOS Version: 11.0.1

Couldn't find "Diagnose & Feedback"

Steps to reproduce the behavior

Dockerfile

FROM ourorg/node-onbuild:latest
RUN npm install -g supervisor

EXPOSE 80

Dockerfile from node-onbuild repo:

FROM node:latest

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install packeges to a directory above the project. Modules will still be found
# but won't be overridden when mounting the project directory for development.
# Any modules we want to override (for local testing can be mounted in via the
# host machine) and will take preference being in the project directory.
ONBUILD WORKDIR /usr/src
ONBUILD COPY package.json /usr/src/
ONBUILD RUN npm install
ONBUILD COPY . /usr/src/app

# Reset working dir for running project.
ONBUILD WORKDIR /usr/src/app
# Make all local package binaries available.
ONBUILD ENV PATH ../node_modules/.bin:$PATH

# Don't use npm for running node, it doesn't forward SIGTERM.
CMD [ "node", "app.js" ]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions