hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1749) Memory Leak in OSGi support
Date Sat, 11 Jun 2016 15:57:21 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski resolved HTTPCLIENT-1749.
       Resolution: Fixed
    Fix Version/s: 4.5.3

Patch committed to SVN trunk and 4.5.x branch. Many thanks for contributing it. Please review
and close.


> Memory Leak in OSGi support
> ---------------------------
>                 Key: HTTPCLIENT-1749
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1749
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.4.1, 4.5.2
>            Reporter: Justin Edelson
>             Fix For: 4.5.3
>         Attachments: HTTPCLIENT-1749-2.diff, HTTPCLIENT-1749.patch
> There is a memory leak in the HTTP Client OSGi support whereby the HttpProxyConfigurationActivator
holds on to references to created HttpClient instances for the entire life of the httpclient-osgi
bundle, which may be (and probably is in many cases) longer than the lifespan of individual
HttpClient instances.
> The clients are added here: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.httpcomponents/httpclient-osgi/4.4.1/org/apache/http/osgi/impl/OSGiHttpClientBuilder.java#58
> and not removed until http://grepcode.com/file/repo1.maven.org/maven2/org.apache.httpcomponents/httpclient-osgi/4.4.1/org/apache/http/osgi/impl/HttpProxyConfigurationActivator.java#115
> This can be relatively easily fixed by using weak references. In addition, access to
this collection needs to be synchronized because the additions may come from multiple threads.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message