cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giovanni Borelli (JIRA)" <>
Subject [jira] [Commented] (CXF-6632) Memory leak due to literal keys in WSDLDefinition map
Date Thu, 08 Oct 2015 17:48:27 GMT


Giovanni Borelli commented on CXF-6632:

Sorry, I am new to this and I don't have an actual test case to provide to you right now.

I am mantaining a legacy web application and this is the evidence I can provide:

StackTrace that generates memory leak:
org.apache.cxf.jaxws.spi.ProviderImpl line 101
org.apache.cxf.jaxws.ServiceImpl line 158
org.apache.cxf.wsdl11.WSDLManagerImpl line 267

Here is a snapshot of the leak (goes on until OutOfMemory):

Changing line 267 in WSDLManagerImpl to:
           definitionsMap.put(new String(url), def);

eliminates the leak issue.

Another point of intervention could be changing line 145 in org.apache.cxf.jaxws.ServiceImpl
(and any other similar statements) in an EndpointImpl kind of way.

> Memory leak due to literal keys in WSDLDefinition map
> -----------------------------------------------------
>                 Key: CXF-6632
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7.17
>            Reporter: Giovanni Borelli
>            Assignee: Bharath Ganesh
> Looks like the definitionsMap in WSDLManagerImpl holds the WSDLDefinitions against a
weak key, again relying
> on the WeakHashMap semantics for removal.
> The loadDefinition(String) method loads the WSDLDef and puts this in a map
> against a String key even if it was passed as a URL through getDefinition(URL). 
> Like the this causes a memory leak.

This message was sent by Atlassian JIRA

View raw message