Closed acrossoffwest closed 4 years ago
Hmm, could you also share the exact version of PHP you are using when the segmentation fault occurred?
@stayallive 7.4
I am experiencing the same issue.
@acrossoffwest are you able to consistently trigger this using the php artisan migrate:rollback
command?
When trying your composer.json
I am unable to trigger this on OS X (with your composer requirements and just a clean Lumen with Sentry configured):
PHP 7.4.0 (cli) (built: Nov 29 2019 16:18:44) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies
@sidvanvliet are you also on Lumen and PHP 7.4? Could you share your composer.json
.
Could you both tell me a bit more about the machine you are running into this like the OS & output from php -v
?
Edit: Sharing your bootstrap/app.php
could also help to see what's enabled / configured that might be able to cause the event leading to the segfault.
@stayallive I am using using Laravel Framework 6.4 with PHP 7.4.0 on a MacBook Pro running version 10.15 (Catalina)
Here is the php -v
output:
PHP 7.4.0 (cli) (built: Nov 29 2019 16:18:44) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies
My composer.json looks like this:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.4",
"ext-json": "*",
"facade/ignition": "^1.4",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.5",
"laravel/framework": "6.4.*",
"laravel/horizon": "^3.4",
"laravel/slack-notification-channel": "^2.0",
"laravel/telescope": "^2.1",
"laravel/tinker": "^1.0",
"owen-it/laravel-auditing": "9.3.*",
"predis/predis": "^1.1",
"sentry/sentry-laravel": "1.3.*",
"spatie/laravel-translatable": "^4.1"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2",
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": [
"app/Helpers/GeneralHelper.php"
],
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
And my bootstrap/app.php
looks like this (default):
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
@sidvanvliet ah, I wondered why your bootstrap/app.php
looked like that but as you said you are on the full framework, in that case it's not relevant but thanks for sharing :)
Can you also share what exactly you do or what happens in your app when the segfault occurs?
And one more moment I'm using Docker with image: php:7.4.0-fpm-buster
@stayallive It happened when a job failed.
Can any of you two share or extract a reliable reproduction out of where it fails for you because I'm unable to make it happen still.
My best guess is this is a 7.4 bug and is triggered by our error tracking or trying to access something from the shutdown function (wouldn't be the first time) but it's extremely tricky to find a reproduction so we can try and figure out if we can fix this.
I tried to repeat this issue on new lumen project and it worked fine.
If by any chance you run into it again please do let us know if you have more info so we can investigate further!
Require from composer.json:
When I tried throw Exception I catch:
Segmentation fault(core dump)
For example on "sentry/sentry": "^2.0" and "sentry/sentry-laravel": "1.2.0" I catch these errors:
For example on "sentry/sentry": "2.2.5" and "sentry/sentry-laravel": "1.5.0" I catch only:
Segmentation fault (core dumped)
I don't know what happened maybe somebody caught this and resolved?
Upd: While It's only in scheme migration:
Here I included wrong index and after it I caught
Segmentation fault
Upd: PHP Version:7.4