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

8200102: NativeLibraryTest.java fails intermittently, unloaded count is not same as expected #1630

Closed
wants to merge 5 commits into from

Conversation

bchristi-git
Copy link
Member

@bchristi-git bchristi-git commented Dec 4, 2020

Please review this fix for the intermittently-failing java/lang/ClassLoader/nativeLibrary/NativeLibraryTest.java.

The change replaces System.gc()+sleep() with the more robust gcAwait() mechanic used elsewhere in the test base, as pointed out by Martin(thanks!).

The new version of the test passes 100 times out of 100 on the test farm.


Progress

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

Issue

  • JDK-8200102: NativeLibraryTest.java fails intermittently, unloaded count is not same as expected

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 4, 2020

👋 Welcome back bchristi! 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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 4, 2020
@openjdk
Copy link

openjdk bot commented Dec 4, 2020

@bchristi-git The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Dec 4, 2020
@mlbridge
Copy link

mlbridge bot commented Dec 4, 2020

Webrevs

@mlchung
Copy link
Member

mlchung commented Dec 4, 2020

Alternatively, you can simply use test/libjdk/test/lib/util/ForceGC in the testlibrary.

@bchristi-git
Copy link
Member Author

Yes, I think that's a better plan, Mandy. Thanks. I'll update the fix.

@openjdk
Copy link

openjdk bot commented Dec 7, 2020

@bchristi-git 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:

8200102: NativeLibraryTest.java fails intermittently, unloaded count is not same as expected

Reviewed-by: mchung, naoto

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 2 new commits pushed to the master branch:

  • cef606f: 8253762: JFR: getField(String) should be able to access subfields
  • 39b8a2e: 8257670: sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java reports leaks

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 Dec 7, 2020
Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

Looks good to me (with trivial nits).

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Missin 2017?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you're right

throw new RuntimeException("Expected unloaded=" + count +
" but got=" + unloadedCount);
" but got=" + unloadedCount);
Copy link
Member

Choose a reason for hiding this comment

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

Could be left unchanged.

Copy link
Member Author

Choose a reason for hiding this comment

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

True

Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

Looks good!

@bchristi-git
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Dec 8, 2020
@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 Dec 8, 2020
@openjdk
Copy link

openjdk bot commented Dec 8, 2020

@bchristi-git Since your change was applied there have been 16 commits pushed to the master branch:

  • 264feb3: 8257905: Make fixpath.sh more liberal in accepting paths embedded in arguments
  • 044616b: 8252049: Native memory leak in ciMethodData ctor
  • fab6158: 8236413: AbstractConnectTimeout should tolerate both NoRouteToHostException and UnresolvedAddressException
  • 936a7ac: 8252797: Non-PCH build fails on Ubuntu 16.4 when building with gtests
  • d0c5265: 8256149: Weird AST structure for incomplete member select
  • a708024: 8257194: Add 'foreign linker API' in 'jdk.incubator.foreign' module desc/summary
  • 35e8153: 8257848: -XX:CompileCommand=blackhole,* should be diagnostic
  • d2b6619: 8242258: (jrtfs) Path::toUri throws AssertionError for malformed input
  • 52ab721: 8254733: HotSpot Style Guide should permit using range-based for loops
  • 1d0adbb: 8253644: C2: assert(skeleton_predicate_has_opaque(iff)) failed: unexpected
  • ... and 6 more: https://git.openjdk.java.net/jdk/compare/c43c224ef9ce91a711ca3ddec6df6479e94309d9...master

Your commit was automatically rebased without conflicts.

Pushed as commit 1a9ed92.

💡 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
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
3 participants