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

8256746: gc/CriticalNativeArgs.java fails without -XX:-CriticalJNINatives #1349

Closed

Conversation

shipilev
Copy link
Contributor

@shipilev shipilev commented Nov 20, 2020

Found this with Zero testing, but the failure is not Zero-specific. It affects platforms that do not have CriticalJNINatives enabled. The issue is that the fallback (non-critical) native version of the code calls GetArrayLength on known NULL array.

$ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=gc/CriticalNativeArgs.java
#
# Internal Error (/home/shade/trunks/jdk/src/hotspot/share/runtime/jniHandles.inline.hpp:91), pid=1909139, tid=1909217
# assert(handle != __null) failed: JNI handle should not be null

It was exposed by JDK-8233343 that added the generic test configuration, and then by JDK-8256499 that enabled Zero+Epsilon. Before that, the test was only enabled for specific GCs and arches where CriticalJNINatives are known to work, and thus we never took that (broken) fallback in this test.

Note that CriticalJNINatives is a deprecated flag, and I expect the test to go away together with the flag later. Meanwhile, let's make sure it runs properly. I also reformatted the run configs a bit to make them more readable, and added -XX:-CriticalJNINatives to expose the affected path in most configurations.

Additional testing:

  • Affected test with Zero (+Epsilon, +Shenandoah)
  • Affected test with Server (+Epsilon, +Shenandoah)

Progress

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

Testing

Linux aarch64 Linux arm Linux ppc64le Linux s390x Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (6/6 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8256746: gc/CriticalNativeArgs.java fails without -XX:-CriticalJNINatives

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 20, 2020

👋 Welcome back shade! 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 label Nov 20, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 20, 2020

@shipilev The following label will be automatically applied to this pull request:

  • hotspot-gc

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 hotspot-gc label Nov 20, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 20, 2020

Webrevs

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Nov 20, 2020

/label hotspot-runtime

@openjdk openjdk bot added the hotspot-runtime label Nov 20, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 20, 2020

@shipilev
The hotspot-runtime label was successfully added.

Copy link

@kimbarrett kimbarrett left a comment

Looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 23, 2020

@shipilev 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:

8256746: gc/CriticalNativeArgs.java fails without -XX:-CriticalJNINatives

Reviewed-by: kbarrett, coleenp, rkennke

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 46 new commits pushed to 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 label Nov 23, 2020
Copy link
Contributor

@coleenp coleenp left a comment

Looks good! thank you for fixing it.

Copy link
Contributor

@rkennke rkennke left a comment

Looks good to me! Thanks!

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Nov 23, 2020

Thanks!

/integrate

@openjdk openjdk bot closed this Nov 23, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 23, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 23, 2020

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

Your commit was automatically rebased without conflicts.

Pushed as commit d9ae0db.

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

openjdk-notifier bot referenced this issue Nov 23, 2020
@shipilev shipilev deleted the JDK-8256746-critical-native-args branch Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-runtime integrated
4 participants