Recently I have noticed that my Apache error log file shows it is generating segmentation faults. After doing little research I came to know that there is not simple solution to find of causes of this problem. I got an error that read as follows:
[Mon May 8 11:20:09 2006] [notice] Apache/2 (WebAppBETA) child pid 1256 exit signal Segmentation fault (11)
[Mon May 8 11:23:12 2006] [notice] Apache/2 (WebAppBETA) child pid 1301 exit signal Segmentation fault (11)
The problem is that our application development team has hacked (aka modified source code) Apache 2.0 source tree for application my company developing. To get rid of this problem I was asked to configure a Linux system so that Apache can dump core files on segmentation faults.
Apache supports CoreDumpDirectory directive. This controls the directory to which Apache attempts to switch before dumping core. So all I need to do is put line as follows in httpd.conf:
Open httpd.conf:# vi httpd.conf
Add following line main config section:CoreDumpDirectory /tmp/apache2-gdb-dump
Create a directory /tmp/apache2-gdb-dump:# mkdir -p /tmp/apache2-gdb-dump
Set permission:# chown httpd:appserver /tmp/apache2-gdb-dump
# chmod 0777 /tmp/apache2-gdb-dump
Please note that we are using httpd user and group appserver. Please replace it with your actual Apache user:group combination.
And restart the Apache web server:# /etc/init.d/httpd restart
OR kill Apache PID:# kill -11 14658
Now you should see core dumps in /tmp/apache2-gdb-dump directory:# ls /tmp/apache2-gdb-dump
Well I am not a developer but they are using gdb and other techniques to analyses the core dumps. Read man page of gdb for more information.
I hope that I will get a new patched version of Apache by next week. Another interesting fact I noticed that you need to configure Core Dumps on Linux only. We are also using FreeBSD for testing and it write core dump in the ServerRoot directory.
If Apache starts as root and switches to another user, the Linux kernel disables core dumps even if the directory is writable for the process. Apache (2.0.46 and later) enables core dumps on Linux 2.4 and beyond, but only if you explicitly configure a CoreDumpDirectory. :)
本日志由 flyinweb 于 2011-08-31 08:44:17 发表,目前已经被浏览 713 次,评论 0 次;
作者添加了以下标签: Apache Core Dump,CoreDumpDirectory;
引用通告:http://www.517sou.net/Article/657/Trackback.ashx
而且直接配置文件是效率最高的,通过其它驱动效率都相对较低,BDB
这个测试不太准确,看官方的测试结果:http://bind-dlz.sourceforg
为什么使用BDB时QPS这么低? 我在bind版本基本相似的环境中测试的
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