解決方法:

如果你有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包列表,用于作為更進一步分析。