LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2009, 05:22 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 151

Rep: Reputation: 15
Is there any tool for trace the crash which is occurred due to stack overflow?


I got a crash as below in libraries because of stack overflow when i tried for delete an vector element.

[root@nag prd]#gdb collector.exe -c crashfiles/collector.e.19852
GNU gdb Red Hat Linux (6.5-25.el5_1.1rh)
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: core file may not match specified executable file.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /opt/prd/libssl.so.0.9.8...done.
Loaded symbols for /opt/prd/libssl.so.0.9.8
Reading symbols from /opt/prd/lib/libexpat.so.0...done.
Loaded symbols for /opt/prd/lib/libexpat.so.0
Reading symbols from /opt/prd/libcrypto.so.0.9.8...done.
Loaded symbols for /opt/prd/libcrypto.so.0.9.8
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
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/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `/opt/prd/collector.exe /opt/prd'.
Program terminated with signal 6, Aborted.
#0 0x00852402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00852402 in __kernel_vsyscall ()
#1 0x0043dba0 in raise () from /lib/libc.so.6
#2 0x0043f4b1 in abort () from /lib/libc.so.6
#3 0x00473dfb in __libc_message () from /lib/libc.so.6
#4 0x0047baa6 in _int_free () from /lib/libc.so.6
#5 0x0047efc0 in free () from /lib/libc.so.6
#6 0x00267671 in operator delete () from /usr/lib/libstdc++.so.6
#7 0x002676cd in operator delete[] () from /usr/lib/libstdc++.so.6
#8 0x0808b222 in dynamicIntRtnDiff (
filename1=0x9a3d414 "/opt/prd/logs/config/b.log",
filename2=0xb39d8158 "/opt/prd/logs/config/a.log", fullDiffFilename=0x0,
minimalDiffFilename=0x0, ignores=@0xb39d88d0, bTemplateFile=false, considerGPOs=false, diffWithinLines=false,
mapCatValues=0x0) at ../../utils/differ.cpp:565
#9 0x0808b373 in dynamicDiff (filename1=0x9a3d414 "/opt/prd/logs/config/b.log",
filename2=0xb39d8158 "/opt/prd/logs/config/a.log", fullDiffFilename=0x0,
minimalDiffFilename=0x0, ignores=@0xb39d88d0) at ../../utils/differ.cpp:926
#10 0x080ba288 in ConfigCollector:iffAndSaveIfDifferent (this=0x9c1eb38,
colStatusMsg=0xb39d913f "using commands: ok scripts: ok") at ./GPOsCollector.cpp:5940
#11 0x080bf1c5 in ConfigCollector::GetConfig (this=0x9c1eb38) at ./GPOsCollector.cpp:6420
#12 0x080bfa0a in GPOWorkerThread (pObj=0x0) at ./GPOsCollector.cpp:6623
#13 0x00c2045b in start_thread () from /lib/libpthread.so.0
#14 0x004e324e in clone () from /lib/libc.so.6
(gdb) f 8
#8 0x0808b222 in dynamicIntRtnDiff (
filename1=0x9a3d414 "/opt/prd/logs/config/b.log",
filename2=0xb39d8158 "/opt/prd/logs/config/a.log", fullDiffFilename=0x0,
minimalDiffFilename=0x0, ignores=@0xb39d88d0, bTemplateFile=false, considerGPOs=false, diffWithinLines=false,
mapCatValues=0x0) at ../../utils/differ.cpp:565
565 delete [] file1[i];

(gdb) p file1[i]
You can't do that without a process to debug.
(gdb) p file1
$1 = {<std::_Vector_base<char*,std::allocator<char*> >> = {
_M_impl = {<std::allocator<char*>> = {<__gnu_cxx::new_allocator<char*>> = {<No data fields>}, <No data fields>},
_M_start = 0x9c9add0, _M_finish = 0x9ca003c, _M_end_of_storage = 0x9ca2dd0}}, <No data fields>}
(gdb) p i
$2 = 92


Is there any tool for trace the crash which is occurred due to stack overflow?

Thanks & Regards,
Nagendra R

Last edited by nagendrar; 07-17-2009 at 05:38 AM.
 
Old 07-17-2009, 07:29 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,601
Blog Entries: 25

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Hi,

Please post your long list or data within vbcode tags. You can use the # or Quote at the top of the reply window to wrap your entry.

Why are you trying to debug a M$ program with a GNU project debugger?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stack Overflow talat Linux - Hardware 1 11-11-2007 07:19 AM
sporatic do_IRQ: stack overflow wlott Linux - General 0 01-01-2006 06:47 PM
kernel stack overflow prital Programming 2 06-29-2005 10:12 AM
Power PC 405 kernel stack overflow jeff_fellin Linux - General 0 01-04-2005 02:39 PM
Stack trace ust Linux - General 0 02-27-2004 03:30 AM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration