Analyzing Core Dump


 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Analyzing Core Dump
# 1  
Old 06-28-2010
Analyzing Core Dump

We have a binary that generates coredump. So I ran the gdb command to analyze the issue. Pleae note the binary and code are in two different locations and we cannot build the whole binary using debugging symbols. Hence how and what details can I find from below backtarce:

Code:
gdb binary corefile

(gdb) where
#0  0x101fa37a in f1()
#1  0x10203812 in operator f2< ()
#2  0x085f6244 in f3 ()
#3  0x085f1574 in f4()
#4  0x0805b27b in sigsegv_handler ()
#5  <signal handler called>
#6  0x1018d945 in f5()
#7  0x1018e021 in f6()
..................................
#29 0x08055c5c in main ()
(gdb)

Please provide me gdb commands that I can issue to find what’s data inside each stack frame , what’s the issue probably is, where it is failing, other debugging methods if any?

Thanks in advance

Last edited by Scott; 06-28-2010 at 06:44 PM.. Reason: Code tags
# 2  
Old 06-29-2010
Please state what Operating System and version you have and the Programming Language of the failed program.
Does the program ever work, or does it work normally and fail randomly?
Do you have the program source code?
What are the ulimit settings for the environment hosting the program?
What is the output from the unix "file" command on the core file (this should say why the program failed).

One tutorial (of many available with Google).
gdb Tutorial
# 3  
Old 07-18-2010
From the backtrace you know that the crash is inside f1().
If you put some logs in f1(), you can easily find the issue.
# 4  
Old 07-20-2010
#1 looks interesting to me -- what calls could a reasonable < operator make that would cause a segfault? I would look at that function and see if there's anything obviously wrong.
# 5  
Old 08-04-2010
try with Backtrace
# 6  
Old 10-05-2010
Data

Quote:
Originally Posted by uunniixx
We have a binary that generates coredump. So I ran the gdb command to analyze the issue. Pleae note the binary and code are in two different locations and we cannot build the whole binary using debugging symbols. Hence how and what details can I find from below backtarce:

Code:
gdb binary corefile

(gdb) where
#0  0x101fa37a in f1()
#1  0x10203812 in operator f2< ()
#2  0x085f6244 in f3 ()
#3  0x085f1574 in f4()
#4  0x0805b27b in sigsegv_handler ()
#5  <signal handler called>
#6  0x1018d945 in f5()
#7  0x1018e021 in f6()
..................................
#29 0x08055c5c in main ()
(gdb)

Please provide me gdb commands that I can issue to find what’s data inside each stack frame , what’s the issue probably is, where it is failing, other debugging methods if any?

Thanks in advance
FYI : if the binary is not compiled with a debug option,
the source with GDB will not help you at all, all you will see is hxa/binay codes for instructions, pointers (adresses) and data --

so unless you can read or have the time to translate machinecode (wich is possible) gdb will not help you .

Regards

Last edited by remi75; 10-05-2010 at 08:27 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

core dump

Hi guys, just want to know which core file pattern is best to set for core dumps: 1) per-process file name pattern or 2) global file name pattern. I will really appreciate an explanation why the chosen one is better. Thanks a lot guys. (2 Replies)
Discussion started by: cjashu
2 Replies

2. UNIX for Dummies Questions & Answers

No core dump

my progrme complaints 'Segmentation fault'. How to let it print 'Segmentation fault(core dumped)' and generate core dump file? $ulimit unlimited (22 Replies)
Discussion started by: vistastar
22 Replies

3. AIX

core dump

My application gives core dump. When i am debugging with dbx getting instructions below: pthdb_session.c, 818: 695445 PTHDB_INTERNAL (internal error) pthreaded.c, 1941: PTHDB_INTERNAL (internal error) Illegal instruction (illegal opcode) in . at 0x0 warning: Unable to access address 0x0... (1 Reply)
Discussion started by: bapi
1 Replies

4. UNIX for Advanced & Expert Users

Core Dump

Hello all, Iam new to unix while executing java program which finely working in windows know iam testing with unix ,but in unix while executing iam getting core dump, my application is in client server environment and it is menu drivrn application on clicking options no problem but after some time... (1 Reply)
Discussion started by: vinp
1 Replies

5. UNIX for Dummies Questions & Answers

Core dump in HP-UX..

Hi All I am new for this forum. I have a core file by using gdb and bt cmd I got the function name but I want to the exact cause of the core dump because of I can not reproduse the binary so if any one know the cmd plz plz plz let me know. (0 Replies)
Discussion started by: gyanusoni
0 Replies

6. UNIX for Advanced & Expert Users

core dump

Hi All, i am new to this forum.i want detail of reading the core file and trace the problem because of what the program get crashed.please help me.if any body knows any website or tutoril plese let me know. sudhir (6 Replies)
Discussion started by: sudhir patnaik
6 Replies

7. Programming

about core dump

MY friends: my program under sco unix have a problem? it create a core dump file on the path when execute program , but i can't find the error of the C program ,i don't know how to see the error about my program use core, please help me or give me some suggest and what tools can use... (1 Reply)
Discussion started by: zhaohaizhou
1 Replies

8. UNIX for Advanced & Expert Users

Analyzing System Core Files?

can some tell me how to do this. I mean, i tried finding this out on my own but when I checked the man pages, i got a truckload of commands available pertaining to this task which in turn got me confused. so my question is, if there is a simple straight forward(not necessarily easy) way to... (2 Replies)
Discussion started by: TRUEST
2 Replies

9. UNIX for Dummies Questions & Answers

core dump

I've got a core dump in my weblogic home directory, which i have tried to debug by initiating savecore from /etc/init.d/savecore start but savecore failed to create the two files, that is vmcore.n and vmunix.n. savecore is enable on my server to save vmcore and vmunix in /var/crash/hostname 1)... (4 Replies)
Discussion started by: hassan2
4 Replies

10. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
Login or Register to Ask a Question