AnsweredAssumed Answered

Null Issues When Under Heavy Throughput

Question asked by rallen1 on Jun 4, 2015
Latest reply on Aug 8, 2015 by rallen1
Hello,

I am running Activiti under a pretty heavy throughput load and noticing some issues pop up. Unfortunately, I could not come up with a unit test to nicely replicate the behaviour. The BPMNs I am working with are private and are rather large and complicated.

Some things to note about what I am using:

  • 5.17.0
  • AsyncExecutor
  • StrongUuidGenerator
[h2]Issues:[/h2]

  1. I am non-deterministically observing:


  2. 2015-06-03/14:11:43.546/PDT ERROR org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable - Job d51bf18d-da9b-4e1f-8fb1-7700af745b57 failed
    java.lang.NullPointerException: null
       at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:35) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.jobexecutor.AsyncContinuationJobHandler.execute(AsyncContinuationJobHandler.java:35) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:84) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.persistence.entity.MessageEntity.execute(MessageEntity.java:29) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.cmd.ExecuteAsyncJobCmd.execute(ExecuteAsyncJobCmd.java:52) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) ~[activiti-spring-5.17.0.jar:5.17.0]
       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.1.4.RELEASE.jar:4.1.4.RELEASE]
       at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) ~[activiti-spring-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) ~[activiti-engine-5.17.0.jar:5.17.0]
       at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:73) ~[activiti-engine-5.17.0.jar:5.17.0]
       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_45]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_45]
       at java.lang.Thread.run(Unknown Source) [na:1.8.0_45]


    This seems related to https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/main/java/org/activiti/engine/impl/pvm/runtime/AtomicOperationTransitionCreateScope.java#L34, and the possibility that
    execution.getActivity();
    can return a null under heavy load or because of some concurrency error I may be unknowingly producing.

     
  3. My log is full of the following type of entry:
  4. 2015-06-03/15:24:46.863/PDT ERROR org.activiti.engine.impl.cmd.JobRetryCmd - activitiy or FailedJobRetryTimerCycleValue is null in job b220b51a-a376-4f0d-9628-17b4c801deee'. only decrementing retries.

    I realize this has been changed to log to
    info
    in the latest source, but I am curious why it happens and if there is anything I am doing to cause it.
As always, any help is greatly appreciated. Thank you.

Outcomes