[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-512) Associate with two open session issue and subsequent hang

Marc Schipperheyn (JIRA) noreply at atlassian.com
Wed Apr 21 11:11:34 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36575#action_36575 ] 

Marc Schipperheyn commented on HSEARCH-512:
-------------------------------------------

MassIndexer call
try{
				fts.createIndexer(Offer.class)
					.purgeAllOnStart(true)
					.optimizeOnFinish(true)
					.batchSizeToLoadObjects(30)
					.threadsForSubsequentFetching(8)
					.threadsToLoadObjects(4)
					.startAndWait();
			}catch(Exception e){
				log.error(e);
			}

Stacktrace

Exception in thread "Hibernate Search: collectionsloader-3" Exception in thread "Hibernate Search: collectionsloader-1" 	at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:102)
	at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
	at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:766)
	at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:758)
	at org.hibernate.impl.SessionImpl.access$500(SessionImpl.java:148)
	at org.hibernate.impl.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2278)
	at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:111)
	at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:91)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions
	at org.hibernate.proxy.AbstractLazyInitializer.setSession(AbstractLazyInitializer.java:126)
	at org.hibernate.engine.StatefulPersistenceContext.reassociateProxy(StatefulPersistenceContext.java:572)
	at org.hibernate.engine.StatefulPersistenceContext.reassociateIfUninitializedProxy(StatefulPersistenceContext.java:532)
	at org.hibernate.event.def.ProxyVisitor.processEntity(ProxyVisitor.java:50)
	at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:127)
	at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:84)
	at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:78)
	at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:146)
	at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:102)
	at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
	at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:766)
	at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:758)
	at org.hibernate.impl.SessionImpl.access$500(SessionImpl.java:148)
	at org.hibernate.impl.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2278)
	at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:111)
	at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:91)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

It doesn't happen all the time

> Associate with two open session issue and subsequent hang
> ---------------------------------------------------------
>
>                 Key: HSEARCH-512
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-512
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 3.2.0.CR1
>         Environment: Hibernate 3.5.1, MySQL 5.1.44, Lucene 2.9.2
>            Reporter: Marc Schipperheyn
>            Assignee: Sanne Grinovero
>             Fix For: 3.2.0
>
>
> I've noticed the issue described in http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-490. It seems to happen sometimes, especially when threads pause for a debugging break and I don't immediately continue them.
> But I also notice that then the MassIndexer just doesn't finish and hangs with all the threads still in running state. Nothing seems to be happening or completing. I think that HSEARCH-490 has prevented the threads from completing at this point.
> The system/website then becomes completely unresponsive.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list