> Can I please get a review of this change which addresses an issue in the 
> `java.naming` module? 
> 
> As noted in https://bugs.openjdk.org/browse/JDK-8273874 when a 
> `javax.naming.Context` is constructed backed by a 
> `com.sun.jndi.ldap.LdapCtxFactory`, the internal implemenation of `LdapCtx` 
> can lead to creation of Threads that are used for the managing connections 
> and for managing event notifications. These threads are system threads. 
> However, the way they are created currently, they end up capturing the 
> context classloader of the calling Thread. This classloader will be held onto 
> as long as these Threads stay alive and can thus prevent the classloader from 
> being unreferenced.
> 
> The change in this PR replaces the creation of these threads with the 
> `InnocuousThread`s, which do not have a context classloader associated with 
> them.
> 
> A new jtreg test has been introduced to reproduce the issue and verify the 
> fix. Existing tests continue to pass with this change.

Jaikiran Pai has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains five additional commits since 
the last revision:

 - merge latest from master branch
 - merge latest from master branch
 - merge latest from master branch
 - add test
 - 8273874: LdapClient can trigger memory leak

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/29934/files
  - new: https://git.openjdk.org/jdk/pull/29934/files/c70a0d76..2590e361

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29934&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29934&range=01-02

  Stats: 7147 lines in 377 files changed: 2377 ins; 2136 del; 2634 mod
  Patch: https://git.openjdk.org/jdk/pull/29934.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29934/head:pull/29934

PR: https://git.openjdk.org/jdk/pull/29934

Reply via email to