-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8309663: test fails "assert(check_alignment(result)) failed: address not aligned: 0x00000008baadbabe" #14460
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
Conversation
/label add gc |
👋 Welcome back amenkov! A progress list of the required criteria for merging this PR into |
/label add hotspot-gc |
@alexmenkov
|
@alexmenkov |
/label add serviceability |
@alexmenkov |
added serviceability as it was not added automatically |
jvf->cb()->as_nmethod()->oops_do(_blk); | ||
// Need to apply load barriers for unmounted vthreads. | ||
nmethod* nm = jvf->cb()->as_nmethod(); | ||
nm->run_nmethod_entry_barrier(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good in general.
However, I'm looking at the stackChunkOopDesc::do_barriers0()
implementation and wonder if a similar trick is needed for interpreter frames (to support Class Redefinition
):
template <stackChunkOopDesc::BarrierType barrier, ChunkFrames frame_kind, typename RegisterMapT>
void stackChunkOopDesc::do_barriers0(const StackChunkFrameStream<frame_kind>& f, const RegisterMapT* map) {
// We need to invoke the write barriers so as not to miss oops in old chunks that haven't yet been concurrently scanned
assert (!f.is_done(), "");
if (f.is_interpreted()) {
Method* m = f.to_frame().interpreter_frame_method();
// Class redefinition support
m->record_gc_epoch();
} else if (f.is_compiled()) {
nmethod* nm = f.cb()->as_nmethod();
// The entry barrier takes care of having the right synchronization
// when keeping the nmethod alive during concurrent execution.
nm->run_nmethod_entry_barrier();
// There is no need to mark the Method, as class redefinition will walk the
// CodeCache, noting their Methods
}
. . .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good in general. However, I'm looking at the
stackChunkOopDesc::do_barriers0()
implementation and wonder if a similar trick is needed for interpreter frames (to supportClass Redefinition
):
This code collects references from thread stack, I don't see how class redefinition can affect them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I agree with it.
The stackChunkOopDesc implementation needs it as it does some stack chunk updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Thanks,
Serguei
@alexmenkov 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:
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 598 new commits pushed to the
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 |
Ping. need one more reviewer |
Ping. Need one more reviewer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. It isn't obvious that we need to follow nmethod oops that are not reachable through the current JVM state, but if we do, that's a good fix.
/integrate |
Going to push as commit 83edffa.
Your commit was automatically rebased without conflicts. |
@alexmenkov Pushed as commit 83edffa. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
If virtual thread has frames in stackChunks, need to apply load barriers before processing nmethods (javaVFrame::locals() and javaVFrame::expressions() do it internally)
Testing: tier1-tier5;
400 runs of VThreadStackRefTest.java test on linux-x64 and linux-x64-debug with "-XX:+UseZGC -Xcomp -XX:-TieredCompilation"
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14460/head:pull/14460
$ git checkout pull/14460
Update a local copy of the PR:
$ git checkout pull/14460
$ git pull https://git.openjdk.org/jdk.git pull/14460/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14460
View PR using the GUI difftool:
$ git pr show -t 14460
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14460.diff
Webrev
Link to Webrev Comment