拉威尔+;PHP 8 fpm SIGSEGV(信号11)
在PHP8FPM上发生了非常奇怪的事情(使用任何有说服力的东西都会触发它),并且无法调试coredump(PHP7.3还可以) 环境是Debian 10(流浪者虚拟机,也做水滴)拉威尔+;PHP 8 fpm SIGSEGV(信号11),php,laravel,fpm,Php,Laravel,Fpm,在PHP8FPM上发生了非常奇怪的事情(使用任何有说服力的东西都会触发它),并且无法调试coredump(PHP7.3还可以) 环境是Debian 10(流浪者虚拟机,也做水滴) Vagrant php-v显示php 8.0.3 DoDropletPHP-v显示php 8.0.5 Composer显示并刚刚进行了Composer全局更新 ... "require": { "php": "^7.3|^8.0",
- Vagrant php-v显示php 8.0.3
- DoDropletPHP-v显示php 8.0.5
...
"require": {
"php": "^7.3|^8.0",
"aws/aws-sdk-php": "^3.176",
"barryvdh/laravel-cors": "^2.0",
"barryvdh/laravel-debugbar": "^3.5",
"barryvdh/laravel-ide-helper": "^2.9",
"barryvdh/laravel-snappy": "^0.4.8",
"beyondcode/laravel-dump-server": "^1.7",
"dyrynda/laravel-nullable-fields": "^4.1",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"google/apiclient": "^2.",
"guzzlehttp/guzzle": "^7.3",
"hashids/hashids": "^4.1",
"laracasts/flash": "^3.2",
"laravel/cashier": "^12.10",
"laravel/framework": "^8.40",
"laravel/horizon": "^5.7",
"laravel/sanctum": "^2.9",
"laravel/scout": "^8.6",
"laravel/socialite": "^5.2",
"laravel/telescope": "^4.4",
"laravel/tinker": "^2.6",
"laravel/ui": "^3.2",
"laravelcollective/html": "^6.2",
"league/csv": "^9.7",
"league/flysystem-aws-s3-v3": "^1.0",
"phery/phery": "^2.7",
"php-parallel-lint/php-console-color": "^1.0",
"plivo/plivo-php": "^4.18",
"predis/predis": "^1.1",
"sofa/eloquence": "dev-master",
"vinkla/hashids": "^9.1",
"wildbit/postmark-php": "^4.0",
"wildbit/swiftmailer-postmark": "^3.3"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
Nginx+php7.4-fpm
Laravel(PHP)代码在php7.4-fpm(nginx+fpm的正常设置)中工作
如果出现语法错误,浏览器会显示一个带有错误的漂亮网页(以及指向望远镜的链接)
Nginx+php8.0-fpm
大多数“简单”PHP页面都可以工作(一个快速的phpinfo.PHP也可以很好地工作)。。但是,当您单击的登录页面上的提交时,它开始显示“502坏网关”(nginx)(显示初始表单)
这只发生在php8.0-fpm上(使用流浪VM,也在DO液滴上复制)
有什么东西导致php8.0-fpm信号为SIGSEGV(信号11)。它甚至没有命中laravel日志,nginx显示php8.0-fpm响应中的“502坏网关”(标准nginx错误页面)
在/var/log/php8.0-fpm.log
WARNING: [pool www] child 3956 exited on signal 11 (SIGSEGV - core dumped) after 63.502325 seconds from start
我已经能够生成核心转储,但是bt
没有显示太多信息。核心转储(在一个流浪的虚拟机上)超过200MB(页面刷新的巨大文件?),从#0到#38286(很多很多行),几乎都是相同的东西,没有我期望看到的功能(函数或帧),它似乎处于无限循环中
Reading symbols from /usr/sbin/php-fpm8.0...(no debugging symbols found)...done.
[New LWP 3956]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php-fpm: pool www '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000056483469fa4e in zend_is_callable_at_frame ()
(gdb) bt
#0 0x000056483469fa4e in zend_is_callable_at_frame ()
#1 0x00005648346a09a7 in zend_is_callable_ex ()
#2 0x00005648346a0adc in zend_fcall_info_init ()
#3 0x00005648345ca7ec in ?? ()
#4 0x0000564834701268 in execute_ex ()
#5 0x000056483468c5d2 in zend_call_function ()
#6 0x00005648345ca820 in ?? ()
#7 0x0000564834701268 in execute_ex ()
#8 0x000056483468c5d2 in zend_call_function ()
#9 0x00005648345ca820 in ?? ()
#10 0x0000564834701268 in execute_ex ()
#11 0x000056483468c5d2 in zend_call_function ()
#12 0x00005648345ca820 in ?? ()
...
#38280 0x00005648345ca820 in ?? ()
#38281 0x0000564834701268 in execute_ex ()
#38282 0x0000564834702c3c in zend_execute ()
#38283 0x0000564834699e0d in zend_execute_scripts ()
#38284 0x0000564834636b0b in php_execute_script ()
#38285 0x00005648344f0109 in ?? ()
#38286 0x00007f7c0e98109b in __libc_start_main (main=0x5648344ef280, argc=4, argv=0x7ffd1785e398, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd1785e388) at ../csu/libc-start.c:308
#38287 0x00005648344f0f1a in _start ()
但是,添加以下内容将得到SIGSEGV
$user=user::find(10001);
或
$users=User::all();//数据库中只有31条记录
有什么想法吗?可能降级回PHP7.4(这似乎不是一个好办法)
也许这就是PHP8处理错误与异常的方式?看起来这是一个无限循环,由这个库(用于降低模型属性的融合程度)(dev master)注释掉模型中的特征而引起。
//使用雄辩
没有专门生成SIGSEGV,看起来像这个问题,但在php7.4上工作。奇怪的是,还有另一个库看起来像fork(但不是真正的fork?),也许有另一种方法可以降低模型属性的复杂性?对于502,您可以尝试使用SSH访问sudo service php7.4-fpm restart
?