Unfortunately, it happens sometimes that applications implement bad practices in the code like swallowing java.lang.Throwable (includes java.lang.VirtualMachineError and java.lang.StackOverflowError) and continue execution with no intention to stop the application. This often results in secondary issues, as JVM is considered broken at this time.
The debug flag "-Xlog:exceptions=log" (or the TraceException flag before it was converted to Unified Logging in JDK9) helps troubleshooting such applications. However, this log prints only the last activation record.
It would be very desirable to get a full call stack instead. Also enable this for a selected exception class only.
E.g. "print full stack only for exceptions of type java.lang.StackOverflowError" or "print full stack for all exceptions that derive from java.lang.VirtualMachineError", etc.
The debug flag "-Xlog:exceptions=log" (or the TraceException flag before it was converted to Unified Logging in JDK9) helps troubleshooting such applications. However, this log prints only the last activation record.
It would be very desirable to get a full call stack instead. Also enable this for a selected exception class only.
E.g. "print full stack only for exceptions of type java.lang.StackOverflowError" or "print full stack for all exceptions that derive from java.lang.VirtualMachineError", etc.
- duplicates
-
JDK-8344163 TraceException to print stack trace
-
- Closed
-
- relates to
-
JDK-8141211 Convert TraceExceptions to Unified Logging
-
- Resolved
-
-
JDK-8337512 Multiple StackOverflowErrors with recursion involving felix URLStreamHandler
-
- Closed
-