View Revisions: Issue #3524

Summary 0003524: Indicate when the JVM has optimized a stack in the log
Revision 2018-04-20 17:02 by mmichalek
Description In certain situations, such as where 1000's of NullPointerExceptions get thrown (and caught), the JVM will optimize out the full stack trace of the Exception object. This is a problem for when we get back a rolling log of a system that is struggling, and all that is printed in the log is "NullPointerException". We perform our own StackTrace management in the logs (through the StackTraceKey stuff) so we are going to instruct the JVM to always allow the full stack trace for these Exception objects. When the system is churning on an error that badly, we need to fix the error and need all the info we can get. Optimizing in this situation is really not a priority.

After understanding this better as an optimization for frequent/expected exceptions, we decided instead of changing the JVM optimization we will indicate in the log that the jvm has optimized an exception. The stack trace key will contain the phrase "-jvm-optimized" in those cases.
Revision 2018-04-20 14:34 by mmichalek
Description In certain situations, such as where 1000's of NullPointerExceptions get thrown (and caught), the JVM will optimize out the full stack trace of the Exception object. This is a problem for when we get back a rolling log of a system that is struggling, and all that is printed in the log is "NullPointerException". We perform our own StackTrace management in the logs (through the StackTraceKey stuff) so we are going to instruct the JVM to always allow the full stack trace for these Exception objects. When the system is churning on an error that badly, we need to fix the error and need all the info we can get. Optimizing in this situation is really not a priority.

The change is to add -XX:-OmitStackTraceInFastThrow in the sym_service.conf.