Search code examples
laraveldockerxdebug

Docker Laravel Container Throwing [pid X] AH00052: child pid XXXX exit signal Segmentation fault (11) when PhpStorm Xdebug Listening is Turned On


I have a strange situation happening on my M3 Macbook Pro that is preventing me from debugging a particular Docker container.

This worked without hitches on my previous M2 Macbook Pro.

My workflow is to use PhpStorm for a Laravel API repo. Here are the environment options from the docker-compose.yml file:

    environment:
      APACHE_DOCUMENT_ROOT: /var/www/html/public/
      PHP_EXTENSION_XDEBUG: 1
      PHP_EXTENSION_MONGODB: 1
      PHP_EXTENSION_JSON: 1
      PHP_EXTENSION_GD: 1
      PHP_EXTENSION_PDO_SQLITE: 1
      PHP_INI_MEMORY_LIMIT: 256M
      PHP_INI_XDEBUG__MODE: "develop,debug"
      PHP_INI_XDEBUG__CLIENT_HOST: "host.docker.internal"
      PHP_INI_XDEBUG__START_WITH_REQUEST: "${XDEBUG:-yes}"
      PHP_IDE_CONFIG: "serverName=app.local"

When the container is started with XDEBUG set to yes, I can send requests to my API and the application handles them, no problem. But when I toggle debug listening in PhpStorm, the process inside the container inevitable fails with variant of the following message:

[core:notice] [pid 7] AH00052: child pid 2764 exit signal Segmentation fault (11)

This is preventing my from using the debugger entirely.

Here are the resources I've allocated to the Docker engine:

docker resources


Solution

  • Updating the php in the container from 8.1 to 8.2 solved this.