8274944: AppCDS dump causes SEGV in VM thread while adjusting lambda proxy class info#6070
Conversation
|
/label add hotspot-runtime |
|
👋 Welcome back ccheung! A progress list of the required criteria for merging this PR into |
|
@calvinccheung |
Webrevs
|
|
|
||
| class CleanupDumpTimeLambdaProxyClassTable: StackObj { | ||
| public: | ||
| CleanupDumpTimeLambdaProxyClassTable() {} |
There was a problem hiding this comment.
Why need a explicit public constructor for nothing?
There was a problem hiding this comment.
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. ℹ️ 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 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. ➡️ To integrate this PR with the above commit message to the |
| void VM_PopulateDumpSharedSpace::doit() { | ||
| HeapShared::run_full_gc_in_vm_thread(); | ||
|
|
||
| SystemDictionaryShared::start_dumping(); |
There was a problem hiding this comment.
What is the significance of this? It seems unrelated to the bug being fixed.
There was a problem hiding this comment.
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.
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.
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
dholmes-ora
left a comment
There was a problem hiding this comment.
Seems fine.
Thanks,
David
|
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. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
During dumping of CDS archive, the
ArchiveBuilder::gather_klass_and_symbolset 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_dictionaryis called afterArchiveBuilder::gather_klass_and_symboland thus encountered the null pointer.A fix is to add a function
SystemDictionaryShared::cleanup_lambda_proxy_class_dictionaryto cleanup the_dumptime_lambda_proxy_class_dictionaryat the beginning of the CDS dumping operation.The proposed fix passed tiers 1 - 4 testing (including the new tests).
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6070/head:pull/6070$ git checkout pull/6070Update a local copy of the PR:
$ git checkout pull/6070$ git pull https://git.openjdk.java.net/jdk pull/6070/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6070View PR using the GUI difftool:
$ git pr show -t 6070Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6070.diff