我对分段错误有疑问。
我正在运行 Debian + Nging + Php5-fpm + Mysql + Imagemagick。
如何找出导致分段错误的脚本(或程序)?我需要一个非常简单的分步说明。我在 Google 上搜索,所有可用的说明都是针对专业人士的 - “如果您有核心文件,请执行此操作...”、“连接调试器”等。
就我而言,分段错误并不常见。有时一天内就会出现 10 个分段错误,但有时几个月都不会出现。我没有任何只偶尔运行的脚本。如果是脚本问题,我每天肯定都会出现数百个分段错误。那么,为什么分段错误只偶尔发生呢?
最常见的段错误情况有哪些?
。
[28-May-2013 21:33:51] WARNING: [pool www] child 19448 exited on signal 11 (SIGSEGV) after 3514.206284 seconds from start
[28-May-2013 21:33:56] WARNING: [pool www] child 20302 exited on signal 11 (SIGSEGV) after 4.462827 seconds from start
[07-Jun-2013 20:57:40] WARNING: [pool www] child 2685 exited on signal 11 (SIGSEGV) after 58927.043729 seconds from start
[07-Jun-2013 20:58:37] WARNING: [pool www] child 2684 exited on signal 11 (SIGSEGV) after 58987.506016 seconds from start
[10-Jun-2013 01:23:01] WARNING: [pool www] child 14603 exited on signal 11 (SIGSEGV) after 51802.304617 seconds from start
[10-Jun-2013 01:23:58] WARNING: [pool www] child 9218 exited on signal 11 (SIGSEGV) after 74891.918340 seconds from start
[24-Jun-2013 00:04:39] WARNING: [pool www] child 22121 exited on signal 11 (SIGSEGV) after 156563.946260 seconds from start
[24-Jun-2013 00:06:01] WARNING: [pool www] child 25055 exited on signal 11 (SIGSEGV) after 81.358472 seconds from start
[24-Jun-2013 00:07:10] WARNING: [pool www] child 20595 exited on signal 11 (SIGSEGV) after 165026.445021 seconds from start
[24-Jun-2013 00:07:55] WARNING: [pool www] child 22122 exited on signal 11 (SIGSEGV) after 156754.694714 seconds from start
[13-Jul-2013 15:59:31] WARNING: [pool www] child 24307 exited on signal 11 (SIGSEGV) after 2526.197996 seconds from start
[13-Jul-2013 15:59:42] WARNING: [pool www] child 24318 exited on signal 11 (SIGSEGV) after 2528.783217 seconds from start
[13-Jul-2013 16:02:29] WARNING: [pool www] child 24389 exited on signal 11 (SIGSEGV) after 2260.254718 seconds from start
[13-Jul-2013 16:19:51] WARNING: [pool www] child 25119 exited on signal 11 (SIGSEGV) after 1209.036619 seconds from start
[15-Jul-2013 01:22:29] WARNING: [pool www] child 20613 exited on signal 11 (SIGSEGV) after 3060.402119 seconds from start
答案1
我不认为我会从核心转储开始,因为你不熟悉这些工具。首先,由于这是子段错误,请检查 php 错误。修复任何 php 错误。发布任何你无法弄清楚的 php 错误。
段错误通常与内存有关,并且内存一直在变化,尤其是在服务器负载发生变化时。
内存问题、堆栈问题。php 堆栈中的任何配置错误。php 错误发生后会导致更大的问题。
您正在运行最新的 Imagemagick 吗?
您是否正在运行操作码缓存(apc 等)?如果是,请尝试关闭并查看错误是否消失。
如果这些都不起作用,您将必须设置 Xdebug 并调试应用程序。