You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Kevan Miller (JIRA)" <ax...@ws.apache.org> on 2005/10/31 16:13:55 UTC

[jira] Created: (AXIS-2278) Memory leak cause by JavaUtils.enumMap

Memory leak cause by JavaUtils.enumMap
--------------------------------------

         Key: AXIS-2278
         URL: http://issues.apache.org/jira/browse/AXIS-2278
     Project: Apache Axis
        Type: Bug
    Versions: 1.3    
 Environment: Sun JDK 1.4.2/WinXP
    Reporter: Kevan Miller


I'm chasing down some Geronimo memory leaks when deploying/undeploying the DayTrader sample application. 

One memory leak I see is caused by o.a.a.utils.JavaUtils.enumMap. JavaUtils is loaded by a parent ClassLoader but is has strong references to classes (the keys of enumMap) which were loaded by child ClassLoaders. This prevents the ClassLoader, and the classes it has loaded, from being GC'ed. This means we'll eventually run out of PermGen memory...

I converted enumMap to be a WeakHashMap and I now see the ClassLoaders being GC'ed. I didn't download using cvs. So, I don't have a patch. I'm happy to generate one, if you'd like...


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXIS-2278) Memory leak cause by JavaUtils.enumMap

Posted by "Kevan Miller (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevan Miller closed AXIS-2278.
------------------------------


> Memory leak cause by JavaUtils.enumMap
> --------------------------------------
>
>                 Key: AXIS-2278
>                 URL: https://issues.apache.org/jira/browse/AXIS-2278
>             Project: Axis
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Sun JDK 1.4.2/WinXP
>            Reporter: Kevan Miller
>         Attachments: enumMapPatch.txt
>
>
> I'm chasing down some Geronimo memory leaks when deploying/undeploying the DayTrader sample application. 
> One memory leak I see is caused by o.a.a.utils.JavaUtils.enumMap. JavaUtils is loaded by a parent ClassLoader but is has strong references to classes (the keys of enumMap) which were loaded by child ClassLoaders. This prevents the ClassLoader, and the classes it has loaded, from being GC'ed. This means we'll eventually run out of PermGen memory...
> I converted enumMap to be a WeakHashMap and I now see the ClassLoaders being GC'ed. I didn't download using cvs. So, I don't have a patch. I'm happy to generate one, if you'd like...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS-2278) Memory leak cause by JavaUtils.enumMap

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2278?page=comments#action_12356510 ] 

Tom Jordahl commented on AXIS-2278:
-----------------------------------

A patch would be appreciated.  Thanks.


> Memory leak cause by JavaUtils.enumMap
> --------------------------------------
>
>          Key: AXIS-2278
>          URL: http://issues.apache.org/jira/browse/AXIS-2278
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.3
>  Environment: Sun JDK 1.4.2/WinXP
>     Reporter: Kevan Miller

>
> I'm chasing down some Geronimo memory leaks when deploying/undeploying the DayTrader sample application. 
> One memory leak I see is caused by o.a.a.utils.JavaUtils.enumMap. JavaUtils is loaded by a parent ClassLoader but is has strong references to classes (the keys of enumMap) which were loaded by child ClassLoaders. This prevents the ClassLoader, and the classes it has loaded, from being GC'ed. This means we'll eventually run out of PermGen memory...
> I converted enumMap to be a WeakHashMap and I now see the ClassLoaders being GC'ed. I didn't download using cvs. So, I don't have a patch. I'm happy to generate one, if you'd like...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-2278) Memory leak cause by JavaUtils.enumMap

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2278?page=all ]
     
Davanum Srinivas resolved AXIS-2278:
------------------------------------

    Resolution: Fixed

Applied. Thanks.

> Memory leak cause by JavaUtils.enumMap
> --------------------------------------
>
>          Key: AXIS-2278
>          URL: http://issues.apache.org/jira/browse/AXIS-2278
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.3
>  Environment: Sun JDK 1.4.2/WinXP
>     Reporter: Kevan Miller
>  Attachments: enumMapPatch.txt
>
> I'm chasing down some Geronimo memory leaks when deploying/undeploying the DayTrader sample application. 
> One memory leak I see is caused by o.a.a.utils.JavaUtils.enumMap. JavaUtils is loaded by a parent ClassLoader but is has strong references to classes (the keys of enumMap) which were loaded by child ClassLoaders. This prevents the ClassLoader, and the classes it has loaded, from being GC'ed. This means we'll eventually run out of PermGen memory...
> I converted enumMap to be a WeakHashMap and I now see the ClassLoaders being GC'ed. I didn't download using cvs. So, I don't have a patch. I'm happy to generate one, if you'd like...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-2278) Memory leak cause by JavaUtils.enumMap

Posted by "Kevan Miller (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2278?page=all ]

Kevan Miller updated AXIS-2278:
-------------------------------

    Attachment: enumMapPatch.txt

Here you go... I checked out from current trunk. Built from the source and then run under Geronimo. With the change, I don't see enumMap holding onto Geronimo classloaders...

FYI, there's another potential leak around o.a.a.description.TypeDesc.classMap/classMaps (1.3 is different than trunk? Not sure why...). Either way, it's part of a chain of references that is keeping ClassLoaders alive.  I need to investigate some more... May be a Geronimo problem. Will raise an issue, if I confirm there is a problem.

> Memory leak cause by JavaUtils.enumMap
> --------------------------------------
>
>          Key: AXIS-2278
>          URL: http://issues.apache.org/jira/browse/AXIS-2278
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.3
>  Environment: Sun JDK 1.4.2/WinXP
>     Reporter: Kevan Miller
>  Attachments: enumMapPatch.txt
>
> I'm chasing down some Geronimo memory leaks when deploying/undeploying the DayTrader sample application. 
> One memory leak I see is caused by o.a.a.utils.JavaUtils.enumMap. JavaUtils is loaded by a parent ClassLoader but is has strong references to classes (the keys of enumMap) which were loaded by child ClassLoaders. This prevents the ClassLoader, and the classes it has loaded, from being GC'ed. This means we'll eventually run out of PermGen memory...
> I converted enumMap to be a WeakHashMap and I now see the ClassLoaders being GC'ed. I didn't download using cvs. So, I don't have a patch. I'm happy to generate one, if you'd like...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira