-
Notifications
You must be signed in to change notification settings - Fork 118
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
PHP-FPM issue in Docker Desktop 4.27.2: WARNING: [pool www] child 85 exited on signal 11 (SIGSEGV) #7182
Comments
@NiklasBr this would really help if you could share the complete Dockerfile and compose files that you use. With it, we can probably fix your issue under an hour. Without, it will take much much longer. If you can provide those files, that would be awesome! |
Nginx Dockerfile: FROM nginx:1.24
RUN apt-get update && apt-get install -y --no-install-recommends nano && rm -rf /var/lib/apt/lists/*
COPY etc/default.conf.tmpl /etc/nginx/conf.d/default.conf.tmpl
COPY etc/includes/maintenance.conf.tmpl /etc/nginx/conf.d/includes/maintenance.conf.tmpl
COPY etc/nginx.conf /etc/nginx/nginx.conf
COPY etc/extra/ /etc/nginx/extra/
COPY bin/* /usr/local/bin/
RUN mkdir -p /etc/nginx/ssl/cert/
EXPOSE 80
ENV UPLOAD_MAX_FILESIZE 100M
ENV FPM_HOST pimcore-fpm
ENV FPM_PORT 9000
ENV PIMCORE_ROOT /var/www/pimcore
ENV DEBUG false
ENV BASIC_AUTH off
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"] |
PHP application Dockerfile: FROM php:8.1-fpm
WORKDIR /var/www
RUN apt-get update && apt-get install -y lsb-release \
&& echo "deb http://deb.debian.org/debian $(lsb_release -sc)-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-get update && apt-get install -y --no-install-recommends \
autoconf automake libtool nasm make pkg-config libz-dev build-essential openssl g++ \
libzip-dev libicu-dev libbz2-dev libavif-dev libheif-dev libpng-dev libc-client-dev libonig-dev \
libkrb5-dev libxml2-dev libxslt1.1 libxslt1-dev locales locales-all \
libfreetype6-dev ffmpeg ghostscript pngcrush jpegoptim exiftool liblcms2-dev libwebp-dev poppler-utils git wget \
libx11-dev libjpeg-dev libtiff-dev opencv-data webp graphviz libreoffice cmake unzip rsync \
msmtp procps gettext-base nano sudo iproute2 libltdl-dev \
liblqr-1-0-dev libjpeg-turbo-progs libjpeg62-turbo-dev libopenjp2-7-dev \
libdjvulibre-dev libpango1.0-dev libxpm-dev \
xfonts-75dpi xfonts-base \
advancecomp zopfli optipng pngquant
RUN wget https://imagemagick.org/archive/ImageMagick.tar.gz \
&& tar -xvf ImageMagick.tar.gz \
&& cd ImageMagick-7.* \
&& ./configure --enable-shared --with-tiff=yes --disable-docs --with-tcmalloc --without-perl \
&& make --jobs=$(nproc) \
&& make install \
&& ldconfig /usr/local/lib \
&& cd .. \
&& rm -rf ImageMagick* \
&& docker-php-ext-install -j$(nproc) intl mysqli bcmath bz2 gd soap xsl pdo pdo_mysql fileinfo exif zip opcache sockets \
&& docker-php-ext-enable intl mysqli bcmath bz2 gd soap xsl pdo pdo_mysql fileinfo exif zip opcache sockets \
&& pecl install imagick apcu redis \
&& pecl install -f xmlrpc \
&& docker-php-ext-enable redis imagick apcu xmlrpc \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install -j$(nproc) imap \
&& docker-php-ext-enable imap \
\
&& pecl install -o -f xdebug \
&& cd ~
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_MEMORY_LIMIT -1
ENV COMPOSER_HOME /var/www/.composer
VOLUME /var/www/.composer
ENV PIMCORE_ROOT /var/www/pimcore
ENV PHP_MEMORY_LIMIT 2G
ENV PHP_ENABLE_XDEBUG false
ENV DEBUG false
ENV UPDATE_UID_GID false
ENV APP_ENV dev
ENV CLUSTER_SETUP false
# PHP opcache default values
ENV OPCACHE_MAX_FILES 16229
ENV OPCACHE_MEMORY 128
ENV OPCACHE_STRINGS_BUFFER 24
ENV OPCACHE_VALIDATE_TIMESTAMPS 1
ENV OPCACHE_REVALIDATE_FREQ 2
# PHP fpm
ENV PHP_PM_MAX_CHILDREN 20
ENV PHP_PM_START_SERVERS 8
ENV PHP_PM_MIN_SPARSE_SERVERS 5
ENV PHP_PM_MAX_SPARSE_SERVERS 12
ENV UPLOAD_MAX_FILESIZE 64M
ENV POST_MAX_SIZE 128M
# New Relic:
ENV NEW_RELIC_LICENSE_KEY must_set
ENV NEW_RELIC_APM_HIGH_SECURITY_MODE false
ENV NEW_RELIC_APM_ENABLED false
ENV NEW_RELIC_PROJECT_NAME must_set
ENV NEW_RELIC_COMMON_APP_NAME Pimcore
ENV NEW_RELIC_TIER_LABEL FPM
ENV NEW_RELIC_ENVIRONMENT_LABEL must_set
COPY etc/bashrc.sh /tmp/
RUN cat /tmp/bashrc.sh >> /etc/bash.bashrc && rm -f /tmp/bashrc.sh
COPY etc/php-fpm.conf.tmpl /usr/local/etc/
COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-pimcore.ini
COPY etc/php-mail.ini /usr/local/etc/php/conf.d/zz-mail.ini
COPY etc/php-opcache.ini /usr/local/etc/php/conf.d/zz-opcache.ini
COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini
COPY etc/php-timezone.ini /usr/local/etc/php/conf.d/zz-timezone.ini
COPY etc/php-newrelic.ini /usr/local/etc/php/conf.d/zz-newrelic.ini
COPY etc/msmtp.conf.tmpl /etc/
COPY bin/* /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
RUN touch /var/log/msmtp.log && chown www-data /var/log/msmtp.log
# Install NR with multiarch support
RUN VERSION_REGEX='[1-9][0-9]\?\(\.[0-9]\+\)\{3\}' \
&& NEWRELIC_FILE=$(curl 'https://download.newrelic.com/php_agent/release/' | grep -o 'newrelic-php5.*linux\.tar\.gz' | sed -e 's/^.*>//;s/<[^>]*>//g') \
&& NEWRELIC_FOLDER=$(echo ${NEWRELIC_FILE} | sed 's/.tar.gz//g') \
&& curl https://download.newrelic.com/php_agent/release/${NEWRELIC_FILE} | tar -zx \
&& cd ${NEWRELIC_FOLDER} \
&& export NR_INSTALL_USE_CP_NOT_LN=1 \
&& export NR_INSTALL_SILENT=1 \
&& export NR_INSTALL_KEY=TEMPLICENSEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA \
&& ./newrelic-install install \
&& rm -rf ${NEWRELIC_FOLDER}
RUN ln -fs /usr/share/zoneinfo/Europe/Oslo /etc/localtime && echo "Europe/Oslo" > /etc/timezone
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["php-fpm", "-F"] |
@NiklasBr do you run this with Rosetta or Qemu? |
@dgageot I also tried |
Your issue is a run issue, not a build issue. Could you try with and without Rosetta enabled? |
Same error without Rosetta enabled:
|
This can't be a rosetta error |
Not disagreeing, but in real life it is still a blocking problem. Cannot use the Docker license I am paying for at the moment. |
@NiklasBr That would be easier to help you with a basic project to repro. You shared dockerfiles but they rely on plenty of files on your system. I really really want to help you but it requires way too much guessing on my part. |
I have always been willing to share screen and details in a non-public forum due to the fact that they contain customer data. |
Can you contact me at david.gageot@docker.com to organise a call? |
I've been following this thread and #7037 opcache seems to be failing for me in a simple setup. Here is my setup Docker file
Commands
Then inside the container
As you can see httpd crashes on start. |
Thanks @delmarr, I was able to reproduce. I'll take a close look later today or tomorrow. Here are the command I used (slightly modified):
|
@delmarr @NiklasBr for both of you, the same code fails both on qemu and rosetta. And it used to work in both cases in Docker Desktop 4.26.1. I think you are seeing a variant of the same issue. I've got a fix for Rosetta being evaluated. Hopefully it'll make it into 4.28.0. This the continuation of the work to prevent php and friends to segfault under Rosetta when Huge Pages are enabled on the kernel. I'm also investigating a fix for Qemu. This one is again an issue with Qemu 8.1.5 that we didn't have in 6.something. Not sure if this one will make it into 4.28.0 |
@dgageot I see the release notes are taking shape which mentions this issue. The pre-release build you sent me did not resolve it as you remember, is there a new one to test? |
Hey @NiklasBr, 4.28.0 should be out very soon. I expect it to fix your issue on Rosetta. Not on Qemu, though. Qemu 8.1.5 still has a regression that is closely related to your issue but that we couldn't totally fix. |
@delmarr @NiklasBr Could you give a try to Docker Desktop 4.28? It should be fixed on Rosetta. On QEMU, it depends of the workflow. Some are still broken. |
No more Signal 11 errors for the first few hours! 🎊 Though it introduced a new one: |
@NiklasBr the popup is a known issue. It's fixed on our side and will ship either with a 4.28.1 or with 4.29. |
I'll open a new issue for the Too many open files issue, for what it worth I think my original reported issue is solved, thanks! |
I got the "Too many open files" on debian based image and "No file descriptors available" on alpine based image from docker mac 4.29 and 4.30 @NiklasBr Is there a new issue about this, I didn't find it. |
Description
After updating to Docker Desktop 4.27.2 from 4.26.1 PHP-FPM containers cannot run without crashing with the error:
Reproduce
docker compose up -d
Expected behavior
It should run as well as it did in 4.26.1
docker version
Client: Cloud integration: v1.0.35+desktop.10 Version: 25.0.3 API version: 1.44 Go version: go1.21.6 Git commit: 4debf41 Built: Tue Feb 6 21:13:26 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.27.2 (137060) Engine: Version: 25.0.3 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: f417435e5f6216828dec57958c490c4f8bae4f98 Built: Wed Feb 7 00:39:16 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
The text was updated successfully, but these errors were encountered: