-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8266576: dynamicArchive/ParallelLambdaLoadTest.java crashes in tier2 testing #3910
Conversation
👋 Welcome back minqi! A progress list of the required criteria for merging this PR into |
@yminqi To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command. Applicable Labels
|
/label add hotspot-runtime |
@yminqi |
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.
Hi Yumin,
So there are three "exit" paths covered by this:
- System.exit/halt
- last thread terminates VM
- -Xshare:dump
so that seems reasonable.
But I see a pre-existing problem that is now worse with this change. In JavaThread::invoke_shutdown_hooks we have this code:
// We could get here with a pending exception, if so clear it now.
if (this->has_pending_exception()) {
this->clear_pending_exception();
}
but that appears after the call to link_and_cleanup_shared_classes, so if in fact there is a pre-existing exception we will return from link_and_cleanup_shared_classes at the first CHECK (which is now on the newly moved code).
In order to get the current crashes fixed we can address the exception issue in a follow up bug.
Thanks,
David
@yminqi 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 33 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 |
This is a disturbing statement given the breakage in the CI. Has sufficient testing I'm really starting to wonder why the original fix wasn't backed out on Wednesday. |
Hi, David Yumin |
Hi, Dan The overnight testing never finished, even part of the tests never got started. I did not back out first since the fix is quick, but did not expect the test take so long. Thanks for the reminding. |
There also is concurrent issue at dynamic dump time (offline discussion with Ioi). We could encounter memory stomp when multiple threads adding to the global list, LambdaFormInvokers::_lambdaform_lines. That potentially screws some of the list entry up with inconsistent contents. The list should not grow once the dumping in progress. I will update with a lock to protect the list. |
I created https://bugs.openjdk.java.net/browse/JDK-8266770 "Clean pending exception before running dynamic CDS dump" |
Since the original fix is backed out, closed this PR without further progress, the redo of original bug will take care of this issue. |
Hi, Please review
In dynamic dump, the lambda invoker holder classes are regenerated in DynamicArchive::dump, which is after shutdown hook executed. The returned objects from the regeneration may contain invalid contents which caused crash like in this bug. It is late to execute java code, the fix is to move the call into MetaspaceShared::link_and_cleanup_shared_classes which is before shutdown hook, before halt.
JDK-8266585 and JDK-8266594 failed in different patterns, could be the same reason.
Tests: tier1,tier2
Thanks
Yumin
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3910/head:pull/3910
$ git checkout pull/3910
Update a local copy of the PR:
$ git checkout pull/3910
$ git pull https://git.openjdk.java.net/jdk pull/3910/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3910
View PR using the GUI difftool:
$ git pr show -t 3910
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3910.diff