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

[TESTBUG] DcmdMBeanTestCheckJni.java reports false positive

    XMLWordPrintable

    Details

      Backports

        Description

        The following test fails in the JDK17 CI:

        com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java

        Here's a snippet from the log file:

        #section:main
        ----------messages:(5/240)----------
        command: main DcmdMBeanTestCheckJni
        reason: User specified action: run main/othervm DcmdMBeanTestCheckJni
        Mode: othervm [/othervm specified]
        Additional options from @modules: --add-modules jdk.management
        elapsed time (seconds): 4.714
        ----------configuration:(3/45)----------
        Boot Layer
          add modules: jdk.management

        ----------System.out:(7/1492)*----------
        Command line: [c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+7-413\\windows-x64-debug.jdk\\jdk-17\\fastdebug\\bin\\java.exe -cp T:\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_management\\classes\\4\\com\\sun\\management\\DiagnosticCommandMBean\\DcmdMBeanTestCheckJni.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+7-413\\src.full\\open\\test\\jdk\\com\\sun\\management\\DiagnosticCommandMBean;T:\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_management\\classes\\4\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+7-413\\src.full\\open\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\5.1\\b01\\bundles\\jtreg_bin-5.1.zip\\jtreg\\lib\\javatest.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\5.1\\b01\\bundles\\jtreg_bin-5.1.zip\\jtreg\\lib\\jtreg.jar -Xmx512m -XX:MaxRAMPercentage=4 -Djava.io.tmpdir=t:\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_management\\tmp -ea -esa -XX:+CreateCoredumpOnCrash -XX:+UseZGC -Xcheck:jni DcmdMBeanRunner ]
        [2021-01-25T12:38:45.120926800Z] Gathering output for process 61876
        [2021-01-25T12:38:48.646225100Z] Waiting for completion for process 61876
        [2021-01-25T12:38:48.646225100Z] Waiting for completion finished for process 61876
        Output and diagnostic info for process 61876 was saved into 'pid-61876-output.log'
        [2021-01-25T12:38:48.677569400Z] Waiting for completion for process 61876
        [2021-01-25T12:38:48.677569400Z] Waiting for completion finished for process 61876
        ----------System.err:(80/6279)*----------
         stdout: [WARNING: JNI local refs: 33, exceeds capacity: 32
        at java.net.NetworkInterface.getAll(java.base@17-ea/Native Method)
        at java.net.NetworkInterface.getNetworkInterfaces(java.base@17-ea/NetworkInterface.java:351)
        at sun.security.provider.SeedGenerator.addNetworkAdapterInfo(java.base@17-ea/SeedGenerator.java:229)
        at sun.security.provider.SeedGenerator$1.run(java.base@17-ea/SeedGenerator.java:179)
        at sun.security.provider.SeedGenerator$1.run(java.base@17-ea/SeedGenerator.java:167)
        at java.security.AccessController.executePrivileged(java.base@17-ea/AccessController.java:753)
        at java.security.AccessController.doPrivileged(java.base@17-ea/AccessController.java:312)
        at sun.security.provider.SeedGenerator.getSystemEntropy(java.base@17-ea/SeedGenerator.java:167)
        at sun.security.provider.AbstractDrbg$SeederHolder.<clinit>(java.base@17-ea/AbstractDrbg.java:551)
        at sun.security.provider.AbstractDrbg.getEntropyInput(java.base@17-ea/AbstractDrbg.java:505)
        at sun.security.provider.AbstractDrbg.getEntropyInput(java.base@17-ea/AbstractDrbg.java:494)
        at sun.security.provider.AbstractDrbg.instantiateIfNecessary(java.base@17-ea/AbstractDrbg.java:696)
        - locked <0x00001000005b8230> (a sun.security.provider.HashDrbg)
        at sun.security.provider.AbstractDrbg.engineNextBytes(java.base@17-ea/AbstractDrbg.java:378)
        at sun.security.provider.AbstractDrbg.engineNextBytes(java.base@17-ea/AbstractDrbg.java:334)
        at sun.security.provider.DRBG.engineNextBytes(java.base@17-ea/DRBG.java:234)
        at java.security.SecureRandom.nextBytes(java.base@17-ea/SecureRandom.java:751)
        at java.security.SecureRandom.next(java.base@17-ea/SecureRandom.java:808)
        at java.util.Random.nextInt(java.base@17-ea/Random.java:329)
        at java.rmi.server.UID.<init>(java.rmi@17-ea/UID.java:112)
        - locked <0x000010000055d9b8> (a java.lang.Object)
        at java.rmi.server.ObjID.<clinit>(java.rmi@17-ea/ObjID.java:88)
        at sun.rmi.transport.LiveRef.<init>(java.rmi@17-ea/LiveRef.java:74)
        at javax.management.remote.rmi.RMIJRMPServerImpl.export(java.management.rmi@17-ea/RMIJRMPServerImpl.java:156)
        at javax.management.remote.rmi.RMIJRMPServerImpl.export(java.management.rmi@17-ea/RMIJRMPServerImpl.java:138)
        at javax.management.remote.rmi.RMIConnectorServer.start(java.management.rmi@17-ea/RMIConnectorServer.java:453)
        - locked <0x000010000053b478> (a javax.management.remote.rmi.RMIConnectorServer)
        at DcmdMBeanRunner.main(DcmdMBeanTestCheckJni.java:70)
        WARNING: JNI local refs: 66, exceeds capacity: 65
        at java.net.NetworkInterface.getAll(java.base@17-ea/Native Method)
        at java.net.NetworkInterface.getNetworkInterfaces(java.base@17-ea/NetworkInterface.java:351)
        at sun.security.provider.SeedGenerator.addNetworkAdapterInfo(java.base@17-ea/SeedGenerator.java:229)
        at sun.security.provider.SeedGenerator$1.run(java.base@17-ea/SeedGenerator.java:179)
        at sun.security.provider.SeedGenerator$1.run(java.base@17-ea/SeedGenerator.java:167)
        at java.security.AccessController.executePrivileged(java.base@17-ea/AccessController.java:753)
        at java.security.AccessController.doPrivileged(java.base@17-ea/AccessController.java:312)
        at sun.security.provider.SeedGenerator.getSystemEntropy(java.base@17-ea/SeedGenerator.java:167)
        at sun.security.provider.AbstractDrbg$SeederHolder.<clinit>(java.base@17-ea/AbstractDrbg.java:551)
        at sun.security.provider.AbstractDrbg.getEntropyInput(java.base@17-ea/AbstractDrbg.java:505)
        at sun.security.provider.AbstractDrbg.getEntropyInput(java.base@17-ea/AbstractDrbg.java:494)
        at sun.security.provider.AbstractDrbg.instantiateIfNecessary(java.base@17-ea/AbstractDrbg.java:696)
        - locked <0x00001000005b8230> (a sun.security.provider.HashDrbg)
        at sun.security.provider.AbstractDrbg.engineNextBytes(java.base@17-ea/AbstractDrbg.java:378)
        at sun.security.provider.AbstractDrbg.engineNextBytes(java.base@17-ea/AbstractDrbg.java:334)
        at sun.security.provider.DRBG.engineNextBytes(java.base@17-ea/DRBG.java:234)
        at java.security.SecureRandom.nextBytes(java.base@17-ea/SecureRandom.java:751)
        at java.security.SecureRandom.next(java.base@17-ea/SecureRandom.java:808)
        at java.util.Random.nextInt(java.base@17-ea/Random.java:329)
        at java.rmi.server.UID.<init>(java.rmi@17-ea/UID.java:112)
        - locked <0x000010000055d9b8> (a java.lang.Object)
        at java.rmi.server.ObjID.<clinit>(java.rmi@17-ea/ObjID.java:88)
        at sun.rmi.transport.LiveRef.<init>(java.rmi@17-ea/LiveRef.java:74)
        at javax.management.remote.rmi.RMIJRMPServerImpl.export(java.management.rmi@17-ea/RMIJRMPServerImpl.java:156)
        at javax.management.remote.rmi.RMIJRMPServerImpl.export(java.management.rmi@17-ea/RMIJRMPServerImpl.java:138)
        at javax.management.remote.rmi.RMIConnectorServer.start(java.management.rmi@17-ea/RMIConnectorServer.java:453)
        - locked <0x000010000053b478> (a javax.management.remote.rmi.RMIConnectorServer)
        at DcmdMBeanRunner.main(DcmdMBeanTestCheckJni.java:70)
        DiagnosticCommand MBean: com.sun.management:type=DiagnosticCommand
        DcmdMBeanRunner COMPLETE
        ];
         stderr: []
         exitValue = 0

        java.lang.RuntimeException: 'WARNING: JNI local refs: \\d+, exceeds capacity: \\d+' found in stdout: 'WARNING: JNI local refs: 33, exceeds capacity: 32'

        at jdk.test.lib.process.OutputAnalyzer.shouldNotMatch(OutputAnalyzer.java:381)
        at DcmdMBeanTestCheckJni.main(DcmdMBeanTestCheckJni.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:831)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: 'WARNING: JNI local refs: \\d+, exceeds capacity: \\d+' found in stdout: 'WARNING: JNI local refs: 33, exceeds capacity: 32'

        This is a new test that was included in the fix for:

            JDK-8258836 JNI local refs exceed capacity getDiagnosticCommandInfo

        So far this test has failed in two Mach5 Tier3 job sets in a row.
        In the jdk-17+7-413-tier3 sighting, the test task's JVM args are:

        -XX:+CreateCoredumpOnCrash -XX:+UseZGC

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sgehwolf Severin Gehwolf
                Reporter:
                dcubed Daniel Daugherty
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: