Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solaris Core dump analysis

Tags:

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?

like image 883
Abu Avatar asked Sep 22 '08 10:09

Abu


People also ask

How to analyse core file in Solaris?

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.

How do I create a crash dump in Solaris 11?

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.

What is core dump in Oracle?

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.


2 Answers

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.

like image 161
philant Avatar answered Oct 02 '22 15:10

philant


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
like image 29
Chris Quenelle Avatar answered Oct 02 '22 15:10

Chris Quenelle