我在Apache日志中不断收到以下错误:
[Wed Sep 18 17:59:20 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch configured -- resuming normal operations
[Wed Sep 18 18:06:30 2013] [notice] child pid 7505 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Wed Sep 18 18:06:35 2013] [notice] child pid 7497 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Wed Sep 18 18:13:53 2013] [notice] child pid 7501 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Wed Sep 18 18:13:53 2013] [notice] child pid 7506 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Wed Sep 18 18:14:14 2013] [notice] child pid 8708 exit signal Segmentation fault (11), possible coredump in /etc/apache2
我试图通过执行以下操作来追溯它:
user:~$ sudo gdb
user 8670 8571 0 18:12 pts/3 00:00:00 grep --color=auto httpd
user:~$ sudo gdb
(gdb) attach 8571
Attaching to process 8571
Reading symbols from /bin/bash...(no debugging symbols found)...done.
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_compat.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnsl.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_nis.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2
0x00007f553000244e in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) backtrace
#0 0x00007f553000244e in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000441419 in ?? ()
#2 0x000000000044255c in wait_for ()
#3 0x0000000000432c88 in execute_command_internal ()
#4 0x00000000004352fe in execute_command ()
#5 0x000000000041e31d in reader_loop ()
#6 0x000000000041ca87 in main ()
(gdb) backtrace full
#0 0x00007f553000244e in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x0000000000441419 in ?? ()
No symbol table info available.
#2 0x000000000044255c in wait_for ()
No symbol table info available.
#3 0x0000000000432c88 in execute_command_internal ()
No symbol table info available.
#4 0x00000000004352fe in execute_command ()
No symbol table info available.
#5 0x000000000041e31d in reader_loop ()
No symbol table info available.
#6 0x000000000041ca87 in main ()
No symbol table info available.`
我无法解决这个问题。
我还在apache上运行gdb,如下所示:
user:~$ sudo gdb apache2
Reading symbols from /usr/sbin/apache2...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/sbin/apache2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
apache2: bad user name ${APACHE_RUN_USER}
[Inferior 1 (process 6925) exited with code 01]
我不知道它是否与此问题有关,但是一旦我安装了gdb,我登录时会显示以下消息:
=> There were exceptions while processing one or more plugins. See
/var/log/landscape/sysinfo.log for more information.
sysinfo.log包含以下内容:
for process_info in info.get_all_process_info():
File "/usr/lib/python2.7/dist-packages/landscape/lib/process.py", line 49, in get_all_process_info
process_info = self.get_process_info(process_id)
File "/usr/lib/python2.7/dist-packages/landscape/lib/process.py", line 85, in get_process_info
process_info["state"] = STATES[state]
KeyError: 't (tracing stop)'
2013-09-18 18:43:35,633 ERROR Processes plugin raised an exception.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/landscape/sysinfo/sysinfo.py", line 99, in run
result = plugin.run()
File "/usr/lib/python2.7/dist-packages/landscape/sysinfo/processes.py", line 18, in run
for process_info in info.get_all_process_info():
File "/usr/lib/python2.7/dist-packages/landscape/lib/process.py", line 49, in get_all_process_info
process_info = self.get_process_info(process_id)
File "/usr/lib/python2.7/dist-packages/landscape/lib/process.py", line 85, in get_process_info
process_info["state"] = STATES[state]
KeyError: 't (tracing stop)'
一些背景。
我在我的VPS上运行一个WordPress网站。 VPS是基于Ubuntu的LAMP服务器,安装了PERL和CURL。我使用APC进行缓存,但在安装APC之前发生了分段故障。最后,我通过Google PageSpeed Service运行我的服务器,所以我已经为Apache 2.2安装了mod_remoteip mod并且有一个X-Forwarded-For标头。
ulimit核心是无限的。 我的phpinfo()文件可以在这里找到:http://tecne.ws/11v
请协助。非常感谢!
答案 0 :(得分:6)
我遇到了这个问题,并在apache配置中将LogLevel warn
更改为LogLevel debug
。在重新启动时,它似乎是在mod_deflate之后的segfaulting。
在debian / ubuntu中关闭mod_deflate应该只是sudo a2dismod deflate
答案 1 :(得分:3)
答案 2 :(得分:1)
经过一整天的尝试追踪,没有解决方案有效。然而,我最终将Apache转为调试级别日志记录,并立即注意到数百条通知/警告,谷歌的mod_pagespeed让Apache尝试重写Jetpack的Photon图像中的图像。
我做了一个简单的 a2dismod pagespeed ,没有更多的分段错误。
还注意到我的网站实际上运行得更快,现在关闭了mod pagespeed。
似乎有很多关于pagespeed导致分段错误的错误报告。
不确定它只是mod_pagespeed还是mod_pagespeed,wordpress和php的组合....但现在关闭了问题。
我现在已经完成了它,现在也正在将所有内容移动到Nginx。在Apache上追踪错误总是变成一场噩梦,Nginx我可以在几秒到一分钟内发现错误。
答案 3 :(得分:0)
尝试设置
max_input_time = -1
在你的php.ini文件中。
来自php.ini ...
; Maximum amount of time each script may spend parsing request data. It's a good; idea to limit this time on productions servers in order to eliminate unexpectedly ; long running scripts. ; Note: This directive is hardcoded to -1 for the CLI SAPI ; Default Value: -1 (Unlimited) ; Development Value: 60 (60 seconds) ; Production Value: 60 (60 seconds) ; http://php.net/max-input-time
;
答案 4 :(得分:0)
我在Centos 6上遇到与Varnish> Apache> PHP-FPM相同的问题。
我通过在Apache中禁用KeepAlive解决了这个问题。
答案 5 :(得分:0)
在我的情况下,每当我从iOS / MacOS Safari访问我的网站时都会出现错误。在第一次访问这些设备之后,apache在任何设备的任何请求中都会出现分段错误,直到下次重启。
在停用Google的 mod_spdy 模块后问题就消失了。
答案 6 :(得分:0)
此问题通常是由Apache模块引起的。如您所见,其他答案是关于一个模块或另一个模块的。通用答案可能是尝试禁用您启用的最后一个模块。
就我而言,导致问题的模块是Ubuntu 18.04上的php7.3。 PHP 7.2有效,但PHP 7.3不起作用。
答案 7 :(得分:0)
我尝试将系统从ubuntu
的14.04升级到18.04,并且遇到了这个问题,我降级到16.04来解决它。
我还将php
升级到7.0
答案 8 :(得分:0)
我遇到了这个确切的错误,我只是重新启动了服务器(重新启动apache并没有帮助)。
如果您刚刚做过apt upgrade
答案 9 :(得分:0)
当我的PHP中存在无限循环(特别是递归调用自身的函数)时,我收到了此错误
答案 10 :(得分:0)
我刚刚重新启动了Apache,问题就消失了