JDK-8247362 : HeapDumpCompressedTest.java#id0 fails due to "Multiple garbage collectors selected"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-06-10
  • Updated: 2020-07-02
  • Resolved: 2020-06-10
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 15 JDK 16
15 b27Fixed 16Fixed
Related Reports
Relates :  
Description
The following test fails in the JDK15 CI:

serviceability/dcmd/gc/HeapDumpCompressedTest.java#id0

Here's a snippet from the log file:

#section:main
----------messages:(5/438)----------
command: main -XX:+UseSerialGC HeapDumpCompressedTest
reason: User specified action: run main/othervm -XX:+UseSerialGC HeapDumpCompressedTest 
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base,java.compiler,java.management,jdk.internal.jvmstat --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
elapsed time (seconds): 0.056
----------configuration:(5/225)----------
Boot Layer
  add modules: java.base java.compiler java.management jdk.internal.jvmstat 
  add exports: java.base/jdk.internal.misc              ALL-UNNAMED
               jdk.internal.jvmstat/sun.jvmstat.monitor ALL-UNNAMED

----------System.out:(2/80)----------
Error occurred during initialization of VM
Multiple garbage collectors selected
----------System.err:(0/0)----------
----------rerun:(39/6486)*----------
cd /opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/3 && \\
HOME=/tmp/sparky-temp-home-7391239903976320005/user_home \\
JDK8_HOME=/opt/mach5/mesos/work_dir/jib-master/install/jdk/14/36/bundles/linux-x64/jdk-14_linux-x64_bin.tar.gz/jdk-14 \\
JIB_DATA_DIR=/opt/mach5/mesos/work_dir/jib-master \\
JIB_HOME=/opt/mach5/mesos/work_dir/jib-master/install/com/oracle/java/jib/jib/3.0-SNAPSHOT/jib-3.0-SNAPSHOT-distribution.zip-1591722412/jib-3.0-SNAPSHOT-distribution \\
JTREG_EXTRA_PROBLEM_LISTS=ProblemList-zgc.txt \\
JTREG_KEYWORDS="!headful" \\
JTREG_VERBOSE=fail,error,time \\
LC_ALL=C \\
PATH=/bin:/usr/bin:/usr/sbin \\
TEST_IMAGE_DIR=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.test \\
TEST_IMAGE_GRAAL_DIR=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.test/hotspot/jtreg/graal \\
CLASSPATH=/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/serviceability/dcmd/gc/HeapDumpCompressedTest_id0.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/hotspot/jtreg/serviceability/dcmd/gc:/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/test/lib:/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/lib:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/5.0/b01/bundles/jtreg_bin-5.0.zip/jtreg/lib/javatest.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/5.0/b01/bundles/jtreg_bin-5.0.zip/jtreg/lib/jtreg.jar \\
    /opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.jdk/jdk-15/fastdebug/bin/java \\
        -Dtest.class.path.prefix=/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/serviceability/dcmd/gc/HeapDumpCompressedTest_id0.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/hotspot/jtreg/serviceability/dcmd/gc:/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/test/lib \\
        -Dtest.file=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/hotspot/jtreg/serviceability/dcmd/gc/HeapDumpCompressedTest.java \\
        -Dtest.src=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/hotspot/jtreg/serviceability/dcmd/gc \\
        -Dtest.src.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/hotspot/jtreg/serviceability/dcmd/gc:/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/lib \\
        -Dtest.classes=/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/serviceability/dcmd/gc/HeapDumpCompressedTest_id0.d \\
        -Dtest.class.path=/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/serviceability/dcmd/gc/HeapDumpCompressedTest_id0.d:/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/classes/1/test/lib \\
        -Dtest.vm.opts=-XX:MaxRAMPercentage=6 \\
        -Dtest.tool.vm.opts=-J-XX:MaxRAMPercentage=6 \\
        -Dtest.compiler.opts= \\
        -Dtest.java.opts='-XX:+CreateCoredumpOnCrash -XX:+UseZGC' \\
        -Dtest.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.jdk/jdk-15/fastdebug \\
        -Dcompile.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.jdk/jdk-15/fastdebug \\
        -Dtest.timeout.factor=4.0 \\
        -Dtest.root=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/src.full/open/test/hotspot/jtreg \\
        -Dtest.modules='java.base/jdk.internal.misc java.compiler java.management jdk.internal.jvmstat/sun.jvmstat.monitor' \\
        -Dtest.nativepath=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.test/hotspot/jtreg/native \\
        --add-modules java.base,java.compiler,java.management,jdk.internal.jvmstat \\
        --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \\
        --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \\
        -XX:MaxRAMPercentage=6 \\
        -XX:+CreateCoredumpOnCrash \\
        -XX:+UseZGC \\
        -Djava.library.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+27-1351/linux-x64-debug.test/hotspot/jtreg/native \\
        -XX:+UseSerialGC \\
        com.sun.javatest.regtest.agent.MainWrapper /opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S648/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/11e13040-164e-4f7b-b283-44f454297add/runs/3fba3bdc-5897-478f-8f2a-bf4e33a8ced9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/serviceability/dcmd/gc/HeapDumpCompressedTest_id0.d/main.0.jta
result: Failed. Unexpected exit from test [exit code: 1]


test result: Failed. Unexpected exit from test [exit code: 1]


Please notice that the test @run specifies '-XX:+UseSerialGC'
and the test is also invoked with '-XX:+UseZGC' probably from
the task definition.
Comments
Changeset: 74500984 Author: Ralf Schmelter <rschmelter@openjdk.org> Date: 2020-06-10 23:40:44 +0000 URL: https://git.openjdk.java.net/lanai/commit/74500984
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/560240ab746a User: rschmelter Date: 2020-06-10 21:52:55 +0000
10-06-2020

The HotSpot jtreg tests are continuously run with a different set of GC flags, and other flags. It's up to the test writer to write sufficient @require tags to deal with that situation. Of course, it's not always easy to anticipate all flags being thrown at a test, but the GC flags are something that we are going to specify when running jtreg. I'm not sure how the documentation could be updated to reflect this. If you have something in mind, then please go a head and create a RFE / RFR for it.
10-06-2020

This test failure is showing up in every Tier3 job set. Bumping from P4 -> P3 in order to reduce the noise in the JDK15 CI.
10-06-2020

I tested wiith make test JTREG=erviceability/dcmd/gc/HeapDumpCompressedTest.java. Where do I get the information about the additional VM options to set in the JAVA_OPTIONS variable? I always used the documentation at https://hg.openjdk.java.net/jdk/jdk/raw-file/tip/doc/testing.html, which doesn't mention I had to run them with ZGC enabled by default. Nevertheless I have created a patch which adds @reguires for the serial, parallel and g1 GC too, so the command line now works. But the effect is of course, that only the ZGZ version of the test is run. Are the tests run on your systems with different JTREG JAVA_OPTONS, so that the test is still run with different GCs? The webrev; http://cr.openjdk.java.net/~rschmelter/webrevs/8247362/webrev.0/
10-06-2020

The test lacks appropriate @requires tags. Was this tested with the following?: make test TEST=test/hotspot/jtreg/serviceability/dcmd/gc/HeapDumpCompressedTest.java JTREG="JAVA_OPTIONS=-XX:+UseZGC"
10-06-2020

The serviceability/dcmd/gc/HeapDumpCompressedTest.java test was added by: JDK-8237354 Add option to jcmd to write a gzipped heap dump
10-06-2020