Bug 727245 - RHQ Agent leaks java classes when issued command "plugins update"
Summary: RHQ Agent leaks java classes when issued command "plugins update"
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.1
Hardware: All
OS: All
medium vote
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Mike Foley
Depends On:
Blocks: jon30-bugs
TreeView+ depends on / blocked
Reported: 2011-08-01 16:02 UTC by Mike Foley
Modified: 2011-09-27 02:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)
Image showing the java classes that are leaking (209.16 KB, image/png)
2011-08-01 16:02 UTC, Mike Foley
no flags Details

Description Mike Foley 2011-08-01 16:02:05 UTC
Created attachment 516174 [details]
Image showing the java classes that are leaking

Description of problem:  RHQ Agent leaks java classes when issued command "plugins update".  Unbounded increase in class instance counts when this command is issued on the agent, even when there are no updates to the plugin needed.  Unbounded growth of java programs leads to exhaustion of system resources and robustness/duration/longevity issues.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  Attach Jprofiler to the agent
2.  on the agent, do "plugins update"
3.  in jprofiler, do GC
4.  in jprofiler, set a baseline
5.  on agent, do "plugins update"
6.  in jprofiler, do GC
7.  in jprofiler, observe instance counts on java classes increased
8.  do another "plugins update" ... followed by a GC
9.  observe unbounded growth of java class instance counts
Actual results:

Expected results:

Additional info:

Comment 1 Mike Foley 2011-08-01 16:14:29 UTC
also ... tested:

ping .... minor leak (but may be important if this command is issued automatically frequently)

discovery -f  ... minor leak

metrics ... OK

avail  ... OK

Comment 2 Charles Crouch 2011-08-02 02:03:44 UTC
Assigning to mazz for comment
IIRC this was to do with the plugin container getting reloaded, and is a known issue, with no reasonable fix.
Work around would be restarting the agent after a certain number of plugin updates (which in production systems are typically only done during patching or upgrades)

Comment 3 John Mazzitelli 2011-08-03 17:51:14 UTC
related to bug 615377

see its tenth comment https://bugzilla.redhat.com/show_bug.cgi?id=615377#c10

"There still
seems to be some minor perm gen leakage that occurs when restarting the
internals (using either "shutdown/start", "plugins update" or "pc stop/pc
start" - which all restart the PC"

Comment 4 Charles Crouch 2011-09-27 02:25:04 UTC
Setting to medium priority as per mazz's comment

Note You need to log in before you can comment on or make changes to this bug.