Bug 534344 (RHQ-114) - large numbers of agent requests (e.g. content reports) seem to blow up hibernate
Summary: large numbers of agent requests (e.g. content reports) seem to blow up hiber...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-114
Product: RHQ Project
Classification: Other
Component: Performance
Version: 1.0.1
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On: RHQ-1172
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-14 19:31 UTC by John Mazzitelli
Modified: 2009-11-10 21:22 UTC (History)
0 users

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


Attachments (Terms of Use)
EntityModeToTuplizerMapping.patch (633 bytes, text/x-patch)
2008-11-18 01:03 UTC, Charles Crouch
no flags Details
AbstractBatcher.patch (3.19 KB, text/x-patch)
2008-11-18 01:04 UTC, Charles Crouch
no flags Details
hibernate3.jar (2.16 MB, application/x-jar)
2008-11-18 01:13 UTC, Charles Crouch
no flags Details

Description John Mazzitelli 2008-03-14 19:31:00 UTC
We are hitting this when getting large numbers of content reports:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-3006

Comment 1 John Mazzitelli 2008-03-14 19:35:54 UTC
double check that we aren't doing what Steve asked about:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-3006#action_29503

we are using EJB3/JPA to handle our hibernate session management so I'm not sure if its possible that we could do this, but we are definitely processing content reports concurrently on differernt threads (but each thread calls into the SLSB seperately, so they all should get their own session).

Comment 2 Charles Crouch 2008-03-17 21:34:03 UTC
(4:22:28 PM) ccrouch: thanks, so do we care about RHQ-114? are we seeing any sideeffects?
(4:25:29 PM) mazz: I only saw RHQ-114 once
(4:25:39 PM) mazz: but never found out why and I did not do anything explicitly to fix it
(4:25:46 PM) mazz: so I suspect its possible to happen again
(4:26:07 PM) ccrouch: right, did it actually break anything?
(4:27:15 PM) mazz: well, the logs spun out of control and never stopped... got MBs of logs due to that infinite loop
(4:29:07 PM) ccrouch: I guesss we could turn down the logging, if that was the only problem
(4:29:47 PM) mazz: well, that means we have a spinning thread

Comment 3 Charles Crouch 2008-03-17 21:55:47 UTC
I think I was too hasty on making these Blockers, they're not good but the side effect so far appear minimal, or we eventually recover.

Comment 4 Charles Crouch 2008-03-26 14:59:34 UTC
This isnt critical for the 1.0 release given the reduction in amount of content being discovered

Comment 5 Joseph Marques 2008-07-02 09:09:58 UTC
putting on 1.1 table for triage, jdobies please review and determine whether 2.0 is a better timeframe.

Comment 6 Joseph Marques 2008-07-08 00:19:34 UTC
now that we have the newly created 1.2 release, we'll get this off of 1.1's plate since there likely won't be enough time to do another full round of performance testing.

Comment 7 John Mazzitelli 2008-10-10 20:54:00 UTC
looking at that HHH JIRA, it looks like Steve added some code to fix the issue (or at least workaround it - since the cause might be due to txs timing out).  Unsure if we want to upgrade our hibernate but that's what it would take to address this.

Comment 8 John Mazzitelli 2008-11-14 17:55:29 UTC
this happens not just with large content reports, but I'm seeing this when just starting up new agents (5 agent spawn VMs, 5 agents per VM).

Comment 9 John Mazzitelli 2008-11-14 21:08:14 UTC
we need to examine the possibility of upgrading hibernate - this problem is too severe to ignore.

This problem causes 230K events to be inserted in the database per hour. Not good.

Comment 10 John Mazzitelli 2008-11-14 22:28:14 UTC
FYI: our current version of hibernate is from r14210 of hibernate branch "branch_3_2 " - which I think can now be found here "http://anonsvn.jboss.org/repos/hibernate/core/branches/Branch_3_2/" - with this patch applied:

Index: EntityModeToTuplizerMapping.java
===================================================================
--- EntityModeToTuplizerMapping.java	(revision 14201)
+++ EntityModeToTuplizerMapping.java	(working copy)
@@ -18,7 +18,7 @@
 public abstract class EntityModeToTuplizerMapping implements Serializable {
 
 	// map of EntityMode -> Tuplizer
-	private final Map tuplizers = Collections.synchronizedMap( new SequencedHashMap() );
+	private final Map tuplizers = new org.hibernate.util.FastHashMap();
 
 	protected void addTuplizer(EntityMode entityMode, Tuplizer tuplizer) {
 		tuplizers.put( entityMode, tuplizer );


Comment 11 John Mazzitelli 2008-11-14 22:32:31 UTC
the patch in the previous comment doesn't have a full path to the patched file - so to be clear, it patches this file: http://anonsvn.jboss.org/repos/hibernate/core/branches/Branch_3_2/src/org/hibernate/tuple/EntityModeToTuplizerMapping.java

Comment 12 Charles Crouch 2008-11-18 00:45:29 UTC
"John Mazzitelli - 14/Nov/08 04:28 PM
FYI: our current version of hibernate is from r14210 of hibernate branch "branch_3_2 " "

I don't believe is correct. I think it should say ".. r14201..". This came from a typo I made in https://jira.jboss.org/jira/browse/JBNADM-2822. For confirmation look at the patch...

Index: EntityModeToTuplizerMapping.java
===================================================================
--- EntityModeToTuplizerMapping.java (revision 14201) 

Comment 13 Charles Crouch 2008-11-18 01:10:46 UTC
Patched hibernate build instructions:
svn co -r 14201 http://anonsvn.jboss.org/repos/hibernate/core/branches/Branch_3_2/

Apply the attached patches to src/org/hibernate/jdbc/AbstractBatcher.java and src/org/hibernate/tuple/EntityModeToTuplizerMapping.java

Then build the hibernate jar using ./build and then \Branch_3_2\build\hibernate3.jar is the jar you want


Comment 14 Charles Crouch 2008-11-18 01:13:10 UTC
hibernate3.jar uploaded on Nov17 has md5 of 6d5a50a98a0a62f73daf795da202307e and is built from r14201 of hibernate 3_2 branch plus the patches to AbstractBatcher.java and EntityModeToTuplizerMapping.java

Comment 15 Charles Crouch 2008-11-21 22:47:42 UTC
----- "Ian Springer" <ian.springer> wrote:

> It's up:
> 
> http://repository.jboss.com/maven2/hibernate/hibernate3/3.2.r14201-2/

Comment 16 John Mazzitelli 2008-11-24 04:53:21 UTC
still need to apply to the 1.1.2 cp branch when we deem it appropriate - see this issue's subtask

Comment 17 Corey Welton 2009-02-17 19:58:09 UTC
QA Closing, this issue has not recurred in the performance environment for some time.

Comment 18 Red Hat Bugzilla 2009-11-10 20:26:51 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-114
Imported an attachment (id=368500)
Imported an attachment (id=368501)
Imported an attachment (id=368502)
This bug is related to RHQ-1122



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