view agent/doc/transported_core.html @ 11982:c4697c1c4484

Added tag hs25-b44 for changeset 530fe88b3b2c
author amurillo
date Fri, 02 Aug 2013 02:54:48 -0700
line wrap: on
line source
Debugging transported core dumps
<h1>Debugging transported core dumps</h1>

When a core dump is moved to a machine different from the one where it was
produced ("transported core dump"), debuggers (dbx, gdb, windbg or SA) do not
always successfully open the dump. This is due to kernel, library (shared
objects or DLLs) mismatch between core dump machine and debugger machine.

In most platforms, core dumps do not contain text (a.k.a) Code pages.
There pages are to be read from executable and shared objects (or DLLs).
Therefore it is important to have matching executable and shared object
files in debugger machine. 

<h3>Solaris transported core dumps</h3>

Debuggers on Solaris (and Linux) use two addtional shared objects
<b></b> and <b></b>. is used to
read information on shared objects from the core dump.
is used to get information on threads from the core dump.
evolves along with (the runtime linker library) and
evolves along with (user land multithreading library). 
Hence, debugger machine should have right version of and to open the core dump successfully. More details on
these debugger libraries can be found in 
<a href="">
Solaris Linkers and Libraries Guide - 817-1984</a>

<h3>Solaris SA against transported core dumps</h3>

With transported core dumps, you may get "rtld_db failures" or
"libthread_db failures" or SA may just throw some other error
(hotspot symbol is missing) when opening the core dump. 
Enviroment variable <b>LIBSAPROC_DEBUG</b> may be set to any value
to debug such scenarios. With this env. var set, SA prints many
messages in standard error which can be useful for further debugging.
SA on Solaris uses <b></b> library. This library also
prints debug messages with env. var <b>LIBPROC_DEBUG</b>. But,
setting LIBSAPROC_DEBUG results in setting LIBPROC_DEBUG as well.
The best possible way to debug a transported core dump is to match the
debugger machine to that of core dump machine. i.e., have same Kernel
and libthread patch level between the machines. mdb (Solaris modular
debugger) may be used to find the Kernel patch level of core dump
machine and debugger machine may be brought to the same level.
If the matching machine is "far off" in your network, then
<li>consider using rlogin and <a href="clhsdb.html">CLHSDB - SA command line HSDB interface</a> or
<li>use SA remote debugging and debug the core from core machine remotely.

But, it may not be feasible to find matching machine to debug. 
If so, you can copy all application shared objects (and, if needed) from the core dump 
machine into your debugger machine's directory, say, /export/applibs. Now, set <b>SA_ALTROOT</b> 
environment variable to point to /export/applibs directory. Note that /export/applibs should either 
contain matching 'full path' of libraries. i.e., /usr/lib/ from core 
machine should be under /export/applibs/use/lib directory and /use/java/jre/lib/sparc/client/ 
from core machine should be under /export/applibs/use/java/jre/lib/sparc/client so on or /export/applibs 
should just contain, etc. directly. 

Support for transported core dumps is <b>not</b> built into the standard version of You need to
set <b>LD_LIBRARY_PATH</b> env var to point to the path of a specially built version of 
Note that this version of has a special symbol to support transported core dump debugging. 
In future, we may get this feature built into standard -- if that happens, this step (of 
setting LD_LIBRARY_PATH) can be skipped.

<h3>Ignoring failures</h3>
If you are okay with missing thread related information, you can set 
<b>SA_IGNORE_THREADDB</b> environment variable to any value. With this
set, SA ignores libthread_db failure, but you won't be able to get any
thread related information. But, you would be able to use SA and get
other information.

<h3>Linux SA against transported core dumps</h3>
On Linux, SA parses core and shared library ELF files. SA <b>does not</b> use or for core dump debugging (although is used for live process debugging). But, you
may still face problems with transported core dumps, because matching shared
objects may not be in the path(s) specified in core dump file. To
workaround this, you can define environment variable <b>SA_ALTROOT</b>
to be the directory where shared libraries are kept. The semantics of
this env. variable is same as that for Solaris (please refer above).