Bug 535592 (RHQ-2271)

Summary: Excessive Hibernate memory usage by CheckForSuspectedAgentsJob
Product: [Other] RHQ Project Reporter: Charles Crouch <ccrouch>
Component: No ComponentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2CC: cwelton, hbrock, ian.springer, jshaughn, sdharane
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2271
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-26 21:31:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 717358    

Description Charles Crouch 2009-07-27 19:56:00 UTC
Associated case: 316351

The CheckForSuspectedAgentsJob appears to be consuming an excessive amount of memory, mostly in hibernates StatefulPersistenceContext.

Heap dump analysis

org.hibernate.engine.StatefulPersistenceContext (208mb) is being referenced from a thread executing org.rhq.enterprise.server.scheduler.jobs.CheckForSuspectedAgentsJob

Breaking down the 208mb, there is 16mb in the entityEntries member variable, 6mb in the entitiesByKey member variable and 5mb in the proxiesByKey member variable. That leaves around 180mb of what looks like just org.rhq.core.domain.resource.Resource_$$_javassist_50 (and possibly other object) instances. There are ~177,000 objects referenced in the heap dump as being associated with the StatefulPersistenceContext instance, I've only checked the class of  the first 250 of which they are all Resource_$$_javassist_50.



Comment 1 Corey Welton 2009-08-05 17:12:47 UTC
Push to 1.4

Comment 2 Red Hat Bugzilla 2009-11-10 21:01:13 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2271


Comment 3 wes hayutin 2010-02-16 16:57:13 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 4 wes hayutin 2010-02-16 17:02:20 UTC
making sure we're not missing any bugs in rhq_triage

Comment 5 Ian Springer 2011-09-06 20:18:15 UTC
It's possible this is related to the SLSB leak issue that was fixed recently (https://bugzilla.redhat.com/show_bug.cgi?id=693232).

Comment 6 Jay Shaughnessy 2013-02-26 21:31:59 UTC
This whole mechanism has been reworked since this bug was reported.