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

[Graal] runtime/CommandLine/PrintTouchedMethods.java crashes with assertion "reference count underflow for symbol"

    XMLWordPrintable

    Details

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

      Description

      runtime/CommandLine/PrintTouchedMethods.java crashes with assertion

      # Internal Error (work/JavaSE/Hotspot/ws/jdk.hs/open/src/hotspot/share/oops/symbol.cpp:226), pid=2183, tid=2201
      # assert(false) failed: reference count underflow for symbol

      Current CompileTask:
      JVMCI: 1202 209 4 java.lang.String::hashCode (49 bytes)

      Stack: [0x00007fe4d852e000,0x00007fe4d862f000], sp=0x00007fe4d862c1c0, free space=1016k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1815742] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x162
      V [libjvm.so+0x18165df] VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x2f
      V [libjvm.so+0xb2cb2d] report_vm_error(char const*, int, char const*, char const*, ...)+0xdd
      V [libjvm.so+0x16fe226] Symbol::decrement_refcount()+0xe6
      V [libjvm.so+0x1026e0b] JVM_FindLoadedClass+0x20b
      J 673 java.lang.ClassLoader.findLoadedClass0(Ljava/lang/String;)Ljava/lang/Class; java.base@11-internal (0 bytes) @ 0x00007fe4f4569546 [0x00007fe4f4569400+0x0000000000000146]
      J 676 c1 jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Ljava/lang/String;Z)Ljava/lang/Class; java.base@11-internal (143 bytes) @ 0x00007fe4eaa6791c [0x00007fe4eaa672c0+0x000000000000065c]
      J 683 c1 jdk.internal.loader.BuiltinClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; java.base@11-internal (22 bytes) @ 0x00007fe4eaa6b4d4 [0x00007fe4eaa6b280+0x0000000000000254]
      J 682 c1 java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; java.base@11-internal (7 bytes) @ 0x00007fe4eaa6ae34 [0x00007fe4eaa6abe0+0x0000000000000254]
      v ~StubRoutines::call_stub
      V [libjvm.so+0xecb741] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x7e1
      V [libjvm.so+0xec89cf] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x41f
      V [libjvm.so+0xec8d8e] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Handle, Thread*)+0xee
      V [libjvm.so+0x1719cb0] SystemDictionary::load_instance_class(Symbol*, Handle, Thread*)+0x200
      V [libjvm.so+0x171ab07] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, Thread*)+0x967
      V [libjvm.so+0x171b05a] SystemDictionary::resolve_or_null(Symbol*, Handle, Handle, Thread*)+0x5a
      V [libjvm.so+0x171b59e] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, Thread*)+0x1e
      V [libjvm.so+0xb0c88b] ConstantPool::klass_at_impl(constantPoolHandle const&, int, bool, Thread*)+0x31b
      V [libjvm.so+0xb0d6c4] ConstantPool::klass_ref_at(int, Thread*)+0x44
      V [libjvm.so+0x11fd86b] LinkResolver::resolve_field_access(fieldDescriptor&, constantPoolHandle const&, int, methodHandle const&, Bytecodes::Code, Thread*)+0x6b
      V [libjvm.so+0xea39a6] InterpreterRuntime::resolve_get_put(JavaThread*, Bytecodes::Code)+0x206
      V [libjvm.so+0xea9beb] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0xfb
      j org.graalvm.compiler.hotspot.CompilationWatchDog.watch(Ljdk/vm/ci/meta/ResolvedJavaMethod;ILorg/graalvm/compiler/options/OptionValues;)Lorg/graalvm/compiler/hotspot/CompilationWatchDog;+0 jdk.internal.vm.compiler@11-internal
      j org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(Ljdk/vm/ci/code/CompilationRequest;Z)Ljdk/vm/ci/code/CompilationRequestResult;+133 jdk.internal.vm.compiler@11-internal
      j org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(Ljdk/vm/ci/code/CompilationRequest;)Ljdk/vm/ci/code/CompilationRequestResult;+3 jdk.internal.vm.compiler@11-internal
      j jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;IJI)Ljdk/vm/ci/hotspot/HotSpotCompilationRequestResult;+16 jdk.internal.vm.ci@11-internal
      V [libjvm.so+0xecb741] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x7e1
      V [libjvm.so+0xec932d] JavaCalls::call_special(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x25d
      V [libjvm.so+0x106576b] JVMCICompiler::compile_method(methodHandle const&, int, JVMCIEnv*)+0x84b
      V [libjvm.so+0xa9d4a7] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc07
      V [libjvm.so+0xa9d831] CompileBroker::compiler_thread_loop()+0x241
      V [libjvm.so+0x176921a] JavaThread::thread_main_inner()+0x21a
      V [libjvm.so+0x1769424] JavaThread::run()+0x144
      V [libjvm.so+0x149647a] thread_native_entry(Thread*)+0xfa

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      J 673 java.lang.ClassLoader.findLoadedClass0(Ljava/lang/String;)Ljava/lang/Class; java.base@11-internal (0 bytes) @ 0x00007fe4f45694d3 [0x00007fe4f4569400+0x00000000000000d3]
      J 676 c1 jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Ljava/lang/String;Z)Ljava/lang/Class; java.base@11-internal (143 bytes) @ 0x00007fe4eaa6791c [0x00007fe4eaa672c0+0x000000000000065c]
      J 683 c1 jdk.internal.loader.BuiltinClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; java.base@11-internal (22 bytes) @ 0x00007fe4eaa6b4d4 [0x00007fe4eaa6b280+0x0000000000000254]
      J 682 c1 java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; java.base@11-internal (7 bytes) @ 0x00007fe4eaa6ae34 [0x00007fe4eaa6abe0+0x0000000000000254]
      v ~StubRoutines::call_stub
      j org.graalvm.compiler.hotspot.CompilationWatchDog.watch(Ljdk/vm/ci/meta/ResolvedJavaMethod;ILorg/graalvm/compiler/options/OptionValues;)Lorg/graalvm/compiler/hotspot/CompilationWatchDog;+0 jdk.internal.vm.compiler@11-internal
      j org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(Ljdk/vm/ci/code/CompilationRequest;Z)Ljdk/vm/ci/code/CompilationRequestResult;+133 jdk.internal.vm.compiler@11-internal
      j org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(Ljdk/vm/ci/code/CompilationRequest;)Ljdk/vm/ci/code/CompilationRequestResult;+3 jdk.internal.vm.compiler@11-internal
      j jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;IJI)Ljdk/vm/ci/hotspot/HotSpotCompilationRequestResult;+16 jdk.internal.vm.ci@11-internal
      v ~StubRoutines::call_stub


      The failure is intermittent, but I was able to reproduce it on 6th iteration.
      Steps to run the test:
      > jtreg -va -jdk:JDK_HS_fastdebug -vmoptions:-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal
        runtime/CommandLine/PrintTouchedMethods.java

        Attachments

          Activity

            People

            Assignee:
            iklam Ioi Lam
            Reporter:
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: