JDK-8147494 : com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java fails with "java.lang.IllegalArgumentException: VM option 'TraceExceptions' does not exist"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-01-15
  • Updated: 2020-09-01
  • Resolved: 2016-01-19
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.
JDK 9
9 b105Fixed
Related Reports
Relates :  
Relates :  
Description
Because "TraceExceptions" is no longer a VM runtime option defined in globals.hpp (part of RUNTIME_FLAGS macro), CheckOrigin.java fails with "java.lang.IllegalArgumentException: VM option "TraceExceptions" does not exist" because HotSpotDiagnosticMXBean.getVMOption(option) can no longer find the option. This issue is most likely due to https://bugs.openjdk.java.net/browse/JDK-8141211 
Comments
The fix for: JDK-8141211 Convert TraceExceptions to Unified Logging has already been pushed from JDK9-hs-rt -> JDK-hs. I'm marking this bug as an 'integration_blocker' for now. We have to decide if JDK9-hs needs to wait for this fix before being pushed to JDK9-dev. Adding a RULE to make DKFL find this bug: RULE "com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java" Exception java.lang.IllegalArgumentException: VM option "TraceExceptions" does not exist
16-01-2016

One workaround is to change the test from: private static void checkOrigin(String option, Origin origin) throws Exception { Origin o = mbean.getVMOption(option).getOrigin(); if (!o.equals(origin)) { throw new Exception("Option '" + option + "' should have origin '" + origin + "' but had '" + o + "'"); } System.out.println("Option '" + option + "' verified origin = '" + origin + "'"); } to: private static void checkOrigin(String option, Origin origin) throws Exception { if (!option.equals("TraceExceptions")) { Origin o = mbean.getVMOption(option).getOrigin(); if (!o.equals(origin)) { throw new Exception("Option '" + option + "' should have origin '" + origin + "' but had '" + o + "'"); } System.out.println("Option '" + option + "' verified origin = '" + origin + "'"); } }
15-01-2016