Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295029

runtime/cds/appcds/LotsOfClasses.java fail with jfx

XMLWordPrintable

    • 20
    • b20

      configure --with-import-modules=modular-sdk

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

      ```
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/dictionary.cpp:290
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/zhaixiang/jdk/src/hotspot/share/classfile/dictionary.cpp:290), pid=7748, tid=7749
      # assert(!needs_rehashing) failed: should never need rehashing
      #
      # JRE version: OpenJDK Runtime Environment (20.0) (fastdebug build 20-internal-adhoc.zhaixiang.jdk)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 20-internal-adhoc.zhaixiang.jdk, interpreted mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0xa85ee4] Dictionary::get_entry(Thread*, Symbol*)+0x284
      #
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # An error report file with more information is saved as:
      # /home/zhaixiang/jdk/build/linux-aarch64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_LotsOfClasses_java/scratch/0/hs_err_pid7748.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      ];
       stderr: [WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.concurrent
      ]
       exitValue = 134

      java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [134]
      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:490)
      at jdk.test.lib.cds.CDSTestUtils.checkDump(CDSTestUtils.java:280)
      at jdk.test.lib.cds.CDSTestUtils.createArchiveAndCheck(CDSTestUtils.java:300)
      at LotsOfClasses.main(LotsOfClasses.java:54)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:1591)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test


      TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [134]
      ```

      Workaround via UseEpsilonGC:

      ```
      make run-test CONF=fastdebug TEST="runtime/cds/appcds/LotsOfClasses.java" JTREG="VM_OPTIONS=-XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC"
      ```

      or just increase the "magic number":

      ```
      diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
      index c07d17ab1db..bc498ca041b 100644
      --- a/src/hotspot/share/classfile/dictionary.cpp
      +++ b/src/hotspot/share/classfile/dictionary.cpp
      @@ -50,8 +50,8 @@
       
       // 2^24 is max size, like StringTable.
       const size_t END_SIZE = 24;
      -// If a chain gets to 100 something might be wrong
      -const size_t REHASH_LEN = 100;
      +// If a chain gets to magic number 103 something might be wrong
      +const size_t REHASH_LEN = 103;
       
       Dictionary::Dictionary(ClassLoaderData* loader_data, size_t table_size, bool resizable)
         : _resizable(resizable), _number_of_entries(0), _loader_data(loader_data) {
      ```

            coleenp Coleen Phillimore
            lzhai Leslie Zhai
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: