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

LambdaForm retransformation via j.l.i.Instrumentation::retransformClasses leads to JVM crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 8u40, 9
    • Fix Version/s: 8u40
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      svc
    • CPU:
      generic
    • OS:
      generic

      Description

      Retransformation of j.l.i.LambdaForm using j.l.i.Instrumentation::retransformClasses and any registered ClassFileTranformer leads to following assertion:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/HUDSON/workspace/9-2-build-linux-amd64/jdk9/1503/hotspot/src/share/vm/oops/constantPool.cpp:2050), pid=23388, tid=139660894672640
      # assert(sym != NULL) failed: SymbolHashMap::find_entry - symbol is NULL
      #
      # JRE version: Java(TM) SE Runtime Environment (9.0-b35) (build 1.9.0-ea-fastdebug-b35)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-ea-fastdebug-b35 mixed mode linux-amd64 compressed oops)
      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.sun.com/bugreport/crash.jsp
      #

      Stack: [0x00007f0555f41000,0x00007f0556042000], sp=0x00007f055603f180, free space=1016k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1087731] VMError::report_and_die()+0x151
      V [libjvm.so+0x73d6fb] report_vm_error(char const*, int, char const*, char const*)+0x7b
      V [libjvm.so+0x726974] SymbolHashMap::find_entry(Symbol*)+0x114
      V [libjvm.so+0x72a40b] ConstantPool::copy_cpool_bytes(int, SymbolHashMap*, unsigned char*)+0x2cb
      V [libjvm.so+0xb0dc5c] JvmtiClassFileReconstituter::write_class_file_format()+0x10c
      V [libjvm.so+0xb8d33b] JvmtiEnv::RetransformClasses(int, _jclass* const*)+0x4fb
      V [libjvm.so+0xb10ee1] jvmti_RetransformClasses+0x141
      C [libinstrument.so+0x4543] retransformClasses+0x1f3
      j sun.instrument.InstrumentationImpl.retransformClasses0(J[Ljava/lang/Class;)V+0
      j sun.instrument.InstrumentationImpl.retransformClasses([Ljava/lang/Class;)V+23
      j Agent.premain(Ljava/lang/String;Ljava/lang/instrument/Instrumentation;)V+135
      ...

      With product builds such retransformation cause crash too.

      Issue could be reproduced with both 8u and 9 using attached test.

        Attachments

        1. core.23587.zip
          4.09 MB
        2. core.23757.zip
          3.50 MB
        3. hs_err_pid23587.log
          28 kB
        4. hs_err_pid23757.log
          31 kB
        5. TestLambdaFormRetransformation.java
          4 kB

          Issue Links

            Activity

              People

              Assignee:
              sspitsyn Serguei Spitsyn
              Reporter:
              fzhinkin Filipp Zhinkin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: