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

8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N" #2356

Closed
wants to merge 1 commit into from

Conversation

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Feb 2, 2021

On return WB wait to acquire Compile_lock before checking compilation status
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/prims/whitebox.cpp#L988

This lock is used by ciEnv for compiled code publishing:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/ci/ciEnv.cpp#L981

So while WB waits the lock compiler thread can finish compilation, register nmethod and clear method's queued_for_compilation bit.

The problem is that WB check nm value (compiled code) which it got before the lock and when method compilation is not finished.

The fix is to check compiled code again similar to check in CompileBroker:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compileBroker.cpp#L1501

Passed hs-tier1-4 testing and 100 x vmTestbase/gc/g1/unloading/tests/unloading_compilation_*.


Progress

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

Issue

  • JDK-8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N"

Reviewers

Download

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

…hod could not be enqueued for compilation at level N"
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 2, 2021

👋 Welcome back kvn! 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 Feb 2, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 2, 2021

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

  • hotspot

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 label Feb 2, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 2, 2021

Webrevs

@vnkozlov
Copy link
Contributor Author

@vnkozlov vnkozlov commented Feb 2, 2021

/label add hotspot-compiler

@openjdk
Copy link

@openjdk openjdk bot commented Feb 2, 2021

@vnkozlov
The hotspot-compiler label was successfully added.

Copy link
Member

@dean-long dean-long left a comment

Looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Feb 3, 2021

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

8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N"

Reviewed-by: dlong, iignatyev

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

  • 4a8b5c1: 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m
  • 472bf62: 8258799: [Testbug] RandomCommandsTest must check if tested directive is added via jcmd
  • b0ee7a8: 8241995: Clarify InetSocketAddress::toString specification
  • 0ef93fe: 8259265: Refactor UncaughtExceptions shell test as java test.
  • 5324b5c: 8260998: Shenandoah: Restore reference processing statistics reporting
  • c8de943: 8260617: Merge ZipFile encoding check with the initial hash calculation
  • ae2c5f0: 8260581: IGV: enhance node search
  • 9037615: 8222850: jshell tool: Misleading cascade compiler error in switch expression with undefined vars
  • 91e6c75: 8260928: InitArrayShortSize constraint func should print a helpful error message
  • cb127a4: 8198343: Test java/awt/print/PrinterJob/TestPgfmtSetMPA.java may fail w/o printer
  • ... and 20 more: https://git.openjdk.java.net/jdk/compare/474dba2d8b93b5969a11635820b07c0ceff1836a...master

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 Feb 3, 2021
@vnkozlov
Copy link
Contributor Author

@vnkozlov vnkozlov commented Feb 3, 2021

Thank you, Dean

Copy link
Member

@iignatev iignatev left a comment

LGTM

@vnkozlov
Copy link
Contributor Author

@vnkozlov vnkozlov commented Feb 3, 2021

Thank you, Igor

@vnkozlov
Copy link
Contributor Author

@vnkozlov vnkozlov commented Feb 3, 2021

/integrate

@openjdk openjdk bot closed this Feb 3, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 3, 2021

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

  • 4a8b5c1: 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m
  • 472bf62: 8258799: [Testbug] RandomCommandsTest must check if tested directive is added via jcmd
  • b0ee7a8: 8241995: Clarify InetSocketAddress::toString specification
  • 0ef93fe: 8259265: Refactor UncaughtExceptions shell test as java test.
  • 5324b5c: 8260998: Shenandoah: Restore reference processing statistics reporting
  • c8de943: 8260617: Merge ZipFile encoding check with the initial hash calculation
  • ae2c5f0: 8260581: IGV: enhance node search
  • 9037615: 8222850: jshell tool: Misleading cascade compiler error in switch expression with undefined vars
  • 91e6c75: 8260928: InitArrayShortSize constraint func should print a helpful error message
  • cb127a4: 8198343: Test java/awt/print/PrinterJob/TestPgfmtSetMPA.java may fail w/o printer
  • ... and 20 more: https://git.openjdk.java.net/jdk/compare/474dba2d8b93b5969a11635820b07c0ceff1836a...master

Your commit was automatically rebased without conflicts.

Pushed as commit f025bc1.

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

@vnkozlov vnkozlov deleted the vnkozlov:JDK-8260301 branch Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants