du9843 2016-05-09 21:38
浏览 235

SIGSEGV在php-fpm中

I found several questions that mention problems with php 5.5.x and higher and php-fpm where php crashes with:

WARNING: [pool pool_name] child 9757 exited on signal 11 (SIGSEGV - core dumped) after 24.790363 seconds from start

In the apache error log you can see this message

(104)Connection reset by peer: FastCGI: comm with server "/path/to/pool/php56-fcgi-pool_name" aborted: read failed

In my setup I run php 5.6.21 and I get this error on a Shopware instance and I can reproduce it. I tried to enable debugging for php, but since Shopware needs the ioncube loader it's not possible to run php with debugging symbols and the ioncube loader.

As a second try I used this script to create traces for every php-fpm instance: https://gist.github.com/hydra35/1893093. For my error this trace looks like this:

     0.000036 access("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core/CouchCommerce/Bootstrap.php", R_OK) = 0
 0.000415 gettimeofday({1462828780, 911678}, NULL) = 0
 0.000042 gettimeofday({1462828780, 911719}, NULL) = 0
 0.000057 gettimeofday({1462828780, 911780}, NULL) = 0
 0.000036 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core/CouchCommerce/Bootstrap.php", {st_mode=S_IFREG|0644, st_size=17113, ...}) = 0
 0.000057 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core/CouchCommerce", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
 0.000044 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
 0.000048 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
 0.000045 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 0.000073 gettimeofday({1462828780, 912082}, NULL) = 0
 0.000035 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core/CouchCommerce/Bootstrap.php", {st_mode=S_IFREG|0644, st_size=17113, ...}) = 0
 0.000051 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core/CouchCommerce", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0
 0.000046 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
 0.000059 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
 0.000042 lstat("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 0.000048 open("/home/user/www/www.example.org/htdocs/engine/Shopware/Plugins/Community/Core/CouchCommerce/Bootstrap.php", O_RDONLY) = 5
 0.000479 fstat(5, {st_mode=S_IFREG|0644, st_size=17113, ...}) = 0
 0.000049 fstat(5, {st_mode=S_IFREG|0644, st_size=17113, ...}) = 0
 0.000038 fstat(5, {st_mode=S_IFREG|0644, st_size=17113, ...}) = 0
 0.000035 mmap(NULL, 17113, PROT_READ, MAP_SHARED, 5, 0) = 0x7fc756a10000
 0.000844 brk(0x2ea5000)            = 0x2ea5000
 0.000359 munmap(0x7fc756a10000, 17113) = 0
 0.000075 close(5)                  = 0
 0.000051 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x3d} ---
 0.051948 +++ killed by SIGSEGV (core dumped) +++

How much of the strace is needed to really make a statement? How else is it possible to debug php for this application to solve the error that leads to this crash?

Thanks for your help Andi

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 comsol稳态求解器 找不到解,奇异矩阵有1个空方程返回的解不收敛。没有返回所有参数步长;pid控制
    • ¥15 怎么让wx群机器人发送音乐
    • ¥15 fesafe材料库问题
    • ¥35 beats蓝牙耳机怎么查看日志
    • ¥15 Fluent齿轮搅油
    • ¥15 八爪鱼爬数据为什么自己停了
    • ¥15 交替优化波束形成和ris反射角使保密速率最大化
    • ¥15 树莓派与pix飞控通信
    • ¥15 自动转发微信群信息到另外一个微信群
    • ¥15 outlook无法配置成功