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

AOTMode=create crashes with EpsilonGC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 25
    • 24, 25
    • hotspot
    • b12

      Affects only EpsilonGC. Thus a P3.
      Work around is to avoid *creating* AOT cache with -XX:+EpsilonGC. You can still *use* the AOT cache with -XX:+EpsilonGC

      ===========
      Reproduces reliably in current mainline.

      $ cat HelloStream.java
      import java.util.*;
      import java.util.stream.*;

      public class HelloStream {
          public static void main(String ... args) {
              var words = List.of("hello", "fuzzy", "world");
              var greeting = words.stream()
                  .filter(w -> !w.contains("z"))
                  .collect(Collectors.joining(", "));
              System.out.println(greeting); // hello, world
          }
      }

      $ javac HelloStream.java

      $ rm -f app.aot*; build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:AOTMode=record -XX:AOTConfiguration=app.aotconf -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx64m -Xms64m HelloStream; build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:AOTMode=create -XX:AOTConfiguration=app.aotconf -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx64m -Xms64m -XX:AOTCache=app.aot HelloStream
      hello, world
      [0.271s][warning][cds] Skipping HelloStream: Unsupported location
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007cbb79c28f80, pid=971605, tid=971608
      #
      # JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-adhoc.shade.jdk)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-adhoc.shade.jdk, interpreted mode, compressed oops, compressed class ptrs, epsilon gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x628f80] AOTClassLinker::class_category_name(Klass*)+0x50
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/shade/trunks/jdk/core.971605)
      #
      # An error report file with more information is saved as:
      # /home/shade/trunks/jdk/hs_err_pid971605.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      Aborted (core dumped)

            iklam Ioi Lam
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: