解决方法:

如果你有Apache出现段错误是产生的core文件,最好对core文件作基本分析。如果你想让红帽支持帮忙分析数据,我们需要基础分析的输出,包括core文件本身和系统安装软件列表。以下是操作步骤:

1.列出/var/apache-dump/目录下的文件:

ls -l /var/apache-dump/
-rw-------    1 apache   apache   71188480 Aug 16 13:48 /var/apache-dump/core.1333

2.用gdb去分析Apache core文件。一直输入回车直到出现'(gdb)'提示符,输入"where"。将gdb的输出信息拷贝粘贴,发给红帽支持。输入"quit"退出。

# gdb /usr/sbin/httpd /var/apache-dump/core.902
GNU gdb Red Hat Linux (5.3.90-0.20030710.41.2.1rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols
found)...Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `/usr/sbin/httpd -DHAVE_ACCESS
-DHAVE_PROXY -DHAVE_AUTH_ANON -DHAVE_ACTIONS -DHA'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/i686/libpthread.so.0...done.
Loaded symbols for /lib/i686/libpthread.so.0
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
...
Loaded symbols for /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Unix/Syslog/Syslog.so
Reading symbols from /lib/libnss_nisplus.so.2...done.
Loaded symbols for /lib/libnss_nisplus.so.2
#0  0x4024aeb2 in semop (semid=131073, sops=0x8087870, nsops=1)
at ../sysdeps/unix/sysv/linux/semop.c:36
36      ../sysdeps/unix/sysv/linux/semop.c: No such file or directory.
in ../sysdeps/unix/sysv/linux/semop.c
(gdb) where
#0  0x4024aeb2 in semop (semid=131073, sops=0x8087870, nsops=1)
at ../sysdeps/unix/sysv/linux/semop.c:36
#1  0x0805ce37 in accept_mutex_on_sysvsem ()
#2  0x0805fc13 in child_main ()
#3  0x080602a9 in make_child ()
#4  0x0806034d in startup_children ()
#5  0x080609a0 in standalone_main ()
#6  0x080612a3 in main ()
(gdb) quit

3.我们推荐你运行命令:

rpm -qa > /var/apache-dump/rpm-listing-`date +%s`

得到一个在产生core文件时后,系统已安装的RPM包列表,用于作为更进一步分析。