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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?