JDK-8344165 : Trace Exception with a complete call-stack
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2024-11-14
  • Updated: 2024-11-15
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
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.
A debug flag like "-Xlog:exceptions=log" (or the TraceException flag before conversion in JDK9) greatly helps with troubleshooting such applications. However, this log prints only the last activation record.
It would be very desirable to get a full call stack instead. And turn this feature for a selected class of exception only.
Comments
TraceException flag was replaced with unified logging: JDK-8141211. I added a link.
15-11-2024