JDK-8273636 : compiler/uncommontrap/TestDeoptOOM.java#id1 failed with "Error: VM option 'LogCompilation' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions."
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2021-09-11
  • Updated: 2021-09-12
  • Resolved: 2021-09-12
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The following test failed in the JDK18 CI:

compiler/uncommontrap/TestDeoptOOM.java#id1

Here's a snippet from the log file:

#section:main
----------messages:(4/846)----------
command: main -XX:-BackgroundCompilation -Xmx128M -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack -XX:CompileCommand=exclude,compiler.uncommontrap.TestDeoptOOM::main -XX:CompileCommand=exclude,compiler.uncommontrap.TestDeoptOOM::m9_1 -XX:+UseZGC -XX:+LogCompilation -XX:+PrintDeoptimizationDetails -XX:+TraceDeoptimization -XX:+Verbose compiler.uncommontrap.TestDeoptOOM
reason: User specified action: run main/othervm -XX:-BackgroundCompilation -Xmx128M -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack -XX:CompileCommand=exclude,compiler.uncommontrap.TestDeoptOOM::main -XX:CompileCommand=exclude,compiler.uncommontrap.TestDeoptOOM::m9_1 -XX:+UseZGC -XX:+LogCompilation -XX:+PrintDeoptimizationDetails -XX:+TraceDeoptimization -XX:+Verbose compiler.uncommontrap.TestDeoptOOM 
Mode: othervm [/othervm specified]
elapsed time (seconds): 0.005
----------configuration:(0/0)----------
----------System.out:(0/0)----------
----------System.err:(4/268)----------
Error: VM option 'LogCompilation' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
Error: The unlock option must precede 'LogCompilation'.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
----------rerun:(43/6044)*----------
Comments
Looks like the following bug was also filed: JDK-8273629 compiler/uncommontrap/TestDeoptOOM.java fails with release VMs [~coleenp] and [~jiefu] - I'll let you two sort out which bug is used to fix this. JDK-8273629 did not show up in my search for "compiler/uncommontrap/TestDeoptOOM.java#id1"
11-09-2021

The use of '-XX:+LogCompilation' was added by this fix: JDK-8273456 Do not hold ttyLock around stack walking [~coleenp] - Looks like this one was caused by your fix for this bug.
11-09-2021