Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Java™ Troubleshooting Guide for HP-UX Systems: > Chapter 3 Getting Help from Hewlett-Packard

Collecting Java Environment Information

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

To perform core file analysis, you need to collect information about some environment variables and libraries used by the failed application. The following subsections describe how to do this.

Environment Variables

To facilitate troubleshooting, it is important to know the values of the environment variables that can affect the behavior of Java applications (for example, CLASSPATH). To collect these application runtime environment variable values, run the following command under the same environment (that is, the same user) that the Java application was executed:

(ksh) $ env >  app_environment.txt 
(csh) $ getenv > app_environment.txt

Include the app_environment.txt file when you send in your collected data files to HP.

Libraries

In order to perform core file analysis, you must have access to libraries used by the failed application. The method used for determining which libraries were used depends on whether or not gdb is available on the system.

If gdb is not available, then locate files by either examining the stdout of the failed application or the hs_err_pid<pid>.log file. Either of these should list all the libraries used. Using this list, manually copy the files.

If gdb is available on the system where the failure occurred, issue the gdb packcore command:

(gdb) packcore

This command creates a compressed tar file named packcore.tar.Z under the current directory. packcore.tar.Z contains the following:

  • modules.tar – a tar file containing all the libraries used by the application. The following example is a listing of the modules.tar file:

    $ tar -tvf modules.tar 
    -r-xr-xr-x root/sys     130744 2006-04-14 12:01 java 
    -r-xr-xr-x bin/bin      249856 2005-07-01 01:54 dld.sl
    -r-xr-xr-x root/sys   15581184 2006-04-14 12:02 libjvm.sl 
    -r-xr-xr-x bin/bin      360448 2004-08-30 11:23 libpthread.1 
    -r-xr-xr-x bin/bin      282624 2004-07-09 14:00 libm.2 
    -r-xr-xr-x bin/bin       32768 2004-08-26 18:53 librt.2 
    -r-xr-xr-x bin/bin     1261568 2004-03-26 00:00 libcl.2 
    -r-xr-xr-x bin/bin       12288 2003-09-03 00:00 libisamstub.1
    -r-xr-xr-x bin/bin      217088 2004-12-23 09:36 libCsup.2 
    -r-xr-xr-x bin/bin     1933312 2005-08-31 22:01 libc.2 
    -r-xr-xr-x bin/bin       24576 2005-07-01 01:54 libdld.2 
    -r-xr-xr-x bin/bin       77024 2004-07-27 16:29 libogltls.sl 
    -r-xr-xr-x root/sys     110592 2006-04-14 12:02 libhpi.sl 
    -r-xr-xr-x root/sys      86016 2006-04-14 12:02 libverify.sl
    -r-xr-xr-x root/sys     266240 2006-04-14 12:02 libjava.sl 
    -r-xr-xr-x root/sys     110592 2006-04-14 12:02 libzip.sl 
    -rwxr-xr-x user1/lang    12288 2007-03-02 14:31 libstacktrace.sl
  • progname.txt – the name of the program that core dumped; in this case, it is java,

  • core – the core file.

In some situations, only a core file can be obtained. If so, only limited troubleshooting can take place because some crucial pieces of information are missing

There is one additional library that should be collected: libjunwind. This library is used by gdb to unwind Java bytecode frames; its routines help make stack traces more readable and understandable. Because this library is only used during debugging, it is not included in the tar file generated by packcore.

The following table lists the location of the libjunwind library for PA-RISC applications:

Table 3-1 Libjunwind Library Location for PA-RISC Systems

Application Typelibjunwind Location
PA1.1 applications (java -pa11)/opt/<java_vers>/jre/lib/PA_RISC/server/libjunwind.sl
PA2.0 32–bit applications (default PA-RISC)/opt/<java_vers>/jre/lib/PA_RISC2.0/server/libjunwind.sl
PA2.0 64–bit applications (java -d64)/opt/<java_vers>/jre/lib/PA_RISC2.0W/server/libjunwind.sl

 

On Integrity systems, beginning with SDK 1.4.0.10 and JDK 1.5.0.03, there are two libjunwind libraries for each Java VM: libjunwind64.so and libunwind.so. The following table lists the location of these libraries for both 32–bit and 64–bit applications:

Table 3-2 Libjunwind Library Location for Integrity Systems

Application Typelibjunwind Location
32–bit applications/opt/<java_vers>/jre/lib/IA64N/server/libjunwind*.so
64–bit applications/opt/<java_vers>/jre/lib/IA64W/server/libjunwind*.so

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2009 Hewlett-Packard Development Company, L.P.