JDK-5107646 : RFE: Allow hs_err<pid> file location to be customizable
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2004-09-27
  • Updated: 2005-06-13
  • Resolved: 2005-06-13
Related Reports
Duplicate :  
Name: rmT116609			Date: 09/27/2004

We're getting core dumps in JVM 1.4.2_04 (soon testing 1.4.2_05).  The app lives on a shared, read-only file system.  We don't get the hs_err<pid> files, and we need those to debug the problem

There must be many apps that need this customiable, either the location is read-only, or shared, or they want to link it with the core location (as set by coreadm on Solaris or the appropriate sysctl in Linux 2.6).

a) a command line flag to set this location (easiest)
b) default to the location that coreadm/sysctl kernel.core_pattern uses (a bit more work)

these are not mutually exclusive

Possible workaround - if you can't write to a file, write to stdout.
Attempts to write in processes CWD, if it fails, then hs_err<pid> is never written
(Incident Review ID: 315576) 

EVALUATION Before 1.5, after a fatal error, JVM prints the error log to stdout and then saves the same information to an hs_err log file. By default, it is saved in current working directory; if for some reason the current directory is not writable the hs_err log is saved to the system temporary directory (/tmp on Solaris and Linux; or the result from GetTempPath() on Windows). If there is no temporary directory, JVM will not save the hs_err log (because the same information is already printed to stdout). Since 1.5 because JVM prints a lot more information after crash, it would be too much for stdout. Instead, JVM only prints a brief message to stdout and detailed information is saved in hs_err log. Again, to determine the location for hs_err, JVM first tries current directory; if it's not writable, JVM uses temp directory; unlike 1.4.2, if temp directory is still not usable, JVM will print the detailed message to stdout. It's a good suggestion to allow customizable directory for HotSpot error logs. Will fix in mustang. ###@###.### 10/18/04 23:55 GMT fixed under bugid 4872551. A new command line flag -XX:ErrorFile is added to VM. Close as duplicate ###@###.### 2005-06-13 19:38:09 GMT