Issue Details (XML | Word | Printable)

Key: MODELER-15
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Chris
Votes: 2
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Modeler

[modeler] IntrospectionUtils memory leak

Created: 08/Sep/05 10:32 PM   Updated: 15/Feb/07 09:39 AM
Return to search
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 2.0

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: Other

Bugzilla Id: 36559
Resolution Date: 13/Jul/06 10:11 AM


 Description  « Hide
When I reload my webapp, and I profile, I see Method objects in
IntrospectionUtils grow and grow (to the thousands of instances), and none of
my class Objects (or static references) get collected.

This is in the objectsMethods HashTable.

One suggestion: remove the caching
or
Another suggestion: add a method that clears it (or clears it for a certain
classloader), and make sure this method gets called from Tomcat when it
unloads a webapp (since I dont know how a webapp could call this method if
this class is loaded from the system classloader)

More info:

http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?
pageId=2669

Thanks!
Chris



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henri Yandell made changes - 16/May/06 10:00 AM
Field Original Value New Value
issue.field.bugzillaimportkey 36559 12342542
Henri Yandell made changes - 16/May/06 11:47 AM
Affects Version/s unspecified [ 12311647 ]
Key COM-2390 MODELER-15
Project Commons [ 12310458 ] Commons Modeler [ 12310486 ]
Component/s Modeler [ 12311126 ]
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Repository Revision Date User Message
ASF #411629 Mon Jun 05 00:50:01 UTC 2006 billbarker Attempt fix for MODELER-15.

Of course, this will have no effect in Tomcat until the Tomcat team decides to upgrade the Modeler version. While, deprecating the DOM source, and using the Digester source would probably be better, it would also place a hard dependancy on [digester], which while probably ok for TC 4.x and TC 3.x, would almost certainly be rejected by the Tomcat team for TC 5.x.

Also clean up a couple of Java 5 warnings.
Files Changed
MODIFY /jakarta/commons/proper/modeler/trunk/src/java/org/apache/commons/modeler/util/IntrospectionUtils.java

Bill Barker added a comment - 05/Jun/06 07:52 AM
A method has been added to IntrospectionUtils to clear the cached methods (similar to the one in the Tomcat class that this was stolen from . Of course, it won't have any effect until the next release of Modeler, and after that when the Tomcat team decides to upgrade to it.

However, this has already been fixed for Tomcat 6.x with an independent patch.


Henri Yandell added a comment - 12/Jul/06 12:01 PM
Bill - is this issue resolvable, or something more has to happen before a modeler release can go ahead?

Henri Yandell made changes - 12/Jul/06 12:09 PM
Affects Version/s 1.1 [ 12311849 ]
Fix Version/s 1.1.1 [ 12311739 ]
Bill Barker added a comment - 13/Jul/06 02:51 AM
It's resolved as far as Modeler is concerned. There needs to be some minor changes in Tomcat for it to have any effect.

Henri Yandell added a comment - 13/Jul/06 03:46 AM
Is there any issue to that effect within Tomcat's bugzilla that I can point to when I resolve this one?

Bill Barker added a comment - 13/Jul/06 09:51 AM
A quick search of BZ doesn't show any (and I don't remember seeing one come through dev@tomcat). I think that Chris actually knew what he was doing, and posted to the correct list .

Henri Yandell made changes - 13/Jul/06 10:11 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Repository Revision Date User Message
ASF #484910 Sat Dec 09 04:12:31 UTC 2006 billbarker Fix modeler memory leak on reload.

Fix for: MODELER-15

Please don't try to port this to TC 6.x, because Remy has already put a better patch in place there.
Files Changed
MODIFY /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java

Henri Yandell made changes - 15/Feb/07 09:39 AM
Status Resolved [ 5 ] Closed [ 6 ]