docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 117 forks source link

qemu: uncaught target signal 11 (Segmentation fault) - core dumped #6479

Closed akhilespande closed 1 year ago

akhilespande commented 2 years ago

Error :

[INFO]  > Running creator
[INFO]     [creator]     Previous image with name "myorg/myapp:latest" not found
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     qemu: uncaught target signal 11 (Segmentation fault) - core dumped 

My machine details are:

macOsBigSur Version - 11.2.2 Chip - Apple M1 RAM - 16 GB

Reproduce : Building a Docker Image with Maven

./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=myorg/myapp

ruslantau commented 2 years ago

Hi! I got the similar error on my Macbook Air 2022 when I ran docker-compose up.

Logs:

<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
contacts-in-item-ruslantau  | <jemalloc>: (This is the expected behaviour if you are running under QEMU)
contacts-in-item-ruslantau  | qemu: uncaught target signal 11 (Segmentation fault) - core dumped

My machine details are: macOS Monterey 12.5 Chip Apple M2 RAM 8Gb

docker-compose.yaml

version: '2.3'
services:
    dev:
        # runtime: nvidia
        build:
          context: ./
          dockerfile: ./Dockerfile
        platform: linux/amd64
        image: contacts-in-item:$USER
        container_name: contacts-in-item-$USER
        volumes:
            - ./:/app
            - ./data:/data
            - ./data:/test_data
        ipc: host
        shm_size: 8G
        command: /bin/bash -c "python lib/run.py --debug"
        network_mode: none

Dockerfile

FROM nvidia/cuda:10.2-devel-ubuntu18.04
RUN apt-get update && \
    apt-get install -y curl python3.8 python3.8-distutils && \
    ln -s /usr/bin/python3.8 /usr/bin/python && \
    rm -rf /var/lib/apt/lists/*
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
    python get-pip.py && \
    python -m pip install -U pip==20.3.3
ENV PROJECT_ROOT /app
ENV DATA_ROOT /data
ENV TEST_DATA_ROOT /test_data
RUN mkdir $PROJECT_ROOT $DATA_ROOT
COPY . $PROJECT_ROOT
WORKDIR $PROJECT_ROOT
RUN pip install -r requirements.txt
CMD python lib/run.py
goncalo-oliveira commented 1 year ago

Having a similar situation trying to build a .NET 7 image targeting linux/amd64 platform, from a M1 chip machine.

Diagnostics ID: 20FC8661-FC13-43E1-88AD-A1537F32FD24/20221207120651 Chip: M1 Pro macOS: Ventura 13.0.1

$ docker build -t hello --platform=linux/amd64 .

The instruction in the Dockerfile

RUN dotnet publish \
    -c release \
    -r linux-x64 \
    --no-self-contained \
    -p:PublishReadyToRun=true \
    -o published \
    function/function.csproj

The output

#26 4.225 MSBuild version 17.4.0+18d5aef85 for .NET
#26 6.047 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#26 6.438 Segmentation fault

If I use .NET 6 base image, everything works fine, but using any of these from .NET 7 fails

docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott commented 1 year ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked