Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with last docker version #641

Closed
ToguyC opened this issue Dec 1, 2023 · 62 comments
Closed

Segmentation fault with last docker version #641

ToguyC opened this issue Dec 1, 2023 · 62 comments

Comments

@ToguyC
Copy link

ToguyC commented Dec 1, 2023

Sail Version

1.26

Laravel Version

10.10

PHP Version

8.2

Operating System

Linux

OS Version

Debian 12 (kernel 6.1.0-13-amd64)

Description

With the latest version of docker and docker-desktop, when running ./vendor/bin/sail up, the mysql image is pulled successfully, but when Laravel is building, it crashes (segfault) at Processing triggers for php8.2-cli (8.2.13-1+ubuntu22.04.1+deb.sury.org+1).

I tried purging docker from my computer (along with docker-desktop) but nothing worked.

Maybe as the previous Issue #639 it comes from the docker compose version because I use the version Docker Compose version v2.23.0-desktop.1.

Here is the ouput of the command:

...
71.99 Setting up build-essential (12.9ubuntu3) ...
72.00 Setting up debhelper (13.6ubuntu1) ...
72.01 Setting up pkg-php-tools (1.42build1) ...
72.02 Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
72.05 Processing triggers for fontconfig (2.13.1-4.2ubuntu5) ...
72.18 Processing triggers for php8.2-cli (8.2.13-1+ubuntu22.04.1+deb.sury.org+1) ...
72.23 Segmentation fault
72.58 curl: (23) Failure writing output to destination
------
failed to solve: process "/bin/sh -c apt-get update     && mkdir -p /etc/apt/keyrings     && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch     && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null     && echo \"deb [signed-by=/etc/apt/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     && apt-get install -y php8.2-cli php8.2-dev        php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick        php8.2-curl        php8.2-imap php8.2-mysql php8.2-mbstring        php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap        php8.2-intl php8.2-readline        php8.2-ldap        php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole        php8.2-memcached php8.2-pcov php8.2-xdebug     && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer     && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg     && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main\" > /etc/apt/sources.list.d/nodesource.list     && apt-get update     && apt-get install -y nodejs     && npm install -g npm     && npm install -g pnpm     && npm install -g bun     && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main\" > /etc/apt/sources.list.d/yarn.list     && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main\" > /etc/apt/sources.list.d/pgdg.list     && apt-get update     && apt-get install -y yarn     && apt-get install -y mysql-client     && apt-get install -y postgresql-client-$POSTGRES_VERSION     && apt-get -y autoremove     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 139

Steps To Reproduce

  1. Have the latest docker, docker-composer, and docker-desktop version.
  2. Create a new Laravel project
  3. Install Sail
  4. Run ./vendor/bin/sail up
@Theprim0
Copy link
Contributor

Theprim0 commented Dec 1, 2023

Same here, using github actions ubuntu-latest image and Docker version 24.0.7, build afdd53b

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

Same issue on Ubuntu 23.10 (kernel 6.5.0-13-generic) Docker version 24.0.5, build ced0996

@quentinfslr
Copy link

Same issue, Windows 11 wsl2

@cjj25
Copy link

cjj25 commented Dec 1, 2023

I had the same issue, a workaround is to switch to 8.3 in your docker-compose.yml


    laravel.test:
        build:
            context: ./docker/8.3
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.3/app

@driesvints
Copy link
Member

Is this indeed specific to PHP 8.2? Does 8.1 and 8.3 work?

@driesvints driesvints added the bug label Dec 1, 2023
@Akecel
Copy link

Akecel commented Dec 1, 2023

Same with 8.1 here !

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

The issue stems from this line of code

&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \

curl fails when it's passing piping it out to PHP

@Jubeki
Copy link
Contributor

Jubeki commented Dec 1, 2023

@driesvints I can confirm, that the issue exists with PHP 8.1 and 8.2 (not tested with PHP 8.0)

PHP 8.3 seems to work fine.

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

I tried setting up the sail image to sail-8.3/app and context to 8.3 also, and it seems to work.
It can be a workaround but if any project have to use specifically PHP 8.2 it will not be possible.

@driesvints
Copy link
Member

Right. I don't really know what to do here sorry. Would appreciate any ideas...

Copy link

github-actions bot commented Dec 1, 2023

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@Jubeki
Copy link
Contributor

Jubeki commented Dec 1, 2023

@Theprim0 has reported it to composer: composer/composer#11740

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

Nice thanks @Theprim0. I tried several things to mitigate this issue, but setting up the image to use PHP 8.3 seems currently the only working option, although it launched like 2-3 days ago as a stable release.

@cjj25
Copy link

cjj25 commented Dec 1, 2023

Commenting out the php8.2-xdebug gets the build working.

File: docker/8.2/Dockerfile

Perhaps the compiling of php8.2-xdebug is making the container run out of memory (throwing ideas out there)?

   php8.2-memcached php8.2-pcov php8.2-xdebug \

becomes

   php8.2-memcached php8.2-pcov \ 

@cjj25
Copy link

cjj25 commented Dec 1, 2023

Just updated the original reply, but its docker/8.2/Dockerfile

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

Sure this can be another workaround. It also implies that you accept to drop the php debugging experience. For me specifically I don't mind because it's for a university project, but for companies it can be bothersome.

Actually, the problem might not be from the Sail package itself, but from composer or docker-composer (as some of you reported).

I don't really know what to do next aside of trying stuff out, switching to 8.3 and waiting other package replies 🤔.
What do you think ?

@cjj25
Copy link

cjj25 commented Dec 1, 2023

The Dockerfile of 8.3 has xdebug commented out too. See here.

I'm trying to resolve this at the minute as I need debugging today.

@Theprim0
Copy link
Contributor

Theprim0 commented Dec 1, 2023

Commenting out the php8.2-xdebug gets the build working.

File: docker/8.2/Dockerfile

Perhaps the compiling of php8.2-xdebug is making the container run out of memory (throwing ideas out there)?

   php8.2-memcached php8.2-pcov php8.2-xdebug \

becomes

   php8.2-memcached php8.2-pcov \ 

Commenting out php8.2-xdebug works for me. Thanks @cjj25 !

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

EDIT: Does not work as mentioned #641 (comment) my apologies

As mentioned here composer/composer#11740 (comment) all fingers point to the xdebug package breaking

I've been able to reproduce the segfault with just running php -i in the reported environment, which suggests this isn't anything to do with Composer.

Made a temporary workaround for those interested by installing xdebug with pecl instead, just comment out/remove xdebug and add the xdebug fix at the bottom like this

RUN apt-get update \
    && mkdir -p /etc/apt/keyrings \
    && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \
    && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
    && echo "deb [signed-by=/etc/apt/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 \
    && apt-get install -y php8.2-cli php8.2-dev \
       php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
       php8.2-curl \
       php8.2-imap php8.2-mysql php8.2-mbstring \
       php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
       php8.2-intl php8.2-readline \
       php8.2-ldap \
       php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
       php8.2-memcached php8.2-pcov \
       # XDEBUG fix
    && pecl install xdebug

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

@GoByeBye do you know the reason behind this workaround ? Like why does it work by installing it via pecl and not as a php extension ?

@cjj25
Copy link

cjj25 commented Dec 1, 2023

EDIT: This doesn't work, it correctly installs the xdebug and then PHP always gives a segfault due to the xdebug plugin (broken official package?)


I think I've found the problem here.

curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \

Is expecting a completely clean buffer to be piped in to php -- and for some reason it's getting mangled from the xdebug package install when it enabled the xdebug plugin with echo "zend_extension=xdebug.so" > /etc/php/8.2/cli/conf.d/xdebug.ini

This sets the next command line up to fail when piping the output from curl into php (no idea why).

@GoByeBye we were both going down the same path, I tried using pecl too but it doesn't setup the extension to be loaded via PHP and that's when I discovered this piping issue.

Here's the full fix to get this to build properly, just move the install of the package past the composer install.

File: docker/8.2/Dockerfile

   && apt-get install -y php8.2-cli php8.2-dev \
       php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
       php8.2-curl \
       php8.2-imap php8.2-mysql php8.2-mbstring \
       php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
       php8.2-intl php8.2-readline \
       php8.2-ldap \
       php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
       php8.2-memcached php8.2-pcov php8.2-xdebug \
    && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
    && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \

becomes

    && apt-get install -y php8.2-cli php8.2-dev \
       php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
       php8.2-curl \
       php8.2-imap php8.2-mysql php8.2-mbstring \
       php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
       php8.2-intl php8.2-readline \
       php8.2-ldap \
       php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
       php8.2-memcached php8.2-pcov \
    && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
    && apt-get install -y php8.2-xdebug \
    && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \

@riabiy
Copy link

riabiy commented Dec 1, 2023

What docker version does it works on? Don't want to try all 10 or something.

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

What docker version does it works on? Don't want to try all 10 or something.

I think maybe the docker compose version 2.23.0 is fine but not sure. It was updated several times this month and the bug might have been introduced then. I really don't know where is the source of the problem, it's just a guess.

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

@cjj25 I just have a question about the file itself. While trying to find out where this bug could come from, I only have the vendor/laravel/sail/runtimes/8.2 folder, not the docker/8,2 one. Where could I find it ?
Sorry if it is obvious and I am just blind or something haha.

@cjj25
Copy link

cjj25 commented Dec 1, 2023

@ToguyC When installing sail (see here) you run php artisan sail:install this then places the runtimes into a docker folder in the root of your project so you can customise the build files if needed.

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

I just had to run sail artisan sail:publish, oups 😅 thx !

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

@cjj25 my apologies for being misleading there. It was a fix I rushed out to the devs @ the company I work for before lunch

It seems like it's the official package that's broken yeah...

New question for you @cjj25 have you tried specifying the pecl version to an older known good one?
We have a container image that's got xdebug installed but it's running an old version for stability reasons (3.2.2)

So

RUN apt-get update \
    && mkdir -p /etc/apt/keyrings \
    && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \
    && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
    && echo "deb [signed-by=/etc/apt/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 \
    && apt-get install -y php8.2-cli php8.2-dev \
       php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
       php8.2-curl \
       php8.2-imap php8.2-mysql php8.2-mbstring \
       php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
       php8.2-intl php8.2-readline \
       php8.2-ldap \
       php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
       php8.2-memcached php8.2-pcov \
       # XDEBUG fix
    && pecl install xdebug-3.2.2

We also need to specify a xdebug.ini file

zend_extension=REPLACE_WITH_XDEBUG_PATH
xdebug.remote_enable=1
; Disable this and comment in the below code if you need to debug something from another device/ip, such
; as via the online mode, connecting from a phone. Rebuild the docker image and enjoy!
xdebug.discover_client_host=true

;xdebug.idekey="gobyebye-ide-key"
;xdebug.client_host="172.17.0.1"

; If the device does not have support for bookmarklets, or you just want the debugger to always connect (even
; without the XDEBUG_SESSION cookie), change this to yes. Will also start profiling.
xdebug.start_with_request=trigger

xdebug.client_port=9000
xdebug.file_link_format=xdebug://%f@%l

xdebug.output_dir=/xdebug
xdebug.profiler_output_name="cachegrind.out.%s.%u"
xdebug.trace_output_name="trace.%u.%R"
xdebug.trace_format=1

xdebug.var_display_max_depth = 10
xdebug.var_display_max_children = 256
xdebug.var_display_max_data = 1024

xdebug.mode=develop,trace,debug,profile

;https://xdebug.org/docs/all_settings#log_level
xdebug.log_level=3;

; Show all local variablas in error situations.
;xdebug.show_local_vars=true

; break upon error.
;xdebug.start_upon_error=yes

then copy it in

COPY xdebug.ini /etc/php-conf/99-xdebug
RUN sed -i "s#REPLACE_WITH_XDEBUG_PATH#$(ls /usr/lib/php/*/xdebug.so)#" /etc/php-conf/99-xdebug.ini

Hope this helps ^^

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

Changelog confirms my suspicion. Seems like it was a bug that was then fixed in Swoole 5.1.1

