JDK-8358080 : Print thread stack with -Xlog:exceptions+stacktrace
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2025-05-29
  • Updated: 2025-06-09
  • Resolved: 2025-06-09
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.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
This makes it easier to analyze exceptions without modifying the JVM or the app to print call stacks:

$ java -Xlog:exceptions,exceptions+stacktrace -cp foo.jar Foo
[2.047s][info ][exceptions] Exception <a 'java/lang/NullPointerException'{0x00000004736ab200}>
[ ] thrown in interpreter method <{method} {0x000070488c9f2a50} 'isLoggable' '(Ljava/lang/System$Logger$Level;)Z' in 'jdk/internal/logger/AbstractLoggerWrapper'>
[ ] at bci 5 for thread 0x000070499802e730 (DestroyJavaVM)
[2.048s][info][exceptions,stacktrace] at jdk.internal.logger.AbstractLoggerWrapper.isLoggable([java.base@25-internal](mailto:java.base@25-internal)/AbstractLoggerWrapper.java:68)
[2.048s][info][exceptions,stacktrace] at java.lang.ProcessBuilder.start([java.base@25-internal](mailto:java.base@25-internal)/ProcessBuilder.java:1093)
[2.048s][info][exceptions,stacktrace] at java.lang.ProcessBuilder.start([java.base@25-internal](mailto:java.base@25-internal)/ProcessBuilder.java:1044)
[2.048s][info][exceptions,stacktrace] at jdk.internal.misc.CDS$ProcessLauncher.execWithJavaToolOptions([java.base@25-internal](mailto:java.base@25-internal)/CDS.java:548)
Comments
Closing this as a duplicate of JDK-8344165, as that bug has the relevant discussion.
09-06-2025

Also might be a duplicate (or similar).
29-05-2025