This is an automated email from the ASF dual-hosted git repository. dcapwell pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push: new 528e3ad jvm-dtests crash on java 11 528e3ad is described below commit 528e3ad00b78f3cc03f27248914249798f2c0aa9 Author: David Capwell <dcapw...@apache.org> AuthorDate: Wed Aug 5 20:47:14 2020 -0700 jvm-dtests crash on java 11 patch by David Capwell; reviewed by Alex Petrov, Jon Meredith for CASSANDRA-15981 --- build.xml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/build.xml b/build.xml index d861920..7b67314 100644 --- a/build.xml +++ b/build.xml @@ -204,6 +204,31 @@ </not> </condition> + <!-- + JVM arguments for tests. + + There is a race condition bug in java 11 (see CASSANDRA-15981) which causes a crash of the + JVM; this race is between CMS and class unloading. In java 8 we can cap the metaspace to + make tests stable on low resource environments, but in java 11 we need to make it unlimited + (don't define MaxMetaspaceSize) and disable class unloading in CMS outside of a + stop-the-world pause. + --> + <resources id="_jvm8_test_arg_items"> + <string>-XX:MaxMetaspaceExpansion=64M</string> + <string>-XX:MaxMetaspaceSize=512M</string> + <string>-XX:MetaspaceSize=128M</string> + </resources> + <pathconvert property="_jvm8_test_arg_items_concat" refid="_jvm8_test_arg_items" pathsep=" "/> + <resources id="_jvm11_test_arg_items"> + <string>-XX:-CMSClassUnloadingEnabled</string> + </resources> + <pathconvert property="_jvm11_test_arg_items_concat" refid="_jvm11_test_arg_items" pathsep=" "/> + <condition property="test-jvmargs" value="${_jvm11_test_arg_items_concat}" else="${_jvm8_test_arg_items_concat}"> + <not> + <equals arg1="${ant.java.version}" arg2="1.8"/> + </not> + </condition> + <!-- needed to compile org.apache.cassandra.utils.JMXServerUtils --> <condition property="jdk11-javac-exports" value="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED" else=""> <not> @@ -1418,9 +1443,6 @@ algorithm to limit the metaspace size and clean up SoftReferences more aggressively rather than waiting. See CASSANDRA-14922 for more details. --> - <jvmarg value="-XX:MaxMetaspaceSize=384M" /> - <jvmarg value="-XX:MetaspaceSize=128M" /> - <jvmarg value="-XX:MaxMetaspaceExpansion=64M" /> <jvmarg value="-XX:SoftRefLRUPolicyMSPerMB=0" /> <jvmarg value="-Dcassandra.memtable_row_overhead_computation_step=100"/> <jvmarg value="-Dcassandra.test.use_prepared=${cassandra.test.use_prepared}"/> @@ -1430,10 +1452,11 @@ <jvmarg value="-Djava.security.egd=file:/dev/urandom" /> <jvmarg value="-Dcassandra.testtag=@{testtag}"/> <jvmarg value="-Dcassandra.keepBriefBrief=${cassandra.keepBriefBrief}" /> - <jvmarg value="-Dcassandra.strict.runtime.checks=true" /> + <jvmarg value="-Dcassandra.strict.runtime.checks=true" /> <jvmarg line="${java11-jvmargs}"/> - <!-- disable shrinks in quicktheories CASSANDRA-15554 --> + <!-- disable shrinks in quicktheories CASSANDRA-15554 --> <jvmarg value="-DQT_SHRINKS=0"/> + <jvmarg line="${test-jvmargs}" /> <optjvmargs/> <!-- Uncomment to debug unittest, attach debugger to port 1416 --> <!-- @@ -2076,7 +2099,6 @@ <jvmarg value="-Dcassandra.ring_delay_ms=10000"/> <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/> <jvmarg value="-Dcassandra.skip_sync=true" /> - <jvmarg value="-XX:MaxMetaspaceSize=512M"/> </testmacro> </target> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org