United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6501559 Print out fatal/guarantee message
6501559 : Print out fatal/guarantee message

Details
Type:
Bug
Submit Date:
2006-12-06
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2007-04-24
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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
                                     
2007-03-23
EVALUATION

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



Hardware and Software, Engineered to Work Together