Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8260378: [TESTBUG] DcmdMBeanTestCheckJni.java reports false positive #2234

Closed

Conversation

jerboaa
Copy link
Contributor

@jerboaa jerboaa commented Jan 26, 2021

I propose to add additional context to the string which must not match after JDK-8258836. This then passes the test for a fixed JDK (including JDKs with JDK-8187450 not fixed).

Testing:

  • Reverted the fix from product code of JDK-8258836, ran the test. Failed as expected.
  • Ran the updated test on current head. Passed.
  • 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/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.d:/disk/openjdk/upstream-sources/git/jdk-jdk/test/jdk/com/sun/management/DiagnosticCommandMBean:/disk/openjdk/upstream-sources/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

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8260378: [TESTBUG] DcmdMBeanTestCheckJni.java reports false positive

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2234/head:pull/2234
$ git checkout pull/2234

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 26, 2021

👋 Welcome back sgehwolf! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@jerboaa
Copy link
Contributor Author

jerboaa commented Jan 26, 2021

/label add serviceability

@openjdk openjdk bot added rfr Pull request is ready for review serviceability serviceability-dev@openjdk.org labels Jan 26, 2021
@openjdk
Copy link

openjdk bot commented Jan 26, 2021

@jerboaa
The serviceability label was successfully added.

@jerboaa
Copy link
Contributor Author

jerboaa commented Jan 26, 2021

@dcubed-ojdk Please review! Thanks.

@mlbridge
Copy link

mlbridge bot commented Jan 26, 2021

Webrevs

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@openjdk
Copy link

openjdk bot commented Jan 26, 2021

@jerboaa This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8260378: [TESTBUG] DcmdMBeanTestCheckJni.java reports false positive

Reviewed-by: dcubed

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 5 new commits pushed to the master branch:

  • 8d2f77f: 8260406: Do not copy pure java source code to gensrc
  • 5e8e0ad: 8242456: PreviewFeature.Feature enum removal of TEXT_BLOCKS
  • e080ce9: 8252545: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java timed out
  • edd2707: 8260408: Shenandoah: adjust inline hints after JDK-8255019
  • 81a66df: 8259809: Remove PerfEvent class loading locking counters

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 26, 2021
@jerboaa
Copy link
Contributor Author

jerboaa commented Jan 26, 2021

Thanks for the review!

@jerboaa
Copy link
Contributor Author

jerboaa commented Jan 26, 2021

/integrate

@openjdk openjdk bot closed this Jan 26, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 26, 2021
@openjdk
Copy link

openjdk bot commented Jan 26, 2021

@jerboaa Since your change was applied there have been 5 commits pushed to the master branch:

  • 8d2f77f: 8260406: Do not copy pure java source code to gensrc
  • 5e8e0ad: 8242456: PreviewFeature.Feature enum removal of TEXT_BLOCKS
  • e080ce9: 8252545: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java timed out
  • edd2707: 8260408: Shenandoah: adjust inline hints after JDK-8255019
  • 81a66df: 8259809: Remove PerfEvent class loading locking counters

Your commit was automatically rebased without conflicts.

Pushed as commit af8a08f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
2 participants