-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation #20083
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
|
👋 Welcome back dnsimon! A progress list of the required criteria for merging this PR into |
|
@dougxc 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 35 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 |
| #endif // ASSERT | ||
|
|
||
| if (!thread->can_call_java()) { | ||
| if (h_exception.is_null() && !thread->can_call_java()) { |
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.
There is no reason to replace an existing exception object with a dummy exception object in the case where the current thread cannot call into Java. Since the exception object already exists, no Java call is necessary.
This change is necessary to allow the libgraal exception translation mechanism to know that an OOME is being translated.
b53dfce to
27cd743
Compare
Webrevs
|
| private static void assertThrowableEquals(Throwable original, Throwable decoded) { | ||
| private static void assertThrowableEquals(Throwable originalIn, Throwable decodedIn) { | ||
| Throwable original = originalIn; | ||
| Throwable decoded = decodedIn; |
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.
What is the purpose of this renaming?
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.
So that the printing down the bottom of this message shows the complete throwable, not just the cause on which the comparison failed.
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 missed the reassign in the folded unchanged code.
| Handle garbage; | ||
| while (true) { | ||
| // Trigger an OutOfMemoryError | ||
| objArrayOop next = oopFactory::new_objectArray(0x7FFFFFFF, CHECK_NULL); |
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.
Shall we check for pending exception and break here?
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.
The CHECK_NULL macro effectively does that.
mur47x111
left a comment
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.
LGTM
tkrodriguez
left a comment
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.
dholmes-ora
left a comment
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.
Non JVMCI changes look good. Thanks
|
Thanks for the reviews. /integrate |
|
Going to push as commit cf940e1.
Your commit was automatically rebased without conflicts. |
This PR addresses intermittent failures in jtreg GC stress tests. The failures occur under these conditions:
CompilerToVM) to a routine that performs a HotSpot heap allocation that fails.An OOME thrown in these specific conditions should not exit the VM as it not related to an OOME in the app or test. Instead, the failure should be treated as a bailout and the libgraal compiler should continue.
To accomplish this, libgraal needs to be able to distinguish a GraalError caused by an OOME. This PR modifies the exception translation code to make this possible.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20083/head:pull/20083$ git checkout pull/20083Update a local copy of the PR:
$ git checkout pull/20083$ git pull https://git.openjdk.org/jdk.git pull/20083/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20083View PR using the GUI difftool:
$ git pr show -t 20083Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20083.diff
Webrev
Link to Webrev Comment