Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: [Q] anyone konw how to read core dump file?

Re: [Q] anyone konw how to read core dump file?

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Mon, 11 Jul 2005 20:22:35 +0200
Message-ID: <003d01c58645$8423eee0$b700a8c0@IBME1D11967173>


Try gdb, attched standard example for java core file:

"GDB is the default preferred Linux debugger and it is powerful and stable. There are also various visual debuggers available, but only a simple command-line debugger is really needed to get the stacktrace from the core.

Do file <full path>/core to verify if the core file is from the Java VM. Make sure you are using the latest GDB version from GNU on Linux to avoid any known bugs.

See: http://ftp.gnu.org/gnu/gdb/
Also make sure on Linux that ulimit for a core file is set. (e.g., ulimit -c unlimited).
On Linux, the coredump is turned off by default on all systems. In RedHat Advanced Server 2.1, it should be under /etc/security. There should be a file called limits.conf. The file itself is self-explanatory, look for the word "core". If set to 0, then coredump is disabled. See also: Operating System Values that should be checked for core file generation
Get a stack trace using gdb as follows (same as done previously):

$ java -version  (need to use right version of jdk)
$ ls /usr/local/bin/gdb (need to know gdb location) or "which gdb"
$ export DEBUG_PROG=/usr/local/bin/gdb  (or wherever "gdb" is located)

For JDK 1.3.X do the following:

   $ <path to java command>/java corefile For JDK 1.4.X do the following:

   $ gdb <path to java command>/java corefile

Now you will be in the debugger. Execute the following commands:
(gdb) where ("shows a summary of the stack")
(gdb) thr ("switch among threads or show the current thread")
(gdb) info thr ("inquire about existing threads")
(gdb) thread apply 1 bt ("apply a command to a list of threads,
specifically the backtrace to thread #1")
(gdb) quit

"

HTH
Dimitre

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 11 2005 - 13:24:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US