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

'assert(_value != NULL) failed: resolving NULL _value' from VM_RedefineClasses::set_new_constant_pool

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: hs25
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b51

      Backports

        Description

        # Internal Error (/localhome/stefank/hg/hsx-gc/src/share/vm/runtime/handles.hpp:173), pid=25187, tid=140072352110336
        # assert(_value != NULL) failed: resolving NULL _value

        Stack: [0x00007f6522ba5000,0x00007f6522ca6000], sp=0x00007f6522ca3700, free space=1017k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0xe29918] VMError::report_and_die()+0x158
        V [libjvm.so+0x698063] report_vm_error(char const*, int, char const*, char const*)+0x83
        V [libjvm.so+0x5550ff] constantPoolHandle::operator->() const+0x3f
        V [libjvm.so+0xa4593d] VM_RedefineClasses::set_new_constant_pool(ClassLoaderData*, instanceKlassHandle, constantPoolHandle, int, Thread*)+0xad
        V [libjvm.so+0xa492e2] VM_RedefineClasses::merge_cp_and_rewrite(instanceKlassHandle, instanceKlassHandle, Thread*)+0x662
        V [libjvm.so+0xa49820] VM_RedefineClasses::load_new_class_versions(Thread*)+0x510
        V [libjvm.so+0xa4a252] VM_RedefineClasses::doit_prologue()+0xa2
        V [libjvm.so+0xe4e806] VMThread::execute(VM_Operation*)+0x2d6
        V [libjvm.so+0xa0d908] JvmtiEnv::RedefineClasses(int, _jvmtiClassDefinition const*)+0x28
        V [libjvm.so+0x9a82d6] jvmti_RedefineClasses+0x1b6

        Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
        j runtime.ParallelClassLoading.shared.ClassLoadingController.redefineClasses(Ljava/lang/ClassLoader;Lruntime/ParallelClassLoading/shared/ClassLoadingController$ByteCodeForRedefinitionHandler;)I+0
        j runtime.ParallelClassLoading.shared.ClassLoadingController.startLoadingIterator()Z+806
        j runtime.ParallelClassLoading.shared.ClassLoadingController.runIt([Ljava/lang/String;Ljava/io/PrintStream;)I+9
        j runtime.ParallelClassLoading.shared.SecureClassLoaderController.run([Ljava/lang/String;Ljava/io/PrintStream;)I+9
        j runtime.ParallelClassLoading.shared.SecureClassLoaderController.main([Ljava/lang/String;)V+4
        v ~StubRoutines::call_stub

        We assert because we don't handle the OOME correctly in this code:
        void VM_RedefineClasses::set_new_constant_pool(
               ClassLoaderData* loader_data,
               instanceKlassHandle scratch_class, constantPoolHandle scratch_cp,
               int scratch_cp_length, TRAPS) {
          assert(scratch_cp->length() >= scratch_cp_length, "sanity check");

          // scratch_cp is a merged constant pool and has enough space for a
          // worst case merge situation. We want to associate the minimum
          // sized constant pool with the klass to save space.
          constantPoolHandle smaller_cp(THREAD,
                  ConstantPool::allocate(loader_data, scratch_cp_length, THREAD));

          // preserve version() value in the smaller copy
          int version = scratch_cp->version();
          assert(version != 0, "sanity check");
          smaller_cp->set_version(version);

          // attach klass to new constant pool
          // reference to the cp holder is needed for copy_operands()
          smaller_cp->set_pool_holder(scratch_class());

          scratch_cp->copy_cp_to(1, scratch_cp_length - 1, smaller_cp, 1, THREAD);
          scratch_cp = smaller_cp;

          // attach new constant pool to klass
          scratch_class->set_constants(scratch_cp());

        We should probably be using CHECK_NULL instead of THREAD.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sspitsyn Serguei Spitsyn
                  Reporter:
                  stefank Stefan Karlsson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: