Hi All,
I am new to unix environment.
Please tell me how to do coredump analysis. Please explain clearly with example. What are the details are available in the core.
Basically, you use a debugger. Since you did not specify an OS I'll assume you have
gdb. You must have compiled the file
in order for symbols to be available. If you are analyzing a core dump of somebody else's code you are in trouble.
The core dump file is called core
This will show you a backtrace (stack dump) of the call tree that lead to the crash.
You will have to find using the stack dump where in the code (not in a C library) the crash occurred. In other words the last line of the program's code that actually led to the crash.
dbx debugger is used to analysis the coredumps ............. i will explain with anexample
cc -g first.c
dbx ./a.out
Reading a.out
Reading ld.so.1
Reading libc.so.1
Reading libdl.so.1
Reading libc_psr.so.1
(dbx 1) sif main
(2) stop infunction main
(dbx 2) run
Running: a.out
(process id 6156)
stopped in main at line 7 in file "first.c"
7 printf("%d\n",time(&t1));
(dbx 3) n
1117798709
stopped in main at line 8 in file "first.c"
8 for ( i=0 ; i<10; i++ ){
(dbx 4) n
stopped in main at line 9 in file "first.c"
9 printf("%d\n",rand());
(dbx 5) n
16838
stopped in main at line 8 in file "first.c"
8 for ( i=0 ; i<10; i++ ){
(dbx 6) exitbx 6)
Cannot get backtrace command work "bt", cannot access memory?
Hi,
I think I have similar question, please bear me to put here.
I recently created a testing program containing only one thread to generate core file to analyze, but I couldn't use gdb to print stack trace, It says "cannot access memory ...".
Why? did I miss any command?
I did the test both on Linux and Solaris, same result.
tc11:/home/canzh/test> gdb a.out core
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 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"...
Core was generated by `./a.out'.
Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x40016bec
#0 0x400a68d6 in ?? ()
(gdb) bt
#0 0x400a68d6 in ?? ()
Cannot access memory at address 0xbffff8a8
(gdb) where
#0 0x400a68d6 in ?? ()
Cannot access memory at address 0xbffff8a8
(gdb) quit
tc11:/home/canzh/test> uname -a
Linux tc11 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
Thanks for yor reply.
Yes, that started the program. This is my testing program, but if I have a real program, I cannot reproduce the problem easily by simply re-run it because there could be thousands of inputs and I don't know where and how it can crash. The purpose of running gdb is to find the problem (postmortem analyze).
dear all,
i have p770 aix6.1
last week, the host reboot suddenly with dump. but i don't know how to analyze the dump.
I posted kdb details in the attachment.
please anybody help me.
#>kdb vmcore.0 /unix
vmcore.0 mapped from @ 700000000000000 to @ 7000001c72c0908
START ... (13 Replies)
We have just enabled core dump on our RHEL5.7 OS. the java process is terminating very often so we enable core dump to analysis the issue and find below in core dump file.
Core was generated by `/usr/java/jdk1.6.0_06//bin/java -server -Xms1536m -Xmx1536m -Xmn576m -XX:+Aggre'.
Program... (0 Replies)
How can we analyze a core file and determine why it was generated on a solaris system?
I know file core filename will tell us what program generated the file. But, what to do next to get more details?
Thanks, (5 Replies)
Hello,
I'm new to the group and this is my first post. I'm hoping someone can help me out. I have a core dump that I need to analyze from a Unix box and I've never done this sort of thing before. I was told to run a pmap and pstack on the core file which provided two different output files. ... (3 Replies)
Hi,
I just wanted to know is there any tool avaliable for core analysis on hp-ux. I have heard about q4 utility. But I think it is used for analysis of system crash dump and not for core dump produced by a user process.
gdb doesn't give much information unless the binary is debug-build.
... (0 Replies)
Hi folks,
I'm hoping someone would be charitable enough to give me a quick explanation of adb usage for analyzing core files...or point me in the right direction. A search here revealed scant results and web searches are providing me with ambiguous information.
Running Solaris.
Thanks,... (1 Reply)