0

I am having trouble with PHP 8 + Laravel 8.4

I get errors like

 [30-Jul-2021 10:13:23] WARNING: [pool www] child 1098 exited on signal 11 (SIGSEGV - core dumped) after 0.422025 seconds from start

My composer.json

{
    "name": "dd",
    "description": "dd",
    "type": "project",
    "require": {
        "php": "^7.4|^8.0",
        "ext-bcmath": "*",
        "ext-curl": "*",
        "ext-dom": "*",
        "ext-gd": "*",
        "ext-gmp": "*",
        "ext-imagick": "*",
        "ext-imap": "*",
        "ext-json": "*",
        "ext-mcrypt": "*",
        "ext-xml": "*",
        "aws/aws-sdk-php": "^3.186",
        "codercat/jwk-to-pem": "^1.1",
        "facebook/graph-sdk": "^5.7",
        "fideloper/proxy": "^4.4",
        "firebase/php-jwt": "^5.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "intervention/image": "^2.6",
        "kreait/firebase-php": "^5.21",
        "laravel/framework": "^8.40",
        "laravel/tinker": "^2.5",
        "minishlink/web-push": "^6.0",
        "newrelic/monolog-enricher": "^2.0",
        "predis/predis": "^1.1",
        "sendgrid/sendgrid": "^7.9",
        "tymon/jwt-auth": "^1.0"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3",
        "squizlabs/php_codesniffer": "^3.6"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
          "app/helpers.php"
        ]
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

I am using my own custom docker image for this, which is working fine for another php 8 project https://github.com/kristijorgji/docker-images/tree/main/php-fpm-8-nginx

Initially I could not install composer install, because after script failed

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

                                                          
  [Symfony\Component\Process\Exception\RuntimeException]  
  The process has been signaled with signal "11".      

then I removed php artisan package:discover --ansi from scripts.post-autoload-dump and composer install worked fine.

Then when making test HTTP GET calls, I saw that php also died with signal 11 like posted here.

HOw can I debug get more information ? I checked logs no more info then this, only reading exited on signal 11...

As the information is not enough, I have no idea how to debug why this happens.

gp_sflover
  • 3,460
  • 5
  • 38
  • 48
Kristi Jorgji
  • 1,154
  • 1
  • 14
  • 39
  • You can configure Linux to generate a core dump on SIGSEGV then explore it with GDB, but this might be daunting if you don't have experience with it. However, getting the stack trace produced might allow you to have better luck googling for bugs in the particular version of; PHP, Larval, Nginix? or whatever is coring. https://stackoverflow.com/questions/17965/how-to-generate-a-core-dump-in-linux-on-a-segmentation-fault – Tim Jul 30 '21 at 16:34
  • Thanks I have tried that but does not work on alpine linux – Kristi Jorgji Aug 23 '21 at 09:30

0 Answers0