Skip to content

8327501: Common ForkJoinPool prevents class unloading in some cases #338

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

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Mar 7, 2024

The change is stabilizing in mainline, but it looks simple, so we start testing it for JDK 21 pickup here.

Additional testing:

  • Linux x86_64 server fastdebug, all
  • Linux AArch64 server fastdebug, all

Progress

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

Issues

  • JDK-8327501: Common ForkJoinPool prevents class unloading in some cases (Bug - P4 - Approved)
  • JDK-8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501 (Bug - P3 - Approved)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 338

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 7, 2024

👋 Welcome back shade! 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 53c4714aab2e072ba18631875dcaa3b2d5d22243 8327501: Common ForkJoinPool prevents class unloading in some cases Mar 7, 2024
@openjdk
Copy link

openjdk bot commented Mar 7, 2024

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

@shipilev shipilev marked this pull request as ready for review March 7, 2024 10:15
@openjdk
Copy link

openjdk bot commented Mar 7, 2024

⚠️ @shipilev 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 Mar 7, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 7, 2024

Webrevs

@jerboaa
Copy link
Contributor

jerboaa commented Mar 12, 2024

Lets wait on getting this one backported until the compatibility impact wrt. setting the context class loader of a thread in the common pool is addressed.

@shipilev shipilev marked this pull request as draft March 12, 2024 09:41
@shipilev
Copy link
Member Author

Lets wait on getting this one backported until the compatibility impact wrt. setting the context class loader of a thread in the common pool is addressed.

Yup. With this PR, I just confirmed all tests that I throw at this change pass in jdk21u-dev.

@openjdk openjdk bot removed the rfr Pull request is ready for review label Mar 12, 2024
@openjdk
Copy link

openjdk bot commented Mar 13, 2024

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

8327501: Common ForkJoinPool prevents class unloading in some cases
8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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.

@shipilev shipilev force-pushed the JDK-8327501-fjp-classloader-leak branch from f17aeca to 6718471 Compare April 8, 2024 07:06
@shipilev
Copy link
Member Author

shipilev commented Apr 8, 2024

/issue add JDK-8328366

@openjdk openjdk bot removed the clean label Apr 8, 2024
@openjdk
Copy link

openjdk bot commented Apr 8, 2024

@shipilev
Adding additional issue to issue list: 8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501.

@shipilev
Copy link
Member Author

shipilev commented Apr 8, 2024

Both backports are clean.

/clean

@openjdk openjdk bot added the clean label Apr 8, 2024
@openjdk
Copy link

openjdk bot commented Apr 8, 2024

@shipilev This backport pull request is now marked as clean

@shipilev shipilev force-pushed the JDK-8327501-fjp-classloader-leak branch from 0c1d5d9 to febeb48 Compare May 30, 2024 09:38
@shipilev shipilev marked this pull request as ready for review May 30, 2024 14:16
@openjdk openjdk bot added the rfr Pull request is ready for review label May 30, 2024
@shipilev
Copy link
Member Author

/approval 8327501 request Fixes the class unloading regression since JDK 19. Applies cleanly. Tests pass, but there is a regression, which is fixed by JDK-8328366. Risk is medium: affects common paths, has bugtail with easily detectable failures.

/approval 8328366 request Fixes the regression introduced by JDK-8327501. Applies cleanly. Tests pass.

@openjdk
Copy link

openjdk bot commented May 31, 2024

@shipilev
8327501: The approval request has been created successfully.

@openjdk
Copy link

openjdk bot commented May 31, 2024

@shipilev
8328366: The approval request has been created successfully.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels May 31, 2024
@shipilev
Copy link
Member Author

shipilev commented Jun 4, 2024

Lets wait on getting this one backported until the compatibility impact wrt. setting the context class loader of a thread in the common pool is addressed.

Checking, @jerboaa, are you good with this going into jdk21u-dev?

@jerboaa
Copy link
Contributor

jerboaa commented Jun 4, 2024

@shipilev Yes, though, a bit uneasy. It fixes the unloading issue. We'll have a close look once EA builds are available. Worst case we'll have to back it out during stabilization closer to the 21.0.5 release.

@shipilev
Copy link
Member Author

All right, I am waiting a bit more to see if JDK 23 and 22.0.2 testing finds any issues with it. I plan to integrate this later in July if no issues are found.

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 24, 2024

@shipilev This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@shipilev
Copy link
Member Author

Not now, bot, everything goes according to plan.

@shipilev shipilev force-pushed the JDK-8327501-fjp-classloader-leak branch from febeb48 to a5c81e3 Compare August 1, 2024 08:57
@openjdk
Copy link

openjdk bot commented Aug 1, 2024

@shipilev Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@shipilev
Copy link
Member Author

shipilev commented Aug 1, 2024

Re-based, re-tested, ready to integrate. Checking with @jerboaa -- go or no-go?

@jerboaa
Copy link
Contributor

jerboaa commented Aug 12, 2024

Re-based, re-tested, ready to integrate. Checking with @jerboaa -- go or no-go?

@shipilev Please go ahead and integrate it.

@shipilev
Copy link
Member Author

Aye.

/integrate

@openjdk
Copy link

openjdk bot commented Aug 12, 2024

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

  • 27b1e1a: 8330146: assert(!_thread->is_in_any_VTMS_transition()) failed
  • 27abeb8: 8328642: Convert applet test MouseDraggedOutCauseScrollingTest.html to main
  • e4d27d0: 8334618: ubsan: support setting additional ubsan check options
  • 953846d: 8333639: ubsan: cppVtables.cpp:81:55: runtime error: index 14 out of bounds for type 'long int [1]'
  • fd4ce63: 8322971: KEM.getInstance() should check if a 3rd-party security provider is signed
  • d578221: 8335237: ubsan: vtableStubs.hpp is_vtable_stub exclude from ubsan checks
  • dac39de: 8333622: ubsan: relocInfo_x86.cpp:101:56: runtime error: pointer index expression with base (-1) overflowed
  • 4989165: 8321509: False positive in get_trampoline fast path causes crash
  • b79e185: 8331731: ubsan: relocInfo.cpp:155:30: runtime error: applying non-zero offset to null pointer
  • ee21571: 8335493: check_gc_overhead_limit should reset SoftRefPolicy::_should_clear_all_soft_refs
  • ... and 8 more: https://git.openjdk.org/jdk21u-dev/compare/c2daaa63aba87c801db76478802a87a3bbb326db...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 12, 2024

@shipilev Pushed as commit eb103b0.

💡 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 clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants