JDK-8026515 : JVM Option -XX:+UseCondCardMark Missing from Client JVM ONLY on 7u40
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7u40
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux_ubuntu
  • Submitted: 2013-10-15
  • Updated: 2015-04-05
  • Resolved: 2013-10-15
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)


A DESCRIPTION OF THE PROBLEM :
JVM Option -XX:+UseCondCardMark Missing from Client JVM ONLY on 7u40

This option is available on Both JVMs on 7u25 and earlier releases of Java 7.  We discovered this when starting the Cassandra database on Ubuntu workstation systems.  On these systems, the default is that JVM starts with the Client JVM.

When Starting Cassandra we received this error in some environments, and not others - the mystery ensued:

Unrecognized VM option 'UseCondCardMark'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

We discovered this was the problem with this brute-force approach (grepping the jvm binaries):

buntu@ubuntu:~/Downloads/jre1.7.0_40$ find . -type f -exec grep UseCondCard {}
+
Binary file ./lib/i386/server/libjvm.so matches

ubuntu@ubuntu:~/Downloads$ find . -type f -exec grep UseCondCard {} +^C
ubuntu@ubuntu:~/Downloads$ cd jre1.7.0_25/
ubuntu@ubuntu:~/Downloads/jre1.7.0_25$ find . -type f -exec grep UseCondCard {} +
Binary file ./lib/i386/server/libjvm.so matches
Binary file ./lib/i386/client/libjvm.so matches



THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: No

REGRESSION.  Last worked in version 7u25

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use your favorite HelloWorld Program. Run it with the  -XX:+UseCondCardMark option in both client and server mode.

ubuntu@ubuntu:~/hello$ java -client -XX:+UseCondCardMark Hello
Unrecognized VM option 'UseCondCardMark'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
ubuntu@ubuntu:~/hello$ java -server -XX:+UseCondCardMark Hello
Hello There!


Now try it with 7u25:

ubuntu@ubuntu:~/hello$ ~/Downloads/jre1.7.0_25/bin/java -client -XX:+UseCondCardMark Hello
Hello There!



EXPECTED VERSUS ACTUAL BEHAVIOR :
The JVM should start in all cases.  7u40 should behave like 7u25
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Unrecognized VM option 'UseCondCardMark'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
class Hello {
 public static void main (String[] args) {
   System.out.println("Hello There!
");
 }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
start the JVM with the -server option
Comments
There is workaround in case customer want to use the same script (same flags) to run Client and Server VMs: -XX:+IgnoreUnrecognizedVMOptions
15-10-2013

UseCondCardMark is NOP for Client VM. It is used only with Server VM. It is now accepted only by Server VM.
15-10-2013

UseCondCardMark was moved from the globals flag to C2 specific code. The actual conditional card mark never worked with C1 and was ignored. Closing as not an issue.
15-10-2013