Skip to content

Conversation

@tstuefe
Copy link
Member

@tstuefe tstuefe commented Jan 25, 2022

Hi all,

not a clean backport. I had to fix up classLoaderData.cpp a bit because SystemDictionaryShared::handle_class_unloading(ik); does not yet exist in jdk17 and I did not want to bring the dependent cleanup change into jdk17 too (among other things because Oracle seems not to have done it either in their closed backport as far as I can glean from the JBS tags).

Tested in SAP nightlies for about a week now.

Thanks!


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issues

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17u-dev pull/118/head:pull/118
$ git checkout pull/118

Update a local copy of the PR:
$ git checkout pull/118
$ git pull https://git.openjdk.java.net/jdk17u-dev pull/118/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 118

View PR using the GUI difftool:
$ git pr show -t 118

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk17u-dev/pull/118.diff

@tstuefe tstuefe changed the title tstuefe backport 110e38de Backport 110e38ded8e09361f24c582c770d35f5cfdabf82 Jan 25, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 25, 2022

👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport 110e38ded8e09361f24c582c770d35f5cfdabf82 8274753: ZGC: SEGV in MetaspaceShared::link_shared_classes Jan 25, 2022
@openjdk
Copy link

openjdk bot commented Jan 25, 2022

This backport pull request has now been updated with issues from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base rfr Pull request is ready for review labels Jan 25, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 25, 2022

Webrevs

// But still have to remove it from the dumptime_table.
if (Arguments::is_dumping_archive()) {
SystemDictionaryShared::remove_dumptime_info(ik);
}
Copy link
Member

@GoeLin GoeLin Jan 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a part of handle_class_unloading(). I.e., you basically "undo" '8267189: Remove duplicated unregistered classes from dynamic archive'. That change replaced remove_dumptime_info() by handle_class_unloading() which calls remove_dumptime_info().
And you add the check for is_dumping_archive() that was
added to handle_class_unloading() in
'8265602: -XX:DumpLoadedClassList should support custom loaders'.

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin I'm backporting https://bugs.openjdk.org/browse/JDK-8267189 to 17 and found this comment. Having trouble understanding it. Is it still safe / recommended to backport JDK-8267189 with this unclean 8274753 backport? Thanks.

Copy link
Contributor

@rgithubli rgithubli Oct 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attempted to backport https://bugs.openjdk.org/browse/JDK-8267189, but the build failed due to these methods. I guess it won't be a clean backport.

Not very familiar with the code, would you be able to give suggestion on where I should update? With JDK-8267189, can we remove SystemDictionaryShared::remove_dumptime_info(ik);?

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_classLoaderData.o:
src/hotspot/share/classfile/classLoaderData.cpp: In member function 'void ClassLoaderData::free_deallocate_list_C_heap_structures()':
src/hotspot/share/classfile/classLoaderData.cpp:892:56: error: 'static void SystemDictionaryShared::remove_dumptime_info(InstanceKlass*)' is private within this context
         SystemDictionaryShared::remove_dumptime_info(ik);
                                                        ^
In file included from src/hotspot/share/classfile/classLoaderData.cpp:58:0:
src/hotspot/share/classfile/systemDictionaryShared.hpp:234:15: note: declared private here
   static void remove_dumptime_info(InstanceKlass* k) NOT_CDS_RETURN;
               ^~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-cast-function-type' [-Werror]
cc1plus: all warnings being treated as errors

* All command lines available in /workplace/ruiamzn/github/jdk17u-dev/build/linux-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===

Copy link
Contributor

@rgithubli rgithubli Oct 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked through the code, JDK-8267189 introduces handle_class_unloading.

It seems undoing this change necessary changes for jdk17 as part of backporting JDK-8267189 makes sense (?). Tested locally with simply make images, can build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested jtreg_tier1 with current draft, failed at TestUnloadClassError.java

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't comment in this old PR. Use the new one you opened.

@openjdk
Copy link

openjdk bot commented Jan 26, 2022

@tstuefe 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:

8274753: ZGC: SEGV in MetaspaceShared::link_shared_classes
8274935: dumptime_table has stale entry

Reviewed-by: goetz, phh

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 11 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 26, 2022
Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm.

@tstuefe
Copy link
Member Author

tstuefe commented Jan 27, 2022

@GoeLin, @phohensee thanks!
@GoeLin could you approve the fix request then?

@tstuefe
Copy link
Member Author

tstuefe commented Jan 27, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jan 27, 2022

Going to push as commit b23271b.
Since your change was applied there have been 11 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 27, 2022
@openjdk openjdk bot closed this Jan 27, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 27, 2022
@openjdk
Copy link

openjdk bot commented Jan 27, 2022

@tstuefe Pushed as commit b23271b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants