+++ This bug was initially created as a clone of Bug #1156034 +++ Description of problem: The rhqserver plugin reads stats from the RHQ server using JMX. It fails to close the JMX connection to the RHQ server when the RHQ server resource component stops. Version-Release number of selected component (if applicable): 4.13.0-SNAPSHOT How reproducible: always Steps to Reproduce: 1. Inventory RHQ server 2. restart the plugin container of your agent repeatedly Actual results: OOMEs after a couple of restarts (cca 20) (this is due to the connection handling threads holding on to the plugin classloaders). Expected results: stable heap Additional info:
I am observing the same on RHQ 4.13 on the RHQ server local agent. After several restarts permgen keeps growing and number of threads as well. Attaching screenshot from JVisualvm.
Created attachment 979994 [details] RHQ Agent permgen
Moving into CR01 target milestone as missed ER01 cutoff.
Pushed to master, closes the connection, but does not fix the memory leak: commit 1f15123dfda98f86f647f271e33f3173511a4530 Author: Michael Burman <miburman> Date: Fri Jan 30 12:45:33 2015 +0200 [BZ 1156035] Close EmsConnection on shutdown
This is cherry-picked to release/jon3.3.x with commit: 884011bad1ada to jon.git. Moving to MODIFIED for processing with next brew build. Still need to spawn a new BZ and JIRA to track work from comment 4.
I've opened Bug 1191002 to track mem leak in remoting-jmx
Moving to ON_QA as available to test with latest CP build: http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/16/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip *Note: jon-server-patch-3.3.0.GA.zip maps to CR01 build of jon-server-3.3.0.GA-update-01.zip.
Marking as verified. Code review should be enough.