[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8260378: [TESTBUG] DcmdMBeanTestCheckJni.java reports false positive
From:       Severin Gehwolf <sgehwolf () openjdk ! java ! net>
Date:       2021-01-26 15:17:39
Message-ID: XKrpzpLY-WFgGZxHByb1G5dfFVjn88OMxJoSVGfUk-Y=.3d0bed91-59ec-49dc-9fea-0363894978ab () github ! com
[Download RAW message or body]

On Tue, 26 Jan 2021 15:11:12 GMT, Daniel D. Daugherty <dcubed@openjdk.org> wrote:

> > I propose to add additional context to the string which must not match after \
> > [JDK-8258836](https://bugs.openjdk.java.net/browse/JDK-8258836). This then passes \
> > the test for a fixed JDK (including JDKs with JDK-8187450 *not* fixed). 
> > Testing:
> > - [x] Reverted the fix from product code of JDK-8258836, ran the test. Failed as \
> >                 expected.
> > - [x] Ran the updated test on current head. Passed.
> > - [x] Ran the updated test with [1] included. Passed even though the processes' \
> > stdout contained [2]. 
> > [1] Explicitly add a call to NetworkInterface.getNetworkInterfaces()
> > diff --git a/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java \
> > b/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java \
> >                 index 73e53da63f1..4f32af3f463 100644
> > --- a/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java
> >                 
> > +++ b/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java
> >  @@ -62,6 +62,7 @@ class DcmdMBeanRunner {
> > "com.sun.management:type=DiagnosticCommand";
> > 
> > public static void main(String[] args) throws Exception {
> > +        java.net.NetworkInterface.getNetworkInterfaces();
> > MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
> > JMXServiceURL url = new JMXServiceURL("rmi", null, 0);
> > JMXConnectorServer cs = null;
> > [2]
> > --- ProcessLog ---
> > cmd: /disk/openjdk/upstream-sources/git/jdk-jdk/./build/linux-x86_64-server-release/images/jdk/bin/java \
> > -cp /disk/openjdk/upstream-sources/git/jdk-jdk/JTwork/classes/com/sun/management/D \
> > iagnosticCommandMBean/DcmdMBeanTestCheckJni.d:/disk/openjdk/upstream-sources/git/j \
> > dk-jdk/test/jdk/com/sun/management/DiagnosticCommandMBean:/disk/openjdk/upstream-s \
> > ources/git/jdk-jdk/JTwork/classes/test/lib:/disk/openjdk/upstream-sources/git/jdk- \
> > jdk/test/lib:/disk/openjdk/upstream-sources/jtreg-5.1-b01/lib/javatest.jar:/disk/openjdk/upstream-sources/jtreg-5.1-b01/lib/jtreg.jar \
> >                 -Xcheck:jni DcmdMBeanRunner
> > exitvalue: 0
> > stderr:
> > stdout: 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 DcmdMBeanRunner.main(DcmdMBeanTestCheckJni.java:65)
> > DiagnosticCommand MBean: com.sun.management:type=DiagnosticCommand
> > DcmdMBeanRunner COMPLETE
> 
> Thanks for including your analysis. That helped my review.
> 
> Thumbs up! This is a trivial fix and doesn't need to wait for 24 hours.

Thanks for the review!

-------------

PR: https://git.openjdk.java.net/jdk/pull/2234


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic