-Xcheck:jni creates WARNING: JNI local refs: xxx, exceeds capacity: 32 with jdwp agent active

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 20
    • Component/s: hotspot
    • generic
    • generic

      When the vm is started with jdwp agent active and -Xcheck:jni is specified in addition, the message
      WARNING: JNI local refs: xxx, exceeds capacity: 32
      is issued. 'xxx' is a (varying) number significantly larger than the anticipated capacity (32). The warning message causes the newly introduced test
      test/jdk/tools/launcher/TestXcheckJNIWarnings.java
      to fail. The test will be enhanced by JDK-8296706 to cover the jdwp agent case as well (two test ids). The jdwp agent case will be problem-listed until this bug is resolved.

      To reproduce, simply issue the command
      java -Xcheck:jni -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -version

      If the number of outstanding JNI local refs is as expected, the checks in
      src/hotspot/prims/jniCheck.cpp
      should be adapted. Otherwise, it should be analysed why the number of local refs is excessive and if it can be brought down.

            Assignee:
            David Holmes
            Reporter:
            Lutz Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: