全部博文(56)
分类: 系统运维
2011-09-29 12:37:03
1、file core;
进入core文件所在目录执行如上的命令;
返回如下内容:
Core was generated by `Edr2'.
自重Edr2服务就是产生core的tuxedo serverices服务名;
2、gdb '服务名' core
执行以上命令格式返回如下:
$ gdb Query core
HP gdb 5.9 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.9 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `Edr2'.
Program terminated with signal 11, Segmentation fault.
SEGV_MAPERR - Address not mapped to object
#0 0xc00000000012ac30:0 in pthread_mutex_lock+0x750 ()
from /usr/lib/hpux64/libpthread.so.1
(gdb)
3、where
(gdb)where 执行返回:
0 0xc00000000012ac30:0 in pthread_mutex_lock+0x750 ()
from /usr/lib/hpux64/libpthread.so.1
#1 0xc000000000434010:0 in __thread_mutex_lock+0xb0 ()
from /usr/lib/hpux64/libc.so.1
#2 0xc000000000406750:0 in fclose+0x410 () from /usr/lib/hpux64/libc.so.1
#3 0x4000000000e423a0:0 in sfSetInfoToFile ()
at /eaps03/server/query/ylGetSubPlcExpInfo.ec:868
#4 0x4000000000e41600:0 in sfReadYlSubPlcBaseList ()
at /eaps03/server/query/ylGetSubPlcExpInfo.ec:685
#5 0x4000000000e3d9d0:0 in ylGetSubPlcExpInfo ()
at /eaps03/server/query/ylGetSubPlcExpInfo.ec:159
#6 0x400000000079dba0:0 in xcylGetSubPlcExpInfo ()
at /eaps03/trans/xapi/query/queryxapi.ec:13108
#7 0x40000000007315f0:0 in srvylGetSubPlcExpInfo () at query.ec:3216
#8 0xc00000000950c650:0 in _tmsvcdsp () at tmsvcdsp.c:472
#9 0xc0000000095578c0:0 in _tmrunserver () at tmrunsvr.c:1871
#10 0xc00000000950a3d0:0 in _tmstartserver () at tmstrtsrvr.c:141
#11 0x4000000000713f10:0 in main () at BS-2dc7.c:314
现在基本你能看到产生core文件是由于上面代码行调用期间引起的,你可以针对以上提示的代码行进行处理,一般来说产生core原因由于内存泄露或者变量使用不当造成;