On Fri, 27 Mar 2026 16:12:16 GMT, Jaikiran Pai <[email protected]> wrote:
>> 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 Thank you Daniel for the review. tier testing with this change completed normally. I'll go ahead and integrate this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29934#issuecomment-4149224392
