-
Bug
-
Resolution: Fixed
-
P3
-
17
-
b21
-
linux
The test case runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java fails, if an external build JDK is provided using the configure flag --with-build-jdk:
$ bash configure --with-jtreg=../jtreg/build/images/jtreg --with-conf-name=internal-buildjdk
$ make CONF=internal-buildjdk product-images test-image
$ bash configure --with-jtreg=../jtreg/build/images/jtreg --with-build-jdk=$(pwd)/build/internal-buildjdk/images/jdk/ --with-conf-name=external-buildjdk
$ make CONF=external-buildjdk product-images test-image
$ make CONF=internal-buildjdk TEST=test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java test
Test results: passed: 1
$ make CONF=external-buildjdk TEST=test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java test
Test results: failed: 1
It looks like the reason the test is failing is, that a different classlist file is generated:
$ bash -c 'diff <( sort ./build/internal-buildjdk/images/jdk/lib/classlist ) <( sort ./build/external-buildjdk/images/jdk/lib/classlist )'
544a545
> java/util/Collections$UnmodifiableMap
988a990
> jdk/internal/module/ModuleHashes$Builder
1006a1009
> jdk/internal/module/SystemModuleFinders$3
1286a1290
> sun/net/www/protocol/jrt/Handler
1393a1398
> sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo
The ordering in the classlists is also slightly different.
Copying the classlist from the CONF=internal-buildjdk to CONF=external-buildjdk makes the test pass.
Excerpt of the log of the failing test:
Test case[6] = "-nowhitebox -subgraph java/lang/Module jdk.internal.module.ArchivedBootLayer"
Command line: [/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk/bin/java -cp /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib:/home/cgo/dev/openjdk/jdk/test/lib:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/javatest.jar:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/jtreg.jar -XX:MaxRAMPercentage=3 -Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp -Xshare:auto -Dtest.timeout.factor=4.0 -XX:SharedArchiveFile=ReplaceCriticalClasses.jsa -showversion -Xlog:cds -XX:+UnlockDiagnosticVMOptions -agentlib:SimpleClassFileLoadHook=java/lang/Module,XXX,XXX -Xlog:cds,cds+heap ReplaceCriticalClasses child -shared java/lang/Module ]
[2021-02-25T15:21:00.807647643Z] Gathering output for process 2046385
[ELAPSED: 21 ms]
[logging stdout to /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/scratch/0/runtime.cds.serviceability.ReplaceCriticalClassesForSubgraphs.java-0007-exec.stdout]
[logging stderr to /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/scratch/0/runtime.cds.serviceability.ReplaceCriticalClassesForSubgraphs.java-0007-exec.stderr]
[STDERR]
Agent library loaded with options = java/lang/Module,XXX,XXX
CLASS_NAME = java/lang/Module, FROM = XXX, TO = XXX
[2021-02-25T15:21:00.827342352Z] Waiting for completion for process 2046385
[2021-02-25T15:21:00.827394728Z] Waiting for completion finished for process 2046385
[2021-02-25T15:21:00.827471242Z] Waiting for completion for process 2046385
[2021-02-25T15:21:00.827507596Z] Waiting for completion finished for process 2046385
[2021-02-25T15:21:00.827567508Z] Waiting for completion for process 2046385
[2021-02-25T15:21:00.827602746Z] Waiting for completion finished for process 2046385
STDERR:
stdout: [[0.005s][info][cds] trying to map ReplaceCriticalClasses.jsa
[0.005s][info][cds] Opened archive ReplaceCriticalClasses.jsa.
[0.005s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.005s][info][cds] Mapped static region #0 at base 0x0000000800000000 top 0x0000000800003000 (MiscCode)
[0.005s][info][cds] Mapped static region #1 at base 0x0000000800003000 top 0x0000000800442000 (ReadWrite)
[0.005s][info][cds] Mapped static region #2 at base 0x0000000800442000 top 0x0000000800c0a000 (ReadOnly)
[0.005s][info][cds] CDS archive was created with max heap size = 956M, and the following configuration:
[0.005s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
[0.005s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.005s][info][cds] The current max heap size = 956M, HeapRegion::GrainBytes = 1048576
[0.005s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
[0.005s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.005s][info][cds] CDS heap data relocation delta = 0 bytes
[0.005s][info][cds] Trying to map heap data: region[4] at 0x00000000fff00000, size = 565248 bytes
[0.005s][info][cds] Trying to map heap data: region[6] at 0x00000000ffe00000, size = 483328 bytes
[0.005s][info][cds] optimized module handling: enabled
[0.005s][info][cds] full module graph: enabled
[0.005s][info][cds] use_full_module_graph = true; java.base = 0x000000080043bcf8
[0.007s][info][cds,heap] subgraph sun.util.locale.BaseLocale cannot be used because JVMTI ClassFileLoadHook is enabled
[0.007s][info][cds,heap] subgraph jdk.internal.math.FDBigInteger cannot be used because JVMTI ClassFileLoadHook is enabled
[0.007s][info][cds,heap] subgraph jdk.internal.loader.ArchivedClassLoaders cannot be used because JVMTI ClassFileLoadHook is enabled
[0.007s][info][cds,heap] subgraph jdk.internal.module.ArchivedBootLayer cannot be used because JVMTI ClassFileLoadHook is enabled
[0.009s][info][cds,heap] initialize_from_archived_subgraph java.lang.Module$ArchivedData 0x0000000800175f20 (early)
[0.009s][info][cds,heap] initialize_from_archived_subgraph java.util.ImmutableCollections 0x0000000800075e48 (early)
[0.011s][info][cds,heap] initialize_from_archived_subgraph java.lang.Integer$IntegerCache 0x0000000800044140 (early)
[0.013s][info][cds,heap] subgraph jdk.internal.module.ArchivedBootLayer cannot be used because JVMTI ClassFileLoadHook is enabled
[0.013s][info][cds,heap] initialize_from_archived_subgraph java.lang.module.Configuration 0x0000000800165bf0 (early)
[0.013s][info][cds,heap] subgraph jdk.internal.loader.ArchivedClassLoaders cannot be used because JVMTI ClassFileLoadHook is enabled
[0.014s][info][cds,heap] initialize_from_archived_subgraph jdk.internal.module.ArchivedModuleGraph 0x0000000800169078 (early)
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Module jdk.nio.mapmode is already defined
];
stderr: [Agent library loaded with options = java/lang/Module,XXX,XXX
CLASS_NAME = java/lang/Module, FROM = XXX, TO = XXX
]
exitValue = 1
java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:206)
at ReplaceCriticalClasses.lambda$launchChild$0(ReplaceCriticalClasses.java:192)
at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:145)
at ReplaceCriticalClasses.launchChild(ReplaceCriticalClasses.java:184)
at ReplaceCriticalClasses.launchChildProcesses(ReplaceCriticalClasses.java:111)
at ReplaceCriticalClasses.process(ReplaceCriticalClasses.java:60)
at ReplaceCriticalClassesForSubgraphs.main(ReplaceCriticalClassesForSubgraphs.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)
JavaTest Message: Test threw exception: java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
rerun:
cd /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/scratch/0 && \
DISPLAY=:0.0 \
HOME=/home/cgo \
JDK8_HOME=/opt/toolchains/openjdk15-amd64 \
LANG=en_US.UTF-8 \
LC_ALL=C \
PATH=/bin:/usr/bin:/usr/sbin \
TEST_IMAGE_DIR=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test \
TEST_IMAGE_GRAAL_DIR=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/graal \
XMODIFIERS=@im=ibus \
LD_LIBRARY_PATH=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/native \
CLASSPATH=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib:/home/cgo/dev/openjdk/jdk/test/lib:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/javatest.jar:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/jtreg.jar \
/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk/bin/java \
-Dtest.vm.opts='-XX:MaxRAMPercentage=3 -Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp' \
-Dtest.tool.vm.opts='-J-XX:MaxRAMPercentage=3 -J-Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp' \
-Dtest.compiler.opts= \
-Dtest.java.opts= \
-Dtest.jdk=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk \
-Dcompile.jdk=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk \
-Dtest.timeout.factor=4.0 \
-Dtest.nativepath=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/native \
-Dtest.root=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg \
-Dtest.name=runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java \
-Dtest.file=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java \
-Dtest.src=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability \
-Dtest.src.path=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/test/lib \
-Dtest.classes=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d \
-Dtest.class.path=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib \
-Dtest.class.path.prefix=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib \
-XX:MaxRAMPercentage=3 \
-Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp \
-Djava.library.path=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/native \
com.sun.javatest.regtest.agent.MainWrapper /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d/main.0.jta
TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
I am not sure, if the real problem is
a) that the build system creates a different classlist file
b) something in the CDS system
c) both
$ bash configure --with-jtreg=../jtreg/build/images/jtreg --with-conf-name=internal-buildjdk
$ make CONF=internal-buildjdk product-images test-image
$ bash configure --with-jtreg=../jtreg/build/images/jtreg --with-build-jdk=$(pwd)/build/internal-buildjdk/images/jdk/ --with-conf-name=external-buildjdk
$ make CONF=external-buildjdk product-images test-image
$ make CONF=internal-buildjdk TEST=test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java test
Test results: passed: 1
$ make CONF=external-buildjdk TEST=test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java test
Test results: failed: 1
It looks like the reason the test is failing is, that a different classlist file is generated:
$ bash -c 'diff <( sort ./build/internal-buildjdk/images/jdk/lib/classlist ) <( sort ./build/external-buildjdk/images/jdk/lib/classlist )'
544a545
> java/util/Collections$UnmodifiableMap
988a990
> jdk/internal/module/ModuleHashes$Builder
1006a1009
> jdk/internal/module/SystemModuleFinders$3
1286a1290
> sun/net/www/protocol/jrt/Handler
1393a1398
> sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo
The ordering in the classlists is also slightly different.
Copying the classlist from the CONF=internal-buildjdk to CONF=external-buildjdk makes the test pass.
Excerpt of the log of the failing test:
Test case[6] = "-nowhitebox -subgraph java/lang/Module jdk.internal.module.ArchivedBootLayer"
Command line: [/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk/bin/java -cp /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib:/home/cgo/dev/openjdk/jdk/test/lib:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/javatest.jar:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/jtreg.jar -XX:MaxRAMPercentage=3 -Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp -Xshare:auto -Dtest.timeout.factor=4.0 -XX:SharedArchiveFile=ReplaceCriticalClasses.jsa -showversion -Xlog:cds -XX:+UnlockDiagnosticVMOptions -agentlib:SimpleClassFileLoadHook=java/lang/Module,XXX,XXX -Xlog:cds,cds+heap ReplaceCriticalClasses child -shared java/lang/Module ]
[2021-02-25T15:21:00.807647643Z] Gathering output for process 2046385
[ELAPSED: 21 ms]
[logging stdout to /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/scratch/0/runtime.cds.serviceability.ReplaceCriticalClassesForSubgraphs.java-0007-exec.stdout]
[logging stderr to /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/scratch/0/runtime.cds.serviceability.ReplaceCriticalClassesForSubgraphs.java-0007-exec.stderr]
[STDERR]
Agent library loaded with options = java/lang/Module,XXX,XXX
CLASS_NAME = java/lang/Module, FROM = XXX, TO = XXX
[2021-02-25T15:21:00.827342352Z] Waiting for completion for process 2046385
[2021-02-25T15:21:00.827394728Z] Waiting for completion finished for process 2046385
[2021-02-25T15:21:00.827471242Z] Waiting for completion for process 2046385
[2021-02-25T15:21:00.827507596Z] Waiting for completion finished for process 2046385
[2021-02-25T15:21:00.827567508Z] Waiting for completion for process 2046385
[2021-02-25T15:21:00.827602746Z] Waiting for completion finished for process 2046385
STDERR:
stdout: [[0.005s][info][cds] trying to map ReplaceCriticalClasses.jsa
[0.005s][info][cds] Opened archive ReplaceCriticalClasses.jsa.
[0.005s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.005s][info][cds] Mapped static region #0 at base 0x0000000800000000 top 0x0000000800003000 (MiscCode)
[0.005s][info][cds] Mapped static region #1 at base 0x0000000800003000 top 0x0000000800442000 (ReadWrite)
[0.005s][info][cds] Mapped static region #2 at base 0x0000000800442000 top 0x0000000800c0a000 (ReadOnly)
[0.005s][info][cds] CDS archive was created with max heap size = 956M, and the following configuration:
[0.005s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
[0.005s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.005s][info][cds] The current max heap size = 956M, HeapRegion::GrainBytes = 1048576
[0.005s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
[0.005s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.005s][info][cds] CDS heap data relocation delta = 0 bytes
[0.005s][info][cds] Trying to map heap data: region[4] at 0x00000000fff00000, size = 565248 bytes
[0.005s][info][cds] Trying to map heap data: region[6] at 0x00000000ffe00000, size = 483328 bytes
[0.005s][info][cds] optimized module handling: enabled
[0.005s][info][cds] full module graph: enabled
[0.005s][info][cds] use_full_module_graph = true; java.base = 0x000000080043bcf8
[0.007s][info][cds,heap] subgraph sun.util.locale.BaseLocale cannot be used because JVMTI ClassFileLoadHook is enabled
[0.007s][info][cds,heap] subgraph jdk.internal.math.FDBigInteger cannot be used because JVMTI ClassFileLoadHook is enabled
[0.007s][info][cds,heap] subgraph jdk.internal.loader.ArchivedClassLoaders cannot be used because JVMTI ClassFileLoadHook is enabled
[0.007s][info][cds,heap] subgraph jdk.internal.module.ArchivedBootLayer cannot be used because JVMTI ClassFileLoadHook is enabled
[0.009s][info][cds,heap] initialize_from_archived_subgraph java.lang.Module$ArchivedData 0x0000000800175f20 (early)
[0.009s][info][cds,heap] initialize_from_archived_subgraph java.util.ImmutableCollections 0x0000000800075e48 (early)
[0.011s][info][cds,heap] initialize_from_archived_subgraph java.lang.Integer$IntegerCache 0x0000000800044140 (early)
[0.013s][info][cds,heap] subgraph jdk.internal.module.ArchivedBootLayer cannot be used because JVMTI ClassFileLoadHook is enabled
[0.013s][info][cds,heap] initialize_from_archived_subgraph java.lang.module.Configuration 0x0000000800165bf0 (early)
[0.013s][info][cds,heap] subgraph jdk.internal.loader.ArchivedClassLoaders cannot be used because JVMTI ClassFileLoadHook is enabled
[0.014s][info][cds,heap] initialize_from_archived_subgraph jdk.internal.module.ArchivedModuleGraph 0x0000000800169078 (early)
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Module jdk.nio.mapmode is already defined
];
stderr: [Agent library loaded with options = java/lang/Module,XXX,XXX
CLASS_NAME = java/lang/Module, FROM = XXX, TO = XXX
]
exitValue = 1
java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:206)
at ReplaceCriticalClasses.lambda$launchChild$0(ReplaceCriticalClasses.java:192)
at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:145)
at ReplaceCriticalClasses.launchChild(ReplaceCriticalClasses.java:184)
at ReplaceCriticalClasses.launchChildProcesses(ReplaceCriticalClasses.java:111)
at ReplaceCriticalClasses.process(ReplaceCriticalClasses.java:60)
at ReplaceCriticalClassesForSubgraphs.main(ReplaceCriticalClassesForSubgraphs.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)
JavaTest Message: Test threw exception: java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
rerun:
cd /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/scratch/0 && \
DISPLAY=:0.0 \
HOME=/home/cgo \
JDK8_HOME=/opt/toolchains/openjdk15-amd64 \
LANG=en_US.UTF-8 \
LC_ALL=C \
PATH=/bin:/usr/bin:/usr/sbin \
TEST_IMAGE_DIR=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test \
TEST_IMAGE_GRAAL_DIR=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/graal \
XMODIFIERS=@im=ibus \
LD_LIBRARY_PATH=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/native \
CLASSPATH=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib:/home/cgo/dev/openjdk/jdk/test/lib:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/javatest.jar:/home/cgo/dev/openjdk/jtreg/build/images/jtreg/lib/jtreg.jar \
/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk/bin/java \
-Dtest.vm.opts='-XX:MaxRAMPercentage=3 -Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp' \
-Dtest.tool.vm.opts='-J-XX:MaxRAMPercentage=3 -J-Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp' \
-Dtest.compiler.opts= \
-Dtest.java.opts= \
-Dtest.jdk=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk \
-Dcompile.jdk=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/jdk \
-Dtest.timeout.factor=4.0 \
-Dtest.nativepath=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/native \
-Dtest.root=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg \
-Dtest.name=runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java \
-Dtest.file=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java \
-Dtest.src=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability \
-Dtest.src.path=/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/test/lib \
-Dtest.classes=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d \
-Dtest.class.path=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib \
-Dtest.class.path.prefix=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d:/home/cgo/dev/openjdk/jdk/test/hotspot/jtreg/runtime/cds/serviceability:/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/classes/0/test/lib \
-XX:MaxRAMPercentage=3 \
-Djava.io.tmpdir=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/tmp \
-Djava.library.path=/home/cgo/dev/openjdk/jdk/build/external-buildjdk/images/test/hotspot/jtreg/native \
com.sun.javatest.regtest.agent.MainWrapper /home/cgo/dev/openjdk/jdk/build/external-buildjdk/test-support/jtreg_test_hotspot_jtreg_runtime_cds_serviceability_ReplaceCriticalClassesForSubgraphs_java/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.d/main.0.jta
TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'initialize_from_archived_subgraph jdk.internal.module.ArchivedBootLayer' missing from stdout/stderr
I am not sure, if the real problem is
a) that the build system creates a different classlist file
b) something in the CDS system
c) both