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

NetworkInterface.getAll() exceeds jni localref capacity when using -Xcheck:jni

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 17
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      I noticed this when I ran the test/jdk/sun/tools/jhsdb tests with -Xcheck:jni. In some of the logs you see the warning below. test/jdk/sun/tools/jhsdb/HeapDumpTest.java is one test where I saw this.

      WARNING: JNI local refs: 33, exceeds capacity: 32
      at java.net.NetworkInterface.getAll(java.base@17-internal/Native Method)
      at java.net.NetworkInterface.getNetworkInterfaces(java.base@17-internal/NetworkInterface.java:351)
      at sun.security.provider.SeedGenerator.addNetworkAdapterInfo(java.base@17-internal/SeedGenerator.java:229)
      at sun.security.provider.SeedGenerator$1.run(java.base@17-internal/SeedGenerator.java:179)
      at sun.security.provider.SeedGenerator$1.run(java.base@17-internal/SeedGenerator.java:167)
      at java.security.AccessController.executePrivileged(java.base@17-internal/AccessController.java:753)
      at java.security.AccessController.doPrivileged(java.base@17-internal/AccessController.java:312)
      at sun.security.provider.SeedGenerator.getSystemEntropy(java.base@17-internal/SeedGenerator.java:167)
      at sun.security.provider.AbstractDrbg$SeederHolder.<clinit>(java.base@17-internal/AbstractDrbg.java:551)
      at sun.security.provider.AbstractDrbg.getEntropyInput(java.base@17-internal/AbstractDrbg.java:505)
      at sun.security.provider.AbstractDrbg.getEntropyInput(java.base@17-internal/AbstractDrbg.java:494)
      at sun.security.provider.AbstractDrbg.instantiateIfNecessary(java.base@17-internal/AbstractDrbg.java:696)
      - locked <0x00000000ffc9e380> (a sun.security.provider.HashDrbg)
      at sun.security.provider.AbstractDrbg.engineNextBytes(java.base@17-internal/AbstractDrbg.java:378)
      at sun.security.provider.AbstractDrbg.engineNextBytes(java.base@17-internal/AbstractDrbg.java:334)
      at sun.security.provider.DRBG.engineNextBytes(java.base@17-internal/DRBG.java:234)
      at java.security.SecureRandom.nextBytes(java.base@17-internal/SecureRandom.java:751)
      at java.util.UUID.randomUUID(java.base@17-internal/UUID.java:151)
      at jdk.test.lib.apps.LingeredApp.<init>(LingeredApp.java:111)
      at LingeredAppWithExtendedChars.<init>(LingeredAppWithExtendedChars.java:25)
      at HeapDumpTest.launch(HeapDumpTest.java:63)
      at HeapDumpTest.launch(HeapDumpTest.java:97)
      at HeapDumpTest.testHeapDump(HeapDumpTest.java:118)
      at HeapDumpTest.main(HeapDumpTest.java:131)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17-internal/Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17-internal/NativeMethodAccessorImpl.java:78)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17-internal/DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(java.base@17-internal/Method.java:566)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.lang.Thread.run(java.base@17-internal/Thread.java:831)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              chegar Chris Hegarty
              Reporter:
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: