Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 80F8B200B25 for ; Wed, 8 Jun 2016 20:23:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 80019160A5C; Wed, 8 Jun 2016 18:23:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0415D160A2E for ; Wed, 8 Jun 2016 20:23:21 +0200 (CEST) Received: (qmail 51111 invoked by uid 500); 8 Jun 2016 18:23:21 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 51086 invoked by uid 99); 8 Jun 2016 18:23:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 18:23:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 04ED62C1F54 for ; Wed, 8 Jun 2016 18:23:21 +0000 (UTC) Date: Wed, 8 Jun 2016 18:23:21 +0000 (UTC) From: "Justin Edelson (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HTTPCLIENT-1749) Memory Leak in OSGi support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Jun 2016 18:23:22 -0000 Justin Edelson created HTTPCLIENT-1749: ------------------------------------------ Summary: 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.5.2, 4.4.1 Reporter: Justin Edelson 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. 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 (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org