Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-104114

Investigate intermittent MBMessageServiceTest#testAddMessagesConcurrently failures on hypersonic

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Message Boards
    • Labels:
      None

      Description

      Occasionally on hypersonic, MBMessageServiceTest#testAddMessagesConcurrently fails with:

          [exec] com.liferay.message.boards.service.test.MBMessageServiceTest > testAddMessagesConcurrently STARTED
           [exec] 16:50:22,684 ERROR [Thread-62][SynchronousDestinationTestRule$TestSynchronousDestination:365] Unable to process message {destinationName=liferay/async_service, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.async.advice.internal.AsyncProcessCallable@63923c6c, values={}}
           [exec] com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.RuntimeException: org.springframework.dao.CannotAcquireLockException: Could not execute JDBC batch update; SQL [insert into SocialActivitySet (groupId, companyId, userId, createDate, modifiedDate, classNameId, classPK, type_, extraData, activityCount, activitySetId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec] 	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
           [exec] 	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
           [exec] 	at com.liferay.portal.kernel.test.rule.SynchronousDestinationTestRule$TestSynchronousDestination.send(SynchronousDestinationTestRule.java:362)
           [exec] 	at com.liferay.portal.messaging.internal.DefaultMessageBus.sendMessage(DefaultMessageBus.java:303)
           [exec] 	at com.liferay.portal.async.advice.internal.AsyncAdvice.lambda$before$0(AsyncAdvice.java:139)
           [exec] 	at com.liferay.portal.kernel.transaction.TransactionCommitCallbackUtil.registerCallback(TransactionCommitCallbackUtil.java:80)
           [exec] 	at com.liferay.portal.async.advice.internal.AsyncAdvice.before(AsyncAdvice.java:132)
           [exec] 	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:53)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec] 	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
           [exec] 	at com.sun.proxy.$Proxy157.addActivity(Unknown Source)
           [exec] 	at com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl$1.call(SocialActivityLocalServiceImpl.java:178)
           [exec] 	at com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl$1.call(SocialActivityLocalServiceImpl.java:174)
           [exec] 	at com.liferay.portal.kernel.transaction.TransactionCommitCallbackUtil$1.doCommitted(TransactionCommitCallbackUtil.java:43)
           [exec] 	at com.liferay.portal.kernel.transaction.NewTransactionLifecycleListener.committed(NewTransactionLifecycleListener.java:29)
           [exec] 	at com.liferay.portal.kernel.transaction.TransactionLifecycleManager.fireTransactionCommittedEvent(TransactionLifecycleManager.java:34)
           [exec] 	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:51)
           [exec] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec] 	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec] 	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec] 	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
           [exec] 	at com.sun.proxy.$Proxy651.addMessage(Unknown Source)
           [exec] 	at com.liferay.message.boards.service.MBMessageServiceUtil.addMessage(MBMessageServiceUtil.java:68)
           [exec] 	at com.liferay.message.boards.service.test.MBMessageServiceTest$AddMessageThread.doRun(MBMessageServiceTest.java:333)
           [exec] 	at com.liferay.portal.security.permission.DoAsUserThread.run(DoAsUserThread.java:60)
           [exec] Caused by: java.lang.RuntimeException: org.springframework.dao.CannotAcquireLockException: Could not execute JDBC batch update; SQL [insert into SocialActivitySet (groupId, companyId, userId, createDate, modifiedDate, classNameId, classPK, type_, extraData, activityCount, activitySetId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec] 	at com.liferay.portal.async.advice.internal.AsyncProcessCallable.call(AsyncProcessCallable.java:63)
           [exec] 	at com.liferay.portal.internal.messaging.async.AsyncMessageListener.doReceive(AsyncMessageListener.java:32)
           [exec] 	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
           [exec] 	... 27 more
           [exec] Caused by: org.springframework.dao.CannotAcquireLockException: Could not execute JDBC batch update; SQL [insert into SocialActivitySet (groupId, companyId, userId, createDate, modifiedDate, classNameId, classPK, type_, extraData, activityCount, activitySetId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec] 	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651)
           [exec] 	at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:800)
           [exec] 	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:671)
           [exec] 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:765)
           [exec] 	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:734)
           [exec] 	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
           [exec] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec] 	at com.liferay.portal.async.advice.internal.AsyncProcessCallable.call(AsyncProcessCallable.java:49)
           [exec] 	... 29 more
           [exec] Caused by: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec] 	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:107)
           [exec] 	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
           [exec] 	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
           [exec] 	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
           [exec] 	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
           [exec] 	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
           [exec] 	at com.liferay.portal.dao.orm.hibernate.event.NestableFlushEventListener.onFlush(NestableFlushEventListener.java:61)
           [exec] 	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
           [exec] 	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
           [exec] 	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
           [exec] 	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:663)
           [exec] 	... 35 more
           [exec] Caused by: java.sql.BatchUpdateException: transaction rollback: serialization failure
           [exec] 	at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(JDBCPreparedStatement.java:1937)
           [exec] 	at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:125)
           [exec] 	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
           [exec] 	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
           [exec] 	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
           [exec] 	... 43 more
           [exec] 
           [exec] com.liferay.message.boards.service.test.MBMessageServiceTest > testAddMessagesConcurrently FAILED
           [exec]     java.lang.AssertionError: Thread Thread[Thread-62,5,] caught concurrent failure: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.kernel.test.rule.SynchronousDestinationTestRule$TestSynchronousDestination, message=Unable to process message {destinationName=liferay/async_service, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.async.advice.internal.AsyncProcessCallable@63923c6c, values={}}
           [exec]     java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.kernel.test.rule.SynchronousDestinationTestRule$TestSynchronousDestination, message=Unable to process message {destinationName=liferay/async_service, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.async.advice.internal.AsyncProcessCallable@63923c6c, values={}}
           [exec]     	at com.liferay.portal.test.rule.LogAssertionAppender.append(LogAssertionAppender.java:60)
           [exec]     	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
           [exec]     	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
           [exec]     	at org.apache.log4j.Category.callAppenders(Category.java:206)
           [exec]     	at org.apache.log4j.Category.forcedLog(Category.java:391)
           [exec]     	at org.apache.log4j.Category.log(Category.java:856)
           [exec]     	at com.liferay.portal.log.Log4jLogImpl.error(Log4jLogImpl.java:54)
           [exec]     	at com.liferay.portal.kernel.log.LogWrapper.error(LogWrapper.java:69)
           [exec]     	at com.liferay.portal.kernel.test.rule.SynchronousDestinationTestRule$TestSynchronousDestination.send(SynchronousDestinationTestRule.java:365)
           [exec]     	at com.liferay.portal.messaging.internal.DefaultMessageBus.sendMessage(DefaultMessageBus.java:303)
           [exec]     	at com.liferay.portal.async.advice.internal.AsyncAdvice.lambda$before$0(AsyncAdvice.java:139)
           [exec]     	at com.liferay.portal.kernel.transaction.TransactionCommitCallbackUtil.registerCallback(TransactionCommitCallbackUtil.java:80)
           [exec]     	at com.liferay.portal.async.advice.internal.AsyncAdvice.before(AsyncAdvice.java:132)
           [exec]     	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:53)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
           [exec]     	at com.sun.proxy.$Proxy157.addActivity(Unknown Source)
           [exec]     	at com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl$1.call(SocialActivityLocalServiceImpl.java:178)
           [exec]     	at com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl$1.call(SocialActivityLocalServiceImpl.java:174)
           [exec]     	at com.liferay.portal.kernel.transaction.TransactionCommitCallbackUtil$1.doCommitted(TransactionCommitCallbackUtil.java:43)
           [exec]     	at com.liferay.portal.kernel.transaction.NewTransactionLifecycleListener.committed(NewTransactionLifecycleListener.java:29)
           [exec]     	at com.liferay.portal.kernel.transaction.TransactionLifecycleManager.fireTransactionCommittedEvent(TransactionLifecycleManager.java:34)
           [exec]     	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:51)
           [exec]     	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
           [exec]     	at com.sun.proxy.$Proxy651.addMessage(Unknown Source)
           [exec]     	at com.liferay.message.boards.service.MBMessageServiceUtil.addMessage(MBMessageServiceUtil.java:68)
           [exec]     	at com.liferay.message.boards.service.test.MBMessageServiceTest$AddMessageThread.doRun(MBMessageServiceTest.java:333)
           [exec]     	at com.liferay.portal.security.permission.DoAsUserThread.run(DoAsUserThread.java:60)
           [exec]     Caused by: com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.RuntimeException: org.springframework.dao.CannotAcquireLockException: Could not execute JDBC batch update; SQL [insert into SocialActivitySet (groupId, companyId, userId, createDate, modifiedDate, classNameId, classPK, type_, extraData, activityCount, activitySetId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec]     	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
           [exec]     	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
           [exec]     	at com.liferay.portal.kernel.test.rule.SynchronousDestinationTestRule$TestSynchronousDestination.send(SynchronousDestinationTestRule.java:362)
           [exec]     	... 25 more
           [exec]     Caused by: java.lang.RuntimeException: org.springframework.dao.CannotAcquireLockException: Could not execute JDBC batch update; SQL [insert into SocialActivitySet (groupId, companyId, userId, createDate, modifiedDate, classNameId, classPK, type_, extraData, activityCount, activitySetId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec]     	at com.liferay.portal.async.advice.internal.AsyncProcessCallable.call(AsyncProcessCallable.java:63)
           [exec]     	at com.liferay.portal.internal.messaging.async.AsyncMessageListener.doReceive(AsyncMessageListener.java:32)
           [exec]     	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
           [exec]     	... 27 more
           [exec]     Caused by: org.springframework.dao.CannotAcquireLockException: Could not execute JDBC batch update; SQL [insert into SocialActivitySet (groupId, companyId, userId, createDate, modifiedDate, classNameId, classPK, type_, extraData, activityCount, activitySetId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec]     	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651)
           [exec]     	at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:800)
           [exec]     	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:671)
           [exec]     	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:765)
           [exec]     	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:734)
           [exec]     	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
           [exec]     	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
           [exec]     	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec]     	at com.liferay.portal.async.advice.internal.AsyncProcessCallable.call(AsyncProcessCallable.java:49)
           [exec]     	... 29 more
           [exec]     Caused by: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
           [exec]     	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:107)
           [exec]     	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
           [exec]     	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
           [exec]     	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
           [exec]     	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
           [exec]     	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
           [exec]     	at com.liferay.portal.dao.orm.hibernate.event.NestableFlushEventListener.onFlush(NestableFlushEventListener.java:61)
           [exec]     	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
           [exec]     	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
           [exec]     	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
           [exec]     	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:663)
           [exec]     	... 35 more
           [exec]     Caused by: java.sql.BatchUpdateException: transaction rollback: serialization failure
           [exec]     	at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(JDBCPreparedStatement.java:1937)
           [exec]     	at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:125)
           [exec]     	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
           [exec]     	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
           [exec]     	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
           [exec]     	... 43 more
           [exec] 
           [exec]     	at org.junit.Assert.fail(Assert.java:88)
           [exec]     	at com.liferay.portal.test.rule.LogAssertionTestRule.endAssert(LogAssertionTestRule.java:122)
           [exec]     	at com.liferay.portal.test.rule.LogAssertionTestRule.afterClass(LogAssertionTestRule.java:180)
           [exec]     	at com.liferay.portal.test.rule.LogAssertionTestRule.afterMethod(LogAssertionTestRule.java:188)
           [exec]     	at com.liferay.portal.test.rule.LogAssertionTestRule.afterMethod(LogAssertionTestRule.java:43)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:106)
           [exec]     	at com.liferay.portal.kernel.test.rule.TimeoutTestRule$1.evaluate(TimeoutTestRule.java:89)
           [exec]     	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95)
           [exec]     	at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            brooke.dalton Brooke Dalton
            Recent user:
            Brooke Dalton
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package