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

CDS without G1 gives build error in slowdebug, asserts in fastdebug

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • None
    • hotspot
    • master

      When building the JDK without G1 (via --with-jvm-features=-g1gc) the build fails with

      /usr/bin/ld: ...open/build/linux-aarch64-server-slowdebug/hotspot/variant-server/libjvm/objs/universe.o: in function `universe_init()':
      ...open/src/hotspot/share/memory/universe.cpp:913:(.text+0x2cc8): undefined reference to `ClassLoaderDataShared::restore_archived_entries_for_null_class_loader_data()'
      collect2: error: ld returned 1 exit status
      gmake[3]: *** [lib/CompileJvm.gmk:175: .../build/linux-aarch64-server-slowdebug/support/modules_libs/java.base/server/libjvm.so] Error 1
      gmake[2]: *** [make/Main.gmk:242: hotspot-server-libs] Error 2

      ERROR: Build failed for target 'images' in configuration 'linux-aarch64-server-slowdebug' (exit code 2)

      ============

      After fixing the missing symbol, we will get a crash with "java -Xshare:on"

      # Internal Error (/jdk3/vox/open/src/hotspot/share/oops/compressedKlass.cpp:323), pid=1281116, tid=1281148
      # assert(addr == base()) failed: Protection zone not at start of encoding range?

      V [libjvm.so+0xaf53f1] CompressedKlassPointers::establish_protection_zone(unsigned char*, unsigned long)+0x9b (compressedKlass.cpp:323)
      V [libjvm.so+0x13ca72e] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0xb9a (metaspaceShared.cpp:1624)
      V [libjvm.so+0x13c97af] MetaspaceShared::initialize_runtime_shared_and_meta_spaces()+0x147 (metaspaceShared.cpp:1342)
      V [libjvm.so+0x13bcc92] Metaspace::global_initialize()+0x74 (metaspace.cpp:743)
      V [libjvm.so+0x177323d] universe_init()+0xd3 (universe.cpp:891)
      V [libjvm.so+0xeee848] init_globals()+0x61 (init.cpp:138)
      V [libjvm.so+0x17431b0] Threads::create_vm(JavaVMInitArgs*, bool*)+0x3ec (threads.cpp:592)
      V [libjvm.so+0x1050b62] JNI_CreateJavaVM_inner(JavaVM_**, void**, void*)+0x93 (jni.cpp:3589)
      V [libjvm.so+0x1050f98] JNI_CreateJavaVM+0x32 (jni.cpp:3680)
      C [libjli.so+0x3cff] JavaMain+0x8f
      C [libjli.so+0x7d29] ThreadJavaMain+0x9

            stuefe Thomas Stuefe
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: