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
8274944: AppCDS dump causes SEGV in VM thread while adjusting lambda proxy class info #6070
8274944: AppCDS dump causes SEGV in VM thread while adjusting lambda proxy class info #6070
Conversation
/label add hotspot-runtime |
|
@calvinccheung |
Webrevs
|
@@ -1598,6 +1598,30 @@ void SystemDictionaryShared::restore_dumptime_tables() { | |||
_cloned_dumptime_lambda_proxy_class_dictionary = NULL; | |||
} | |||
|
|||
class CleanupDumpTimeLambdaProxyClassTable: StackObj { | |||
public: | |||
CleanupDumpTimeLambdaProxyClassTable() {} |
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.
Why need a explicit public constructor for nothing?
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 for your review.
In a previous version of the fix, the _dumptime_lambda_proxy_class_dictionary
was passed to the constructor but it is no longer needed. I've removed the constructor.
@calvinccheung 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 161 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.
|
@@ -512,6 +512,8 @@ char* VM_PopulateDumpSharedSpace::dump_read_only_tables() { | |||
void VM_PopulateDumpSharedSpace::doit() { | |||
HeapShared::run_full_gc_in_vm_thread(); | |||
|
|||
SystemDictionaryShared::start_dumping(); |
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 significance of this? It seems unrelated to the bug being fixed.
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.
It is for setting the _dump_in_progress
flag to true so that no new entries will be added to the _dumptime_table
.
The SystemDictionaryShared::start_dumping()
is being called for the dynamic dumping case, it would be consistent
if it is also called for the static dumping case.
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.
Perhaps but again that seems a different issue unrelated to this bug. Nor is it immediately obvious that the dynamic dumping and static dumping are equivalent in this regard. If the flag was only added for the dynamic case then apparently the static case does not need it - no?
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've reverted the change of calling SystemDictionaryShared::start_dumping()
for the static dump case.
If the call is needed, it will be addressed via a separate bug.
…in metaspaceShared.cpp
Thanks David and Yumin for the review. |
Going to push as commit e5cd269.
Your commit was automatically rebased without conflicts. |
@calvinccheung Pushed as commit e5cd269. |
During dumping of CDS archive, the
ArchiveBuilder::gather_klass_and_symbol
set the address of an object to null if theobject cannot be archived. Since the lambda proxy class in this scenario contains an old version (major version < 50) of
interface which has been linked, the class won't be archived and its address will be set to null. The
SystemDictionaryShared::adjust_lambda_proxy_class_dictionary
is called afterArchiveBuilder::gather_klass_and_symbol
and thus encountered the null pointer.A fix is to add a function
SystemDictionaryShared::cleanup_lambda_proxy_class_dictionary
to cleanup the_dumptime_lambda_proxy_class_dictionary
at the beginning of the CDS dumping operation.The proposed fix passed tiers 1 - 4 testing (including the new tests).
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6070/head:pull/6070
$ git checkout pull/6070
Update a local copy of the PR:
$ git checkout pull/6070
$ git pull https://git.openjdk.java.net/jdk pull/6070/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6070
View PR using the GUI difftool:
$ git pr show -t 6070
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6070.diff