[ https://issues.apache.org/jira/browse/HTTPCLIENT-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski updated HTTPCLIENT-2391: ------------------------------------------ Fix Version/s: 5.5.1 5.6-alpha1 Affects Version/s: (was: 5.6-alpha1) > Bug in closing AbstractHttpAsyncClientBase causing long-lived classloaders > -------------------------------------------------------------------------- > > Key: HTTPCLIENT-2391 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2391 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (async) > Affects Versions: 5.5 > Reporter: Pavel Kostelnik > Priority: Minor > Fix For: 5.5.1, 5.6-alpha1 > > Attachments: bugClient.png > > > We have identified a bug in the closing mechanism of the executor service for > {{{}AbstractHttpAsyncClientBase{}}}. The executor service is created as a > single-thread executor, specifically an > {{{}AutoShutdownDelegatedExecutorService{}}}. This class creates a phantom > reference that is cleanable to the executor service it delegates to. > h4. *Issue Details:* > * The {{AutoShutdownDelegatedExecutorService}} correctly calls the > {{shutdownNow()}} method on the underlying executor service. > * However, the phantom reference is never dereferenced and remains held > internally. > * When used with dynamic class loading, this results in a classloader hook > that remains active, leading to long-lived classloaders that block non-heap > memory. > h4. *Proposed Solution:* > *Call shutdown() after shutdownNow() -* Implement logic to ensure that the > phantom reference is properly dereferenced > h4. *Benefits:* > * Fixing this bug will prevent classloader hooks from hanging and ensure > that non-heap memory is not blocked by long-lived classloaders. > Implementing this change will significantly enhance the resource management > and reliability of the executor service in our application. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org