简体   繁体   English

PHP-FPM段错误6

[英]PHP-FPM segfault error 6

i have a problem with php5-fpm. 我有php5-fpm的问题。 Very often it gets a segfault and is blocking the whole php processing, so no answer is serve to the client. 通常它会出现段错误并阻止整个php处理,因此无法为客户端提供任何答案。 For me the backtrace is looking like a infinite loop, but i don't see if it is cause by a script or an internal php module. 对我来说,回溯看起来像一个无限循环,但我不知道它是由脚本或内部php模块引起的。

Is there any chance to see which script/module is involved? 有没有机会看到涉及哪个脚本/模块?

The Segfault is always looking like that (dmesg output): Segfault总是看起来像那样(dmesg输出):

php5-fpm[1858]: segfault at 7fffa4de4fa0 ip 0000000000691515 sp 00007fffa4de4f90 error 6 in php5-fpm[400000+800000]

PHP Version: PHP版本:

php -v
PHP 5.5.9-1ubuntu4.11 (cli) (built: Jul  2 2015 15:23:08)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

Backtrace of Coredump: Coredump的Backtrace:

(gdb) bt
#0  0x0000000000691515 in ?? ()
#1  0x0000000000692a64 in vspprintf ()
#2  0x0000000000707359 in zend_spprintf ()
#3  0x00000000006e4a46 in _convert_to_string ()
#4  0x0000000000725859 in ?? ()
#5  0x0000000000717668 in execute_ex ()
#6  0x00000000006dd7c9 in dtrace_execute_ex ()
#7  0x000000000079df80 in ?? ()
#8  0x0000000000717668 in execute_ex ()
#9  0x00000000006dd7c9 in dtrace_execute_ex ()
#10 0x000000000079df80 in ?? ()
#11 0x0000000000717668 in execute_ex ()
#12 0x00000000006dd7c9 in dtrace_execute_ex ()
#13 0x000000000079df80 in ?? ()
#14 0x0000000000717668 in execute_ex ()
#15 0x00000000006dd7c9 in dtrace_execute_ex ()
#16 0x000000000079df80 in ?? ()
#17 0x0000000000717668 in execute_ex ()
#18 0x00000000006dd7c9 in dtrace_execute_ex ()
#19 0x000000000079df80 in ?? ()
#20 0x0000000000717668 in execute_ex ()
#21 0x00000000006dd7c9 in dtrace_execute_ex ()
#22 0x000000000079df80 in ?? ()
#23 0x0000000000717668 in execute_ex ()
#24 0x00000000006dd7c9 in dtrace_execute_ex ()
#25 0x000000000079df80 in ?? ()
#26 0x0000000000717668 in execute_ex ()
#27 0x00000000006dd7c9 in dtrace_execute_ex ()
#28 0x000000000079df80 in ?? ()
#29 0x0000000000717668 in execute_ex ()
#30 0x00000000006dd7c9 in dtrace_execute_ex ()
#31 0x000000000079df80 in ?? ()
#32 0x0000000000717668 in execute_ex ()
#33 0x00000000006dd7c9 in dtrace_execute_ex ()
#34 0x000000000079df80 in ?? ()
#35 0x0000000000717668 in execute_ex ()
#36 0x00000000006dd7c9 in dtrace_execute_ex ()
#37 0x000000000079df80 in ?? ()
#38 0x0000000000717668 in execute_ex ()
#39 0x00000000006dd7c9 in dtrace_execute_ex ()
#40 0x000000000079df80 in ?? ()
#41 0x0000000000717668 in execute_ex ()
#42 0x00000000006dd7c9 in dtrace_execute_ex ()
#43 0x000000000079df80 in ?? ()
#44 0x0000000000717668 in execute_ex ()
#45 0x00000000006dd7c9 in dtrace_execute_ex ()
#46 0x000000000079df80 in ?? ()
(...)
#68150 0x0000000000717668 in execute_ex ()
#68151 0x00000000006dd7c9 in dtrace_execute_ex ()
#68152 0x000000000079df80 in ?? ()
#68153 0x0000000000717668 in execute_ex ()
#68154 0x00000000006dd7c9 in dtrace_execute_ex ()
#68155 0x000000000079df80 in ?? ()
#68156 0x0000000000717668 in execute_ex ()
#68157 0x00000000006dd7c9 in dtrace_execute_ex ()
#68158 0x000000000079cec1 in ?? ()
#68159 0x0000000000717668 in execute_ex ()
#68160 0x00000000006dd7c9 in dtrace_execute_ex ()
#68161 0x00000000006ef250 in zend_execute_scripts ()
#68162 0x000000000068f065 in php_execute_script ()
#68163 0x0000000000463b00 in main ()

Backtrace get Filename: Backtrace获取文件名:

(gdb) print (char *)executor_globals.active_op_array->filename
Attempt to extract a component of a value that is not a structure.

Installed Packages: 安装包:

dpkg -l | grep php
ii  php5-apcu                           4.0.2-2build1                       amd64        APC User Cache for PHP 5
ii  php5-cli                            5.5.9+dfsg-1ubuntu4.11              amd64        command-line interpreter for the php5 scripting language
ii  php5-common                         5.5.9+dfsg-1ubuntu4.11              amd64        Common files for packages built from the php5 source
ii  php5-curl                           5.5.9+dfsg-1ubuntu4.11              amd64        CURL module for php5
ii  php5-fpm                            5.5.9+dfsg-1ubuntu4.11              amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php5-gd                             5.5.9+dfsg-1ubuntu4.11              amd64        GD module for php5
ii  php5-json                           1.3.2-2build1                       amd64        JSON module for php5
ii  php5-mcrypt                         5.4.6-0ubuntu5                      amd64        MCrypt module for php5
ii  php5-mysqlnd                        5.5.9+dfsg-1ubuntu4.11              amd64        MySQL module for php5 (Native Driver)
ii  php5-readline                       5.5.9+dfsg-1ubuntu4.11              amd64        Readline module for php5

APC is compatible with PHP 5.5. APC与PHP 5.5兼容。 You should disable it. 你应该禁用它。 However Opcache is included, so you can use that instead. 但是包含Opcache,所以你可以使用它。 I'm not sure if that will fix your problem, but could very well be the culprit. 我不确定这是否能解决你的问题,但很可能是罪魁祸首。

Also some other things that might help- when does the segfault occur? 还有一些其他可能有用的东西 - 何时发生段错误? When the process starts? 这个过程何时开始? Or when a request is made? 或者在提出请求时?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM