I use pstack to analyze core dump files in Solaris
How else can I analyze the core dump from solaris?
What commands can be used to do this?
What other information will be available from the dump?
There are lots of tools in the Solaris OS for analyzing core dump files: dbx(1) , mdb(1) , and pstack(1) . The most convenient method is to use the pstack tool to determine the process stack. This tool helps show multithreaded programs as well: -bash-3.00# pstack core.
In Oracle Solaris 11, the default directory is /var/crash. Forcibly updates the kernel dump configuration based on the contents of the /etc/dumpadm. conf file. Modifies the dump configuration to automatically execute the savecore command upon reboot, which is the default for this dump setting.
A core dump or a crash dump is a memory snapshot of a running process. A core dump can be automatically created by the operating system when a fatal or unhandled error (for example, signal or system exception) occurs. Alternatively, a core dump can be forced by means of system-provided command-line utilities.
You can use Solaris modular debugger,mdb, or dbx. mdb comes with SUNWmdb (or SUNWmdb x for the 64 bits version) package.
A core file is the image of your running process at the time it crashed.
Depending on whether your application was compiled with debug flags or not,you will be able to view an image of the stack, hence to know which function caused the core, to get the value of the parameters that were passed to that function, the value of the variables, the allocated memory zones ...
On recent solaris versions, you can configure what the core file will contain with the coreadm command ; for instance, you can have the mapped memory segments the process were attached to.
Refer to MDB documentation and dbx documentation. The GDB quick reference card is also helpful once you know the basics of GDB.
I guess any answer to this question should start with a simple recipe:
For dbx, the recipe is:
% dbx a.out core
(dbx) where
(dbx) threads
(dbx) thread t@3
(dbx) where
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With