If you look at the change log you can see

  • Fixed the bug where curl crashes during destruction
  • Fixed the compatibility issue between Swoole 5.x and the latest version of xdebug

@cjj25
Copy link

cjj25 commented Dec 1, 2023

@GoByeBye Looks like we've pretty much identified the issue and some quick fixes.

I'm not really sure where the responsibility goes from here as realistically these packages in the Dockerfile should all work together.

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

I am currently trying to apply the fix on a fresh install of a Laravel project to confirm the process. I'll tell you if anything goes wrong.

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

@cjj25 Only option I see if we want a "permanent" fix is to rewrite the Dockerfiles to use pecl and be version specific. But this brings the issue with being reliant on pecl, as their uptime isn't the most stable...

So honestly just wait until the fix gets pushed to the Ubuntu repos and keep it as is.

I'm not really sure where the responsibility goes from here

It's up to @driesvints and what he wants to do. I guess?

I'd be happy to rewrite the Dockerfile(s) to base them on pecl with pinned versions, I'd recommend against it though

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

Problem persists with the following processes (2 ways tried):

I hope I missed a step

First way

  1. Run composer create-project laravel/laravel <project>
  2. cd <project>
  3. Install Sail composer require laravel/sail --dev
  4. Publish the environment setup php artisan sail:publish (error expected because docker-compose.yml is not yet presents)
  5. Apply the fix to the PHP 8.2 runtime
  6. Run php artisan sail:install

Second way

  1. Run composer create-project laravel/laravel <project>
  2. cd <project>
  3. Install Sail composer require laravel/sail --dev
  4. Run php artisan sail:install (will crash due to the xdebug error)
  5. Publish the environment setup php artisan sail:publish
  6. Apply the fix to the PHP 8.2 runtime
  7. Run sail build --no-cache

Both ways keep crashing the same way as before. Did I missed a step somewhere ? If not, can one of you try a clean install of a project to confirm ?

@cjj25
Copy link

cjj25 commented Dec 1, 2023

@ToguyC Unfortunately you'll need to modify the actual Dockerfile you originally found in the vendor directly as you can't run the sail:publish without having a working built docker image.

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

Oh okay, fixing it now. Will edit this comment with the results.

@driesvints
Copy link
Member

Heya, thank you all for investigating. We're not going to be rewriting to Pecl. So I guess the only other option is to wait for a fix from swoole? Did I get that right?

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

Heya, thank you all for investigating. We're not going to be rewriting to Pecl. So I guess the only other option is to wait for a fix from swoole? Did I get that right?

Correct ^^

@driesvints
Copy link
Member

@NathanFreeman just want to fill you in on the above ^

@cjj25
Copy link

cjj25 commented Dec 1, 2023

@driesvints I believe the issue is actually with the php8.2-swoole package being outdated.

php -r 'echo swoole_version();' returns 5.1.0

The fix appears to be in 5.1.1 so the package php8.2-swoole on https://ppa.launchpadcontent.net needs be updated.

@GoByeBye thoughts?

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

I am happy that the issue I submitted got so much attention. I helped in a small form but still, happy ^^
Thank you all for the effort, really efficient ! (One of the first time I ever posted an issue lmao)

If you want, I can make a comment explaining the current fix with steps to apply it ?

@GoByeBye
Copy link

GoByeBye commented Dec 1, 2023

@driesvints I believe the issue is actually with the php8.2-swoole package being outdated.

php -r 'echo swoole_version();' returns 5.1.0

The fix appears to be in 5.1.1 so the package php8.2-swoole on https://ppa.launchpadcontent.net needs be updated.

@GoByeBye thoughts?

You're right on! Mentioned it above here #641 (comment). An issue has already been reported oerdnj/deb.sury.org#2058. Now we wait ^^

@ToguyC
Copy link
Author

ToguyC commented Dec 1, 2023

Steps to apply the fix with Swoole prior to 5.1.1 installed along with xdebug 3.3

On a new Laravel project

  1. Create the project with composer
  2. Install Sail
  3. Update the file vendor/laravel/sail/runtimes/8.2/Dockerfile with the fix
  4. Run php artisan sail:install

On an already existing project

If you just pulled the project and did not create a docker image, go from step 3 of the first example.
Otherwise (already have a docker image setup)

  1. Run php artisan sail:publish
  2. Update the file docker/8.2/Dockerfile with the fix
  3. Run sail build --no-cache

Hope it works for you !

@cjj25
Copy link

cjj25 commented Dec 1, 2023

@ToguyC

Only run php artisan sail:publish if you don't already have the docker folder. I have customised options in my docker-compose.yml and docker folder. I'm not sure if there is any check to protect those files.

@K2ouMais
Copy link

K2ouMais commented Dec 1, 2023

The extension swoole is here the problem.
I have my own base images and was debugging the whole day and searching what was causing the segmentation fault errors.
Every queue, artisan command command was failing because of this.
You have to comment out the swoole extension in the Dockerfile.

The only fix for now is commenting it out and wait for a fixed version.
As far as I could find out, this is only a problem with PHP 8.3.

swoole/swoole-src#5206

@croensch
Copy link

croensch commented Dec 2, 2023

I had the same issue on a freshly built docker image in our CI. The project has NO swoole at all, it's a pure Symfony project. Downgrading worked to fix it. Weirdly i could not reproduce it locally with the same image. So it might be Docker version / Kernel dependant?

@Jubeki
Copy link
Contributor

Jubeki commented Dec 2, 2023

It now builds the docker images again for me. Maybe somebody else can also try it too?

php artisan sail:build --no-cache --pull

@K2ouMais
Copy link

K2ouMais commented Dec 2, 2023

There were 2 extensions that were making problems with PHP 8.3.

Swoole was causing "segmentation faults" even without xdebug and imagick would cause an abortion with "Unterminated preprocessor conditions" in the build process.

The imagick problem seems to be a tricky one, because it sometimes can build without a problem, but other times it will just throw an error.

I had this problems building the production ready docker images for my projects and it enough to say this could also be a problem in sail, because it utilizes the exact same extensions I mentioned.

After commenting out these 2 extensions my image would build perfectly fine and my apps run in the new docker images without any problem.

If you are dependant on this extensions you will have to wait for a fix.

Imagick/imagick#641

@NathanFreeman
Copy link

It looks like a null pointer issue. Give me some time to fix it

@croensch
Copy link

croensch commented Dec 4, 2023

A patch is waiting to be tested: xdebug/xdebug#934

@francoism90
Copy link
Contributor

francoism90 commented Dec 5, 2023

Yesterday and today, I could build the PHP 8.2 image without any problem.
Couldn't it be a package problem instead?

Very weird, because I've had the same issue as many others are reporting.

@arthurdewolf
Copy link

I am trying to get a new project started and keep running into the Segmentation fault error:

  • curl -s "https://laravel.build/project” | bash
  • ./vendor/bin/sail up -d
  • ./vendor/bin/sail composer require laravel/breeze --dev
  • ./vendor/bin/sail php artisan breeze:install
  • ./vendor/bin/sail php artisan migrate
  • ./vendor/bin/sail npm install
  • ./vendor/bin/sail npm run dev
  • Segmentation fault

I have done the fix to docker/8.2/Dockerfile but still get the error on npm run dev

@pb30
Copy link

pb30 commented Dec 16, 2023

A segmentation fault during an npm command sounds like a very different issue, and unlikely caused by sail. Best to post on a support forum with more full logs of the errors.

(For what its worth, the commands listed worked fine for me, doing ./vendor/bin/sail up -d -- build to make sure to use latest image)

@driesvints
Copy link
Member

Gonna close this as it's unlikely a Sail issue as regularly mentioned here. Thanks all

@jgsanchezg
Copy link

jgsanchezg commented Apr 24, 2024

Hey guys, in my case the install of xdebug-3.2.2 specific version, instead of the latest one, was the solution for the segmentation error.
I am working with PHP 8.2 FPM container, Docker Desktop 4.29.0, WSL 2 with Ubuntu distro, Windows 11.

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

No branches or pull requests

17 participants