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

8252543: [JVMCI] Libgraal can deadlock in blocking compilation mode #35

Closed
wants to merge 1 commit into from

Conversation

@dougxc
Copy link
Member

@dougxc dougxc commented Sep 6, 2020

To prevent a deadlock in libgraal under -Xcomp or -Xbatch due to a lock being held in libgraal, a new mechanism is added by this change that allow JVMCI compiler threads to communicate their "progress" to HotSpot:

  • Each JVMCI compiler thread has a "compilation ticks" counter.
  • There is also a global JVMCI compilation ticks counter.
  • Each JVMCI VM call increments the JVMCI compiler thread-local compilation ticks counter.
  • Every 512 increments of such a counter also increments the global counter.
  • A thread waiting on a blocking JVMCI compilation will be unblocked if these counters indicate no progress after a defined period.

Progress

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

Issue

  • JDK-8252543: [JVMCI] Libgraal can deadlock in blocking compilation mode

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 6, 2020

👋 Welcome back dnsimon! 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 Sep 6, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 6, 2020

@dougxc The following label will be automatically applied to this pull request: hotspot-compiler.

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 (add|remove) "label" command.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 6, 2020

Webrevs

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Sep 11, 2020

/reviewer add vnkozlov

@openjdk
Copy link

@openjdk openjdk bot commented Sep 11, 2020

@vnkozlov Only the author (@dougxc) is allowed to issue the reviewer command.

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Sep 11, 2020

Looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Sep 12, 2020

@dougxc This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements

After integration, the commit message will be:

8252543: [JVMCI] Libgraal can deadlock in blocking compilation mode

Reviewed-by: kvn
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 35 commits pushed to the master branch:

  • b1b0f0b: 8253066: typo in Stream.mapMulti
  • 306b166: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize…
  • 5c0d985: 8253060: remove test/hotspot/jtreg/test_env.sh
  • 9525186: 8253031: git jcheck complains about invalid tags in jdk repo after fix for JDK-8252844
  • 7f27d0b: 8236142: DocTrees should provide getCharacters(EntityTree)
  • e7a1b9b: 8252981: ObjectMonitor::object() cleanup changes extracted from JDK-8247281
  • 040c8f5: 8250914: Matcher::stack_direction() is unused
  • 9687dca: 8252494: C2: TypeAryPtr::cast_to_autobox_cache does not use ptr_type
  • 8777ded: 8253008: Remove develop flags TraceLongCompiles/LongCompileThreshold
  • c7062dc: 8253026: Remove dummy call to gc alot from VM Thread
  • ... and 25 more: https://git.openjdk.java.net/jdk/compare/e20004d7c170dc9f25f23c0a5dbf3a4c67db9423...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate b1b0f0b2ccfa199b00a4e2398f4a228a9f467e98.

➡️ 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 Sep 12, 2020
@dougxc
Copy link
Member Author

@dougxc dougxc commented Sep 12, 2020

/integrate

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

@openjdk openjdk bot commented Sep 12, 2020

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

  • b1b0f0b: 8253066: typo in Stream.mapMulti
  • 306b166: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize…
  • 5c0d985: 8253060: remove test/hotspot/jtreg/test_env.sh
  • 9525186: 8253031: git jcheck complains about invalid tags in jdk repo after fix for JDK-8252844
  • 7f27d0b: 8236142: DocTrees should provide getCharacters(EntityTree)
  • e7a1b9b: 8252981: ObjectMonitor::object() cleanup changes extracted from JDK-8247281
  • 040c8f5: 8250914: Matcher::stack_direction() is unused
  • 9687dca: 8252494: C2: TypeAryPtr::cast_to_autobox_cache does not use ptr_type
  • 8777ded: 8253008: Remove develop flags TraceLongCompiles/LongCompileThreshold
  • c7062dc: 8253026: Remove dummy call to gc alot from VM Thread
  • ... and 25 more: https://git.openjdk.java.net/jdk/compare/e20004d7c170dc9f25f23c0a5dbf3a4c67db9423...master

Your commit was automatically rebased without conflicts.

Pushed as commit 998ce78.

💡 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
2 participants