Skip to content

Conversation

chrisdennis
Copy link

@chrisdennis chrisdennis commented Oct 16, 2025

This is a backport of d5a207994b9c374e6638e57826326f8f4593b96b from openjdk/jdk which is a bug-fix of JDK-8362123.


Progress

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

Issue

  • JDK-8362123: ClassLoader Leak via Executors.newSingleThreadExecutor(...) (Bug - P4 - Requested)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2346

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 16, 2025

👋 Welcome back chrisdennis! 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 Oct 16, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport d5a207994b9c374e6638e57826326f8f4593b96b 8362123: ClassLoader Leak via Executors.newSingleThreadExecutor(...) Oct 16, 2025
@openjdk
Copy link

openjdk bot commented Oct 16, 2025

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

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Oct 16, 2025
@openjdk
Copy link

openjdk bot commented Oct 16, 2025

⚠️ @chrisdennis 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 Oct 16, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 16, 2025

Webrevs

@chrisdennis
Copy link
Author

/approval request This fixes a memory leak and/or prompt garbage collection issue introduced in Java 21

@openjdk
Copy link

openjdk bot commented Oct 16, 2025

@chrisdennis
8362123: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Oct 16, 2025
@GoeLin
Copy link
Member

GoeLin commented Oct 17, 2025

Hi @chrisdennis
I am not sure this is a good backport as it adds a public method. Do we need a CSR?
Also, if this was introduced in 21, can you please point out the change that did this and link it as "caused by"?
Thanks.

@chrisdennis
Copy link
Author

chrisdennis commented Oct 17, 2025

This isn't adding a new public (API) method it's just adding a missing override of an existing public method in a private static inner class of Executors.

The bug was introduced when the Executors.newSingleThreadExecutor(...) moved from a finalize() based approach for last chance cleanup to a Cleaner based one. The commit that introduced it was therefore 2e78d83 (JDK-8302899). Unfortunately, I don't think I can create a link reflecting this as I lack direct JBS access due to being only a Contributor.

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

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants