JDK-8297543 : runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java fail with jfx
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,17,18
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2022-11-24
  • Updated: 2022-12-19
  • Resolved: 2022-11-29
Related Reports
Duplicate :  
Description
configure --with-import-modules=modular-sdk

make run-test CONF=fastdebug TEST="runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java" failed:

```
STDERR:
java.lang.RuntimeException: javafx.controls requires javafx.base jrt:/javafx.base is different from javafx.base requires jdk.jfr jrt:/jdk.jfr
        at TestCommon.checkOutputStrings(TestCommon.java:657)
        at ArchivedModuleCompareTest.main(ArchivedModuleCompareTest.java:82)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:833)
```

debug patch:

```
diff --git a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
index 00ef746123f..5501e8264e0 100644
--- a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
+++ b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
@@ -75,6 +75,10 @@ public class ArchivedModuleCompareTest {
         TestCommon.checkExec(output);
         if (output.getStderr().contains("sharing")) {
             String moduleResolutionOut2 = TestCommon.filterOutLogs(output.getStdout());
+            System.out.println("************************* moduleResolutionOut1 ***************************");
+            System.out.println(moduleResolutionOut1);
+            System.out.println("************************* moduleResolutionOut2 ***************************");
+            System.out.println(moduleResolutionOut2);
             TestCommon.checkOutputStrings(
                 moduleResolutionOut1, moduleResolutionOut2, "\n");
         }
```

There are 2 javafx.base in the moduleResolutionOut2:

```
javafx.base requires jdk.jfr jrt:/jdk.jfr
javafx.base requires java.desktop jrt:/java.desktop
```
Comments
This is a duplicate of JDK-8275731: CDS archived enums objects are recreated at runtime
29-11-2022

Commit openjdk/jdk@d983d108c565654e717e2811d88aa94d982da2f5 fix JDK-8297543: runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java fail with jfx And dependencies: * JDK-8267189: Remove duplicated unregistered classes from dynamic archive * JDK-8268821: Split systemDictionaryShared.cpp * JDK-8269004: Implement ResizableResourceHashtable * JDK-8270061: Change parameter order of ResourceHashtable * JDK-8270803: Reduce CDS API verbosity * JDK-8270489: Support archived heap objects in EpsilonGC * JDK-8275731: CDS archived enums objects are recreated at runtime
29-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11343 Date: 2022-11-24 03:42:17 +0000
24-11-2022