Skip to content
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

8317809: Insertion of free code blobs into code cache can be very slow during class unloading #505

Closed
wants to merge 5 commits into from

Conversation

GoeLin
Copy link
Member

@GoeLin GoeLin commented Apr 16, 2024

Big change, but only two resolves needed:

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
The context differs because "8309538: G1: Move total collection increment from Cleanup to Remark"
is only in 22

src/hotspot/share/gc/serial/genMarkSweep.cpp
Resolved adding an #include.

SAP nightly testing passed.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8317809 needs maintainer approval

Issue

  • JDK-8317809: Insertion of free code blobs into code cache can be very slow during class unloading (Enhancement - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/505/head:pull/505
$ git checkout pull/505

Update a local copy of the PR:
$ git checkout pull/505
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/505/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 505

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/505.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 16, 2024

👋 Welcome back goetz! 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
Copy link

openjdk bot commented Apr 16, 2024

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

8317809: Insertion of free code blobs into code cache can be very slow during class unloading

Reviewed-by: phh, adinn

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

  • a4d8d06: 8328744: Parallel: Parallel GC throws OOM before heap is fully expanded
  • 87d5da4: 8328822: C2: "negative trip count?" assert failure in profile predicate code
  • 3892078: 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks
  • 3ab3f52: 8326974: ODR violation in macroAssembler_aarch64.cpp
  • 5d5c678: 8319713: Parallel: Remove PSAdaptiveSizePolicy::should_full_GC
  • 56a9090: 8312014: [s390x] TestSigInfoInHsErrFile.java Failure
  • c922c50: 8322962: Upcall stub might go undetected when freezing frames
  • cbd30c9: 8325095: C2: bailout message broken: ResourceArea allocated string used after free
  • 75ac9e8: 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
  • a0e8de8: 8330156: RISC-V: Range check auipc + signed 12 imm instruction
  • ... and 18 more: https://git.openjdk.org/jdk21u-dev/compare/a36d3deaec6e643a87997442002ebd35b6cdd97b...master

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 changed the title Backport 30817b742300f10f566e6aee3a8c1f8af4ab3083 8317809: Insertion of free code blobs into code cache can be very slow during class unloading Apr 16, 2024
@openjdk
Copy link

openjdk bot commented Apr 16, 2024

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

@GoeLin
Copy link
Member Author

GoeLin commented Apr 18, 2024

GHA failure: x86 (32-bit) test failure in gc/g1/humongousObjects/TestHumongousClassLoader.java

2024-04-16T11:19:19.7475339Z Loading class TwoRegionHumongousClass
2024-04-16T11:19:19.7475888Z #
2024-04-16T11:19:19.7476442Z # A fatal error has been detected by the Java Runtime Environment:
2024-04-16T11:19:19.7477171Z #
2024-04-16T11:19:19.7477620Z # SIGSEGV (0xb) at pc=0xe94303d7, pid=17327, tid=17350
2024-04-16T11:19:19.7478227Z #
2024-04-16T11:19:19.7479030Z # JRE version: OpenJDK Runtime Environment (21.0.4) (fastdebug build 21.0.4-internal-GoeLin-8a29893d2c8ecee5209cbddc90317fe74ca810fd)
2024-04-16T11:19:19.7480380Z # Java VM: OpenJDK Server VM (fastdebug 21.0.4-internal-GoeLin-8a29893d2c8ecee5209cbddc90317fe74ca810fd, mixed mode, sharing, tiered, g1 gc, linux-x86)
2024-04-16T11:19:19.7481197Z # Problematic frame:
2024-04-16T11:19:19.7493177Z # V [libjvm.so+0x2303d7] oopDesc::size_given_klass(Klass*)+0x17
2024-04-16T11:19:19.7493635Z #
2024-04-16T11:19:19.7493927Z # CreateCoredumpOnCrash turned off, no core file dumped
2024-04-16T11:19:19.7494317Z #
2024-04-16T11:19:19.7494585Z Unsupported internal testing APIs have been used.
2024-04-16T11:19:19.7494877Z
2024-04-16T11:19:19.7495063Z # An error report file with more information is saved as:
2024-04-16T11:19:19.7496084Z # /home/runner/work/jdk21u-dev/jdk21u-dev/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_tier1_gc/scratch/1/hs_err_pid17327.log
2024-04-16T11:19:19.7496854Z #
2024-04-16T11:19:19.7497143Z # If you would like to submit a bug report, please visit:
2024-04-16T11:19:19.7497615Z # https://bugreport.java.com/bugreport/crash.jsp

@GoeLin GoeLin marked this pull request as ready for review April 19, 2024 11:05
@openjdk
Copy link

openjdk bot commented Apr 19, 2024

⚠️ @GoeLin This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 19, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 19, 2024

Webrevs

@GoeLin
Copy link
Member Author

GoeLin commented Apr 22, 2024

GHA failure: ok, I saw the same error again.
To fix this, I will backport JDK-8320525 as prereq.

Backported the prereqs, will merge and restart tests.

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.

TwoRegionHumongousClass failed with "Unsupported internal testing APIs have been used." Which I see has already been noted. :)

@GoeLin
Copy link
Member Author

GoeLin commented Apr 26, 2024

Backporting the prereqs helped, tests are green now.

@GoeLin
Copy link
Member Author

GoeLin commented Apr 26, 2024

@tschatzl would you mind to take a look at this change?

Especially as you had to backout (JDK-8329524/JDK-8329530) your first backport, is there a subtle adaption needed I missed?

Thanks! Goetz.

@jerboaa
Copy link
Contributor

jerboaa commented May 2, 2024

@adinn Could you please review this? Thanks!

@adinn
Copy link

adinn commented May 2, 2024

@jerboaa Looks ok to me.

@tschatzl
Copy link

tschatzl commented May 2, 2024

Especially as you had to backout (JDK-8329524/JDK-8329530) your first backport, is there a subtle adaption needed I missed?

The backport was due to wrongly resolving the hunk in g1ConcurrentMark.cpp. Afaict that issue has been resolved correctly.

@GoeLin
Copy link
Member Author

GoeLin commented May 2, 2024

Thanks for having a look, @tschatzl! Thanks for the review, @adinn. Best regards, Goetz.

@openjdk openjdk bot added the approval label May 2, 2024
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels May 2, 2024
@GoeLin
Copy link
Member Author

GoeLin commented May 3, 2024

/integrate

@openjdk
Copy link

openjdk bot commented May 3, 2024

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

  • a4d8d06: 8328744: Parallel: Parallel GC throws OOM before heap is fully expanded
  • 87d5da4: 8328822: C2: "negative trip count?" assert failure in profile predicate code
  • 3892078: 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks
  • 3ab3f52: 8326974: ODR violation in macroAssembler_aarch64.cpp
  • 5d5c678: 8319713: Parallel: Remove PSAdaptiveSizePolicy::should_full_GC
  • 56a9090: 8312014: [s390x] TestSigInfoInHsErrFile.java Failure
  • c922c50: 8322962: Upcall stub might go undetected when freezing frames
  • cbd30c9: 8325095: C2: bailout message broken: ResourceArea allocated string used after free
  • 75ac9e8: 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
  • a0e8de8: 8330156: RISC-V: Range check auipc + signed 12 imm instruction
  • ... and 18 more: https://git.openjdk.org/jdk21u-dev/compare/a36d3deaec6e643a87997442002ebd35b6cdd97b...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 3, 2024

@GoeLin Pushed as commit 3bb8eee.

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

@GoeLin GoeLin deleted the goetz_backport_8317809-keep branch May 3, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
5 participants