JDK-6501559 : Print out fatal/guarantee message
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-12-06
  • Updated: 2012-10-08
  • Resolved: 2007-04-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u4Fixed 7Fixed hs10Fixed
Related Reports
Relates :  
Description
In vmError.cpp when printing out information in the fatal error handler we omit
the message in PRODUCT mode, even though the message is present.  There doesn't
seem to be any benefit whatsoever to doing this.  The #ifndef PRODUCT should be removed.

Admittedly some strings in guarantees aren't the most descriptive but
others are and it appears that the authors of these strings *thought* they'd
be printed out.  Printing out this message would help debuggability and is free.

    STEP(50)

#ifndef PRODUCT
     // error message
     if (_message && _message[0] != '\0') {
       st->print_cr("#");
       st->print_cr("# Error: %s", _message);
     }
#endif // PRODUCT

Comments
EVALUATION Fixed 6501559: Print out fatal/guarantee message Print out error string in product mode. The error string for guarantees and fatals was not printed out, but was passed to the error reporter anyway. So it doesn't use any more space not to print out the error string. Also changed the guarantee to print the condition string and added an assert_msg() function for asserts which take a string variable rather than a string constant. Adding string condition variables add minimal size to the libjvm.so. The string condition variable, error string and the source file location and line gives unique error identification, and if people put the first section of the error message in the bug report at least (if not the entire hs_err_pid*log file), our bug reports will be searchable. Also added several other improvements to error handling: 1. Removed obfuscate_location because of open source, it is meaningless to hide the source file and line number information which is a key first step for developers to diagnose these crashes in the VM. 2. Moved location of the error message to right under the source file name because they are better together (all you have to do is cut/paste 2 lines at the very minimum). 3. Added the assert message to ShowMessageBoxOnError text. 4. Add signal names to hs_err file, rather than number. 5. Fixed error reporting so that when errors occur prior to complete VM initialization they don't crash the error reporter. Add some checks and sparc register flushing. Make _get_previous_fp a builtin/asm function rather than generated as a stub, except in windows AMD which doesn't have asm. 6. Adds string to error reporting steps so that when it fails, we have some indication what it was doing. Fix verified (y/n): y Verified by: Added bogus guarantee error to VM for testing (removed) Webrev (including this and 3 other related fixes): http://jruntime.east/~coleenp/webrev/6501559
23-03-2007

EVALUATION The error string will be printed out, along with the condition causing the guarantee.
31-01-2007