[
https://hibernate.onjira.com/browse/HHH-6414?page=com.atlassian.jira.plug...
]
Pawel Omelko commented on HHH-6414:
-----------------------------------
Im not sure that in our case (described by Marcin Lukasiuk), we have a problem with big
collections. The same request sending now is ending in 4 sec. In threads dump we found
StatefulPersistenceContext.collectionsByKey size equals 12 436. It doesn't looks like
problem I guess.
In application log we found, that the same request was sent by the same operator
(JSESSIONID) during couple ms. One of them was ended in 4 sec, but the other was executing
by couple days (stuck in java.util.HashMap.put (HashMap.java:374)), until Tomcat restart.
So it can be concurrency problem, but I have no idea how it can be happen. Each http
request is using single session (managed by
org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor). I guess that
hibernate doesn't share it between http threads. We can't reproduce this problem
by sending same request twice during 1 second.
Maybe it can be related with ehcache, which we are using as entity, collection and query
cache?
Any other sugestion, becouse I stuck...
CPU spinning, stuck on getResultList()
--------------------------------------
Key: HHH-6414
URL:
https://hibernate.onjira.com/browse/HHH-6414
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate Annotations 3.4.0.GA, Hibernate 3.3.1.GA, Hibernate
Commons Annotations 3.1.0.GA, Hibernate EntityManager 3.4.0.GA, Seam 2.2.1.Final, JBoss
5.1.0.GA, Windows Server 2008 64bits, Microsoft SQL Server 10.00.4000, JDBC driver:
Microsoft SQL Server 2005 JDBC Driver, version: 1.2.2828.100
Reporter: Anthony Ogier
I've got a web application which is well tested (JMeter etc), and suddenly today, 2
of JBoss threads were stuck on a getResultList(), using 100% of the CPU.
Here is the stack for each of the threads :
{noformat}
Thread: http-0.0.0.0-8080-2 : priority:5, demon:true, threadId:156, threadState:RUNNABLE
java.util.HashMap.put(HashMap.java:374)
org.hibernate.engine.StatefulPersistenceContext.addCollection(StatefulPersistenceContext.java:787)
org.hibernate.engine.StatefulPersistenceContext.addUninitializedCollection(StatefulPersistenceContext.java:756)
org.hibernate.type.CollectionType.getCollection(CollectionType.java:642)
org.hibernate.type.CollectionType.resolveKey(CollectionType.java:430)
org.hibernate.type.CollectionType.resolve(CollectionType.java:424)
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
org.hibernate.loader.Loader.doQuery(Loader.java:752)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
org.hibernate.loader.Loader.doList(Loader.java:2228)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
org.hibernate.loader.Loader.list(Loader.java:2120)
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
{noformat}
I've seen some similar problems here
[
JGRP-525|https://issues.jboss.org/browse/JGRP-525] and here
[
JBMESSAGING-1676|https://issues.jboss.org/browse/JBMESSAGING-1676] and they are talking
about concurrency ...
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira