-
Notifications
You must be signed in to change notification settings - Fork 62
8294744: AArch64: applications/kitchensink/Kitchensink.java crashed: assert(oopDesc::is_oop(obj)) failed: not an oop #85
Conversation
👋 Welcome back pchilanomate! A progress list of the required criteria for merging this PR into |
Webrevs
|
@pchilano 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 4 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 ➡️ To integrate this PR with the above commit message to the |
Looks good to me.
[1] https://bugs.openjdk.org/browse/JDK-8290280 |
Sure, added. |
/contributor add @RealFYang |
@pchilano |
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.
Thumbs up. Wonderful analysis in the bug report. You may want to attach
your standalone reproducers to the bug report for future spelunkers.
Thanks for including the testing information.
__ mov(rscratch1, sp); | ||
} else { | ||
// Make sure there is room for the exception oop pushed in case method throws | ||
// an exception (see TemplateInterpreterGenerator::generate_throw_exception()) |
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.
I was going to request that you add a '.' to the end of this sentence,
but it seems that lack of punctuation is the prevalent style in this file.
Thanks Dan! |
Thanks for the reviews @theRealAph, @RealFYang and @dcubed-ojdk! |
/integrate |
Going to push as commit 151450e.
Your commit was automatically rebased without conflicts. |
Please review the following patch. The value we set initially for extended_sp on natives frames doesn't account for the oop that could be pushed to the stack in case the method throws an exception. This can create a situation in Interpreter::_throw_exception_entry where we push an exception oop to the Java expression stack below the actual physical stack pointer. When JFR is present though a JavaThread could receive a suspend signal right after that push. On Linux aarch64, because there is no red zone defined (nor implemented it seems), the pushed oop gets overwritten during the setup and execution of the signal handler. This later leads to a crash when popping the oop back and rethrowing in the caller of the native method. There are more details in the bug comments.
To fix it I used the same technique we use for normal Java frames, i.e. add extra space to extended_sp when creating the frame to account for the max space needed.
I tested the patch by running Kitchensink.java around 150 times on mach5 with no failures (without the patch 50 runs would already show ~10 failures on average). I also run tiers1-6 for sanity check.
Thanks,
Patricio
Progress
Issue
Reviewers
Contributors
<fyang@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk20 pull/85/head:pull/85
$ git checkout pull/85
Update a local copy of the PR:
$ git checkout pull/85
$ git pull https://git.openjdk.org/jdk20 pull/85/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 85
View PR using the GUI difftool:
$ git pr show -t 85
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk20/pull/85.diff