Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10631

CompetingMessageCorrelationTest is instable on Oracle 18

    Details

    • Type: Task
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.12.0, 7.11.2, 7.12.0-alpha2
    • Component/s: engine
    • Labels:
      None

      Description

      Build: https://ci.cambpm.camunda.cloud/job/7.11/job/7.11-engine-UNIT-oracle-18/
      At least builds 46, 49, 50 failed in this test. In the builds between, the test succeeded.
      The 7.12 build looks stable.

      Build details:

      Fehlermeldung

      Process engine persistence exception
      

      Stacktrace

      org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
      	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.rethrow(CommandInvocationContext.java:151)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:121)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.impl.AbstractQuery.list(AbstractQuery.java:142)
      	at org.camunda.bpm.engine.test.concurrency.CompetingMessageCorrelationTest$1.execute(CompetingMessageCorrelationTest.java:53)
      	at org.camunda.bpm.engine.test.concurrency.CompetingMessageCorrelationTest$1.execute(CompetingMessageCorrelationTest.java:50)
      	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.CompetingMessageCorrelationTest.tearDown(CompetingMessageCorrelationTest.java:50)
      	at junit.framework.TestCase.runBare(TestCase.java:146)
      	at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.runBare(AbstractProcessEngineTestCase.java:115)
      	at junit.framework.TestResult$1.protect(TestResult.java:122)
      	at junit.framework.TestResult.runProtected(TestResult.java:142)
      	at junit.framework.TestResult.run(TestResult.java:125)
      	at junit.framework.TestCase.run(TestCase.java:129)
      	at junit.framework.TestSuite.runTest(TestSuite.java:252)
      	at junit.framework.TestSuite.run(TestSuite.java:247)
      	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      Caused by: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: java.sql.SQLRecoverableException: IO Error: Socket read interrupted
      ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/HistoricJobLog.xml
      ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.selectHistoricJobLogByQueryCriteria-Inline
      ### The error occurred while setting parameters
      ### SQL: select * from ( select a.*, ROWNUM rnum from (     select distinct RES.*                from ACT_HI_JOB_LOG RES                        order by RES.ID_ asc       ) a where ROWNUM < ?) where rnum  >= ?
      ### Cause: java.sql.SQLRecoverableException: IO Error: Socket read interrupted
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
      	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:97)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:181)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:173)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:165)
      	at org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogManager.findHistoricJobLogsByQueryCriteria(HistoricJobLogManager.java:61)
      	at org.camunda.bpm.engine.impl.HistoricJobLogQueryImpl.executeList(HistoricJobLogQueryImpl.java:270)
      	at org.camunda.bpm.engine.impl.AbstractQuery.evaluateExpressionsAndExecuteList(AbstractQuery.java:191)
      	at org.camunda.bpm.engine.impl.AbstractQuery.execute(AbstractQuery.java:168)
      	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
      	... 27 more
      Caused by: java.sql.SQLRecoverableException: IO Error: Socket read interrupted
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:779)
      	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:921)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1099)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3640)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1384)
      	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3752)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1079)
      	at sun.reflect.GeneratedMethodAccessor745.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
      	at com.sun.proxy.$Proxy31.execute(Unknown Source)
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
      	at org.apache.ibatis.executor.BatchExecutor.doQuery(BatchExecutor.java:93)
      	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
      	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
      	... 38 more
      Caused by: java.io.InterruptedIOException: Socket read interrupted
      	at oracle.net.nt.TimeoutSocketChannel.handleInterrupt(TimeoutSocketChannel.java:262)
      	at oracle.net.nt.TimeoutSocketChannel.write(TimeoutSocketChannel.java:213)
      	at oracle.net.ns.NIOPacket.writeToSocketChannel(NIOPacket.java:308)
      	at oracle.net.ns.NIONSDataChannel.writeDataToSocketChannel(NIONSDataChannel.java:182)
      	at oracle.net.ns.NIONSDataChannel.writeDataToSocketChannel(NIONSDataChannel.java:133)
      	at oracle.jdbc.driver.T4CMAREngineNIO.flush(T4CMAREngineNIO.java:741)
      	at oracle.jdbc.driver.T4CMAREngineNIO.prepareForUnmarshall(T4CMAREngineNIO.java:754)
      	at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:427)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:394)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:255)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:610)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:253)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:86)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:765)
      	... 57 more
      

      Standard Ausgabe (STDOUT)

      Exception in thread "Thread-299" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'DELETE EventSubscriptionEntity[134307]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-300" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE ExecutionEntity[134404]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-301" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE ExecutionEntity[134504]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-302" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE ExecutionEntity[134604]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-303" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE ExecutionEntity[134706]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-306" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE MessageEntity[134809]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-308" org.camunda.bpm.engine.ProcessEngineException: Execution with id '134906' does not have a subscription to a message event with name 'Message': eventSubscriptions is empty
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:394)
      	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:126)
      	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:119)
      	at org.camunda.bpm.engine.impl.cmd.MessageEventReceivedCmd.execute(MessageEventReceivedCmd.java:79)
      	at org.camunda.bpm.engine.impl.cmd.AbstractCorrelateMessageCmd.triggerExecution(AbstractCorrelateMessageCmd.java:68)
      	at org.camunda.bpm.engine.impl.cmd.AbstractCorrelateMessageCmd.createMessageCorrelationResult(AbstractCorrelateMessageCmd.java:111)
      	at org.camunda.bpm.engine.impl.cmd.CorrelateMessageCmd.execute(CorrelateMessageCmd.java:95)
      	at org.camunda.bpm.engine.impl.cmd.CorrelateMessageCmd.execute(CorrelateMessageCmd.java:42)
      	at org.camunda.bpm.engine.impl.MessageCorrelationBuilderImpl.execute(MessageCorrelationBuilderImpl.java:315)
      	at org.camunda.bpm.engine.impl.MessageCorrelationBuilderImpl.correlateWithResult(MessageCorrelationBuilderImpl.java:224)
      	at org.camunda.bpm.engine.impl.MessageCorrelationBuilderImpl.correlate(MessageCorrelationBuilderImpl.java:212)
      	at org.camunda.bpm.engine.impl.MessageCorrelationBuilderImpl.correlateExclusively(MessageCorrelationBuilderImpl.java:243)
      	at org.camunda.bpm.engine.test.concurrency.CompetingMessageCorrelationTest$ControllableMessageCorrelationCommand.execute(CompetingMessageCorrelationTest.java:592)
      	at org.camunda.bpm.engine.test.concurrency.CompetingMessageCorrelationTest$ControllableMessageCorrelationCommand.execute(CompetingMessageCorrelationTest.java:565)
      	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      Exception in thread "Thread-312" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'DELETE EventSubscriptionEntity[135107]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      

      Standard Fehler (STDERR)

      Exception in thread "Thread-300" org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE ExecutionEntity[134404]' failed. Entity was updated by another transaction concurrently.
      	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleConcurrentModification(DbEntityManager.java:411)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:352)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:322)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:294)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:268)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:186)
      	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119)
      	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
      	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
      	at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$1.run(ConcurrencyTestCase.java:62)
      	at java.lang.Thread.run(Thread.java:748)
      

        Activity

        Hide
        thorben.lindhauer Thorben Lindhauer added a comment - - edited

        Findings:

        Show
        thorben.lindhauer Thorben Lindhauer added a comment - - edited Findings: the exception appears to a be an infrastructure problem at first sight it always fails in the same test in all of the failing builds, the tests were run in reverse alphabetical order; alphabetical order seems to always succeed; build 51 ran reverse order and succeeded as well The test fails in different test methods ( testConcurrentMessageCorrelationAndTreeCompaction and testConcurrentMessageCorrelationTwiceAndTreeCompaction , however in the same line of code during tear down: https://github.com/camunda/camunda-bpm-platform-maintenance/blob/7.11.1/engine/src/test/java/org/camunda/bpm/engine/test/concurrency/CompetingMessageCorrelationTest.java#L53 The problem can be reproduced locally when running the test in isolation. It failed for the first time on the ~sixth run for me.
        Hide
        thorben.lindhauer Thorben Lindhauer added a comment -

        https://ci.cambpm.camunda.cloud/job/7.12/view/Broken/job/7.12-platform-UPGRADE-databases-from-711-oracle-18/24/ shows that this failure can also occur in other tests, here ThrowOleWhenDeletingExceptionStacktraceTest.testThrowOleWhenDeletingExceptionStacktraceTest

        Show
        thorben.lindhauer Thorben Lindhauer added a comment - https://ci.cambpm.camunda.cloud/job/7.12/view/Broken/job/7.12-platform-UPGRADE-databases-from-711-oracle-18/24/ shows that this failure can also occur in other tests, here ThrowOleWhenDeletingExceptionStacktraceTest.testThrowOleWhenDeletingExceptionStacktraceTest
        Hide
        thorben.lindhauer Thorben Lindhauer added a comment - - edited

        The issue can be somewhat reliably be reproduced by running the test in many iterations, i.e. add the following to CompetingMessageCorrelationTest:

          @Override
          public void runBare() throws Throwable {
            for (int i = 0; i < 102; i++)
            {
              super.runBare();
            }
          }
        

        The root cause is a race condition between the thread running a controllable command and the main thread. If the controllable command fails, the main thread is interrupted (see ConcurrencyTestCase#executeControllableCommand) immediately before the controllable thread ends. This stands in a race condition with the main thread joining the controllable thread:

        1. If the main thread joins the controllable thread before the controllable thread finishes, Thread#join eventually throws an InterruptedException and the main thread's interruption status is cleared
        2. If the main thread joins the controllable thread after the controllable thread finishes, Thread#join does not clear the main thread's interruption status.

        In case 2, the main thread's interruption status remains set and is only cleared when the next interrupt-sensitive method is called (e.g. monitor methods, IO methods). In our case, this only happens when the JDBC driver does IO the next time, which then fails due to interruption.

        I believe that this problem only shows with Oracle 18, because with other databases the interruption status may get cleared at points that handle interruption gracefully.

        Show
        thorben.lindhauer Thorben Lindhauer added a comment - - edited The issue can be somewhat reliably be reproduced by running the test in many iterations, i.e. add the following to CompetingMessageCorrelationTest : @Override public void runBare() throws Throwable { for ( int i = 0; i < 102; i++) { super .runBare(); } } The root cause is a race condition between the thread running a controllable command and the main thread. If the controllable command fails, the main thread is interrupted (see ConcurrencyTestCase#executeControllableCommand ) immediately before the controllable thread ends. This stands in a race condition with the main thread joining the controllable thread: If the main thread joins the controllable thread before the controllable thread finishes, Thread#join eventually throws an InterruptedException and the main thread's interruption status is cleared If the main thread joins the controllable thread after the controllable thread finishes, Thread#join does not clear the main thread's interruption status. In case 2, the main thread's interruption status remains set and is only cleared when the next interrupt-sensitive method is called (e.g. monitor methods, IO methods). In our case, this only happens when the JDBC driver does IO the next time, which then fails due to interruption. I believe that this problem only shows with Oracle 18, because with other databases the interruption status may get cleared at points that handle interruption gracefully.

          People

          • Assignee:
            Unassigned
            Reporter:
            thorben.lindhauer Thorben Lindhauer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development