Bug 56369 - BaseModelMBean does not clean-up attributeBroadcaster in removeNotificationListener()
BaseModelMBean does not clean-up attributeBroadcaster in removeNotificationLi...
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
All All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2014-04-08 16:07 UTC by lorban
Modified: 2014-04-24 08:49 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description lorban 2014-04-08 16:07:31 UTC
BaseModelMBean.addNotificationListener() registers the listener on attributeBroadcaster, while BaseModelMBean.removeNotificationListener() fails to clean that up.

The end result is a memory leak that is very apparent when you embed directly in your WAR file jmxremote_optional.jar as the com.sun.jmx.remote.opt.internal.ArrayNotificationBuffer$BufferListener' classloader cannot be garbage collected which end up depleting the perm gen merely after a few redeploys.
Comment 1 Mark Thomas 2014-04-12 20:49:42 UTC
This has been fixed in 8.0.x for 8.0.6 onwards.

This has been fixed in 7.0.x for 7.0.54 onwards.
Comment 2 Konstantin Kolinko 2014-04-13 12:21:45 UTC
I re-filed this at Apache Commons Modeler project as

Proposed for Tomcat 6.
Comment 3 Mark Thomas 2014-04-24 08:49:57 UTC
The fix has been applied to 6.0.x and will be included in 6.0.40 onwards.