core dump没有思路
在SunOS(5.10)环境上跑的一个程序,core掉了,但是根据提示信息没有思路,哪位大侠指点一下。
core信息如下:
Program terminated with signal 11, Segmentation fault.
#0 0xffffffff76412890 in _fini () from /usr/lib/64/libsasl.so.1
(gdb) bt
#0 0xffffffff76412890 in _fini () from /usr/lib/64/libsasl.so.1
#1 0xffffffff7f617ea0 in call_fini () from /lib/sparcv9/ld.so.1
#2 0xffffffff7f617fe0 in atexit_fini () from /lib/sparcv9/ld.so.1
#3 0xffffffff7ad4c984 in _exithandle () from /lib/64/libc.so.1
#4 0xffffffff7ad3aa7c in exit () from /lib/64/libc.so.1
#5 0x0000000100001ed4 in _start ()
at /home/maciej/src/opencsw/pkg/gcc4/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-4.6.3/gcc/config/sparc/sol2-c1.asm:97
(gdb) info threads
Id Target Id Frame
4 Thread 4 (LWP 4) 0xffffffff6b227be8 in MediationTransaction::CTimerManager::Run (this=0xffffffff6b34b490) at timer_manager.cpp:219
* 3 Thread 1 (LWP 1) 0xffffffff76412890 in _fini () from /usr/lib/64/libsasl.so.1
2 LWP 4 0xffffffff6b227be8 in MediationTransaction::CTimerManager::Run (this=0xffffffff6b34b490) at timer_manager.cpp:219
1 LWP 1 0xffffffff76412890 in _fini () from /usr/lib/64/libsasl.so.1
(gdb)
------解决方案--------------------Program terminated with signal 11, Segmentation fault.
说明使用了空指针,
MediationTransaction::CTimerManager::Run
仔细检查这个函数, 已经很明确了。
------解决方案--------------------在线程里调用了exit?
------解决方案--------------------gdb core文件 根据信息难看出问题的话,就直接gdb程序吧,
------解决方案--------------------Thread 4 (LWP 4) 0xffffffff6b227be8 in MediationTransaction::CTimerManager::Run (this=0xffffffff6b34b490) at timer_manager.cpp:219
219行的代码仔细检查 , 肯定是你的问题。
------解决方案--------------------编译时带上 -g参数,这样才好跟踪代码