linux下程序收到信号6退出问题,急!有酬谢:)
linux由2.2内核升级到2.6后,编译的程序在内存释放的时候,会崩溃,收到信号6,不知道什么问题。
如:
1.
[root@localhost sz]# gdb szgate core/core.1429
GNU gdb Red Hat Linux (6.6-8.fc7rh)
Copyright (C) 2006 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-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /home/sz/libCenterControl.so...done.
Loaded symbols for ./libCenterControl.so
Reading symbols from /home/sz/libDataProcess.so...done.
Loaded symbols for ./libDataProcess.so
Reading symbols from /home/sz/libGlbVarible.so...done.
Loaded symbols for ./libGlbVarible.so
Reading symbols from /home/sz/libFileProcess.so...done.
Loaded symbols for ./libFileProcess.so
Reading symbols from /home/sz/libDevice.so...done.
Loaded symbols for ./libDevice.so
Reading symbols from /home/sz/libendes.so...done.
Loaded symbols for ./libendes.so
Reading symbols from /home/sz/libGeneralFunction.so...done.
Loaded symbols for ./libGeneralFunction.so
Reading symbols from /home/sz/libCardApp.so...done.
Loaded symbols for ./libCardApp.so
Reading symbols from /home/sz/libIndicatorLight.so...done.
Loaded symbols for ./libIndicatorLight.so
Reading symbols from /home/sz/libZBLCommunication.so...done.
Loaded symbols for ./libZBLCommunication.so
Reading symbols from /home/sz/libTLog.so...done.
Loaded symbols for ./libTLog.so
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/sz/libCommFunc.so...done.
Loaded symbols for ./libCommFunc.so
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /home/sz/libCSimpleXML.so...done.
Loaded symbols for ./libCSimpleXML.so
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Core was generated by `./szgate'.
Program terminated with signal 6, Aborted.
#0 0xb7f74410 in __kernel_vsyscall ()
(gdb) where
#0 0xb7f74410 in __kernel_vsyscall ()
#1 0xb7b06fa0 in raise () from /lib/libc.so.6
#2 0xb7b089fe in abort () from /lib/libc.so.6
#3 0xb7b3debb in __libc_message () from /lib/libc.so.6
#4 0xb7b3dff4 in __libc_fatal () from /lib/libc.so.6
#5 0xb7b4a492 in mabort () from /lib/libc.so.6
#6 0xb7b4a96c in freehook () from /lib/libc.so.6
#7 0xb7b49525 in free () from /lib/libc.so.6
#8 0xb7d190a1 in operator delete () from /usr/lib/libstdc++.so.6
#9 0xb7d190fd in operator delete[] () from /usr/lib/libstdc++.so.6
#10 0xb7f4768d in CDataProc::SendTradeRecoder (this=0x80eb218)
at proc_pub.cpp:404
#11 0xb7f476c7 in CDataProc::SendThreadFunc (pParam=0x80eb218)
at proc_pub.cpp:117
#12 0xb7f47f5d in CDemon::ExecutiveMethod (this=0x80a8fd8)
at ../Common/Demon.cpp:61
#13 0xb7f47af2 in CThread::ThreadFunction (pParam=0x80a8fd8)
at ../Common/Thread.cpp:69
#14 0xb7f582fb in start_thread () from /lib/libpthread.so.0
#15 0xb7bae93e in clone () from /lib/libc.so.6
(gdb)
2.
Core was generated by `./szgate'.
Program terminated with signal 6, Aborted.
#0 0xb7f56410 in __kernel_vsyscall ()
(gdb) where
#0 0xb7f56410 in __kernel_vsyscall ()
#1 0xb7af4fa0 in raise () from /lib/libc.so.6
#2 0xb7af69fe in abort () from /lib/libc.so.6
#3 0xb7b2bebb in __libc_message () from /lib/libc.so.6
#4 0xb7b376ab in free () from /lib/libc.so.6
#5 0xb7d070a1 in operator delete () from /usr/lib/libstdc++.so.6
#6 0xb7e3f020 in CLinkedList<CData*>::GetNodeAfter (this=0x80ef3a8,
Item=@0x80dba70, pPrior=0x0) at ../Common/../Common/LinkedList.h:276
#7 0xb7e3f084 in CLinkedList<CData*>::InsertRear (this=0x80ef3a8,
Item=@0xb2a60b90) at ../Common/../Common/LinkedList.h:370
#8 0xb7e3f35b in CTcpClientTypeInterface::Connect (this=0xb2a5f338)
at ../Common/TcpClientTypeInterface.cpp:315
#9 0xb7e3f83a in CTcpClientTypeInterface::SendDemon (pParam=0x80eadd0)
at ../Common/TcpClientTypeInterface.cpp:170
#10 0xb7f2a015 in ~CDemon (this=0x80d6a40) at ../Common/Demon.cpp:48
#11 0xb7f29b8a in CThread (this=0x80d6a40, func=0xb2a5f470, pParam=0xb2a5f470)
at ../Common/Thread.cpp:95
#12 0xb7f3a2fb in start_thread () from /lib/libpthread.so.0
#13 0xb7b9c93e in clone () from /lib/libc.so.6
(gdb)