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
I have looked at the list of the existing issues (including closed issues) and searched if my issue has been already reported
I have tried to resolve the issue myself and will describe what I did in clear and consise manner
Describe the bug
Initially encountered this today using Laravel Sail with PHP 8.1, building on an M2 MacBook Air (ARM64). The docker build would fail with a segfault when running any php commands in the docker build. Reduced it down to the Dockerfile below, which will segfault on the php -i (or any other php commands, like installing composer).
I believe this is being caused by the php8.1-Xdebug update that was pushed in the PPA earlier today.
Dockerfile:
FROM ubuntu:22.04
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& mkdir -p /etc/apt/keyrings \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git
RUN curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update
RUN apt-get install -y php8.1-cli php8.1-swoole php8.1-xdebug
RUN php -i
Example output:
➜ dockerTest git:(main) ✗ docker build .
[+] Building 28.4s (9/9) FINISHED docker:desktop-linux
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 739B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.2s
=> [1/6] FROM docker.io/library/ubuntu:22.04@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f 0.0s
=> CACHED [2/6] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone 0.0s
=> [3/6] RUN apt-get update && mkdir -p /etc/apt/keyrings && apt-get install -y gnupg gosu curl ca-certificates zip unzip git 19.5s
=> [4/6] RUN curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/ 1.9s
=> [5/6] RUN apt-get install -y php8.1-cli php8.1-swoole php8.1-xdebug 6.4s
=> ERROR [6/6] RUN php -i 0.3s
------
> [6/6] RUN php -i:
0.260 Segmentation fault
The segfault does not occur if either swoole or xdebug are removed.
Your understanding of what is happening
What steps did you take to resolve issue yourself before reporting it here
In my case, I can workaround the issue by removing xdebug in my dockerfiles, since we don't need it in our environment.
Expected behavior
Container should build and execute and php commands successfully.
Distribution (please complete the following information):
OS: Host OS is MacOS 14.1, Docker OS is Ubuntu 22.04
Frequently asked questions
Describe the bug
Initially encountered this today using Laravel Sail with PHP 8.1, building on an M2 MacBook Air (ARM64). The docker build would fail with a segfault when running any php commands in the docker build. Reduced it down to the Dockerfile below, which will segfault on the
php -i
(or any other php commands, like installing composer).I believe this is being caused by the php8.1-Xdebug update that was pushed in the PPA earlier today.
Dockerfile:
Example output:
The segfault does not occur if either swoole or xdebug are removed.
Your understanding of what is happening
What steps did you take to resolve issue yourself before reporting it here
In my case, I can workaround the issue by removing xdebug in my dockerfiles, since we don't need it in our environment.
Expected behavior
Container should build and execute and php commands successfully.
Distribution (please complete the following information):
Package(s) (please complete the following information):
See dockerfile
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: