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
8277213: CompileTask_lock is acquired out of order with MethodCompileQueue_lock #6449
Conversation
|
@TobiHartmann The following label will be automatically applied to this pull request:
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. |
@TobiHartmann This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
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 8 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
|
Thanks for the review, Rickard! |
Thanks for the review, Coleen! |
/integrate |
Going to push as commit f34f119.
Your commit was automatically rebased without conflicts. |
@TobiHartmann Pushed as commit f34f119. |
In the rare case that the compiler threads fail during initialization or the code cache is full and flushing is disabled, we completely disable JIT compilation and shutdown the compiler runtime:
jdk/src/hotspot/share/compiler/compileBroker.cpp
Lines 1813 to 1817 in 2f4b540
In the process, we free all compiler queues and notify potentially waiting compiler threads via the
CompileTask::lock()
:jdk/src/hotspot/share/compiler/compileBroker.cpp
Lines 397 to 408 in 2f4b540
The problem is that since JDK-8273917 (see commit), the rank of
CompileTask_lock
isMutex::safepoint
which is equal to the rank ofMethodCompileQueue_lock
which we are already holding because we modify the compile queue.I propose to fix this by modifying the rank of the
CompileTask_lock
similar to what is done for other locks:jdk/src/hotspot/share/oops/methodData.cpp
Lines 1211 to 1212 in 2f4b540
The test that triggered this will be added with PR 6364. I verified that it now passes.
Thanks,
Tobias
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6449/head:pull/6449
$ git checkout pull/6449
Update a local copy of the PR:
$ git checkout pull/6449
$ git pull https://git.openjdk.java.net/jdk pull/6449/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6449
View PR using the GUI difftool:
$ git pr show -t 6449
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6449.diff