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

VM asserts if CodeCacheSegmentSize is not a power of 2

XMLWordPrintable

    • b04

      The VM should exit gracefully and not assert.

      java -XX:+UnlockExperimentalVMOptions -XX:CodeCacheSegmentSize=36 -version

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/workspace/open/src/hotspot/share/memory/heap.cpp:204), pid=48916, tid=48917
      # assert(is_power_of_2(segment_size)) failed: segment_size must be a power of 2
      #
      # JRE version: (25.0+26) (fastdebug build )
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+26-LTS-3300, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xf61bec] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x2ec

      Stack: [0x0000770aeb700000,0x0000770aeb800000], sp=0x0000770aeb7fc750, free space=1009k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xf61bec] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x2ec (heap.cpp:204)
      V [libjvm.so+0xad826e] CodeCache::add_heap(ReservedSpace, char const*, CodeBlobType)+0x12e
      V [libjvm.so+0xad8dfd] CodeCache::initialize_heaps()+0xa5d
      V [libjvm.so+0xad90c5] CodeCache::initialize()+0x145
      V [libjvm.so+0xfd7587] init_globals()+0x37
      V [libjvm.so+0x1af1cde] Threads::create_vm(JavaVMInitArgs*, bool*)+0x34e
      V [libjvm.so+0x119c9f4] JNI_CreateJavaVM+0x54
      C [libjli.so+0x3dff] JavaMain+0x8f
      C [libjli.so+0x8019] ThreadJavaMain+0x9
      C [libc.so.6+0x9caa4]

            amitkumar Amit Kumar
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: