Aurelijus Janeliunas [http://community.jboss.org/people/Leevoth] created the 
discussion

"Deadlocks on blob/lob variables"

To view the discussion, visit: http://community.jboss.org/message/589174#589174

--------------------------------------------------------------
Deadlocks occur in heavy load environment. I found some issues regarding 
deadlocks of this version Jbpm engine ( 
http://www.mail-archive.com/jboss-user@lists.jboss.org/msg177884.html 
http://www.mail-archive.com/jboss-user@lists.jboss.org/msg177884.html 
mailto://www.mail-archive.com/jboss-user@lists.jboss.org 
//www.mail-archive.com/jboss-user@lists.jboss.org/msg177884.html). I 
implemented custom DatabaseDbIdGenerator. This custom DbID generator selects 
values from Oracle sequence which is independent from transactions. But still 
we have problems regarding deadlocks on BlobVariable or Lob:


2011-02-08 09:58:35,890 WARN  [org.hibernate.util.JDBCExceptionReporter] 
(WorkManager(2)-72) SQL Error: 60, SQLState: 61000
2011-02-08 09:58:35,890 ERROR [org.hibernate.util.JDBCExceptionReporter] 
(WorkManager(2)-72) ORA-00060: deadlock detected while waiting for resource

2011-02-08 09:58:35,890 ERROR 
[org.hibernate.event.def.AbstractFlushingEventListener] (WorkManager(2)-72) 
Could not synchronize database state with session
org.hibernate.exception.LockAcquisitionException: could not delete: 
[org.jbpm.pvm.internal.lob.Lob#10678725]
    at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:110)
    at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2569)
    at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2725)
    at 
org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
    at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
    at 
org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88)
    at 
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)
    at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)
    at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
    at 
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)
    at 
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)
    at 
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at 
org.jboss.resource.adapter.jms.inflow.JmsServerSession$XATransactionDemarcationStrategy.end(JmsServerSession.java:657)
    at 
org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:243)
    at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
    at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waiting 
for resource

    at 
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
    at 
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
    at 
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
    at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
    at 
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
    at 
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
    at 
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1349)
    at 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
    at 
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2551)
    ... 24 more

or this one

org.hibernate.exception.LockAcquisitionException: could not update: 
[org.jbpm.pvm.internal.type.variable.BlobVariable#10613779]
 at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:110)
 at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
 at 
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2453)
 at 
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
 at 
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
 at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
 at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
 at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
 at 
org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
 at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589)
 at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
 at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328)
 at 
org.jbpm.pvm.internal.hibernate.DbSessionImpl.findTaskByExecution(DbSessionImpl.java:311)
 at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:130)
 at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:116)
 at org.jbpm.pvm.internal.model.op.Signal.perform(Signal.java:70)
 at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672)
 at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632)
 at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:430)
 at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:416)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
 at 
org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_99.signal(ExecutionImpl_$$_javassist_99.java)
 at org.jbpm.pvm.internal.task.TaskImpl.complete(TaskImpl.java:201)
 at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:65)
 at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:32)
 at org.jbpm.pvm.internal.cmd.CompositeCmd.execute(CompositeCmd.java:42)
 at org.jbpm.pvm.internal.cmd.CompositeCmd.execute(CompositeCmd.java:34)
 at 
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
 at 
org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)
 at 
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/589174#589174]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to