New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activiti/Activiti build fails intermittently in Jenkins-X pipelines #2171

Open
igdianov opened this Issue Nov 18, 2018 · 3 comments

Comments

2 participants
@igdianov
Member

igdianov commented Nov 18, 2018

Let's troubleshoot to resolve the issue to be able to run automated pull request merges by #2167

@salaboy Please, post the failed test log output here with failed unit tests here for analysis...

@salaboy

This comment has been minimized.

Member

salaboy commented Nov 19, 2018

This is the usual suspect...

It is a time out.. so it might be a race condition that we can easily get rid off

[ERROR] Errors: 
[ERROR]   AsyncExclusiveJobsTest>AbstractActivitiTestCase.runBare:97->AbstractTestCase.runTest:60->testExclusiveJobs:33->AbstractActivitiTestCase.waitForJobExecutorToProcessAllJobs:288 » Activiti

and

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 20.154 s <<< FAILURE! - in org.activiti.engine.test.bpmn.async.AsyncExclusiveJobsTest
[ERROR] testExclusiveJobs(org.activiti.engine.test.bpmn.async.AsyncExclusiveJobsTest)  Time elapsed: 20.153 s  <<< ERROR!
org.activiti.engine.ActivitiException: time limit of 20000 was exceeded
	at org.activiti.engine.impl.test.JobTestHelper.waitForJobExecutorToProcessAllJobs(JobTestHelper.java:71)
	at org.activiti.engine.impl.test.JobTestHelper.waitForJobExecutorToProcessAllJobs(JobTestHelper.java:41)
	at org.activiti.engine.impl.test.AbstractActivitiTestCase.waitForJobExecutorToProcessAllJobs(AbstractActivitiTestCase.java:288)
	at org.activiti.engine.test.bpmn.async.AsyncExclusiveJobsTest.testExclusiveJobs(AsyncExclusiveJobsTest.java:33)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at org.activiti.engine.impl.test.AbstractTestCase.runTest(AbstractTestCase.java:60)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at org.activiti.engine.impl.test.AbstractActivitiTestCase.runBare(AbstractActivitiTestCase.java:97)
	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:369)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:275)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:239)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:160)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:373)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:334)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:119)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:407)

@salaboy salaboy added this to Open in Activiti 7.x via automation Nov 19, 2018

@salaboy salaboy added this to the Beta4 milestone Nov 19, 2018

@igdianov

This comment has been minimized.

Member

igdianov commented Nov 21, 2018

@salaboy Could you find and post the logs for testExclusiveJobs test? It is executing 2 async exclusive service tasks each waiting for 6 seconds to finish. The async executor must schedule exclusive tasks to run sequentially and wait until there are no more active jobs after 20s period. I have seen this problem before on machines with limited CPU resources.

Let's check the execution logs first. They should look like this:

07:40:49 [main] INFO  org.activiti.engine.impl.ProcessEngineImpl  - ProcessEngine default created
07:40:49 [main] INFO  org.activiti.engine.ProcessEngines  - initialised process engine default
07:40:50 [main] INFO  org.activiti.engine.impl.bpmn.deployer.BpmnDeployer  - Process deployed: {id: testExclusiveJobs:1:3, key: testExclusiveJobs}
07:40:50 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Starting up the default async job executor [org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor].
07:40:50 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Creating thread pool queue of size 100
07:40:50 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Creating executor service with corePoolSize 2, maxPoolSize 10 and keepAliveTime 5000
07:40:50 [Thread-1] INFO  org.activiti.engine.impl.asyncexecutor.AcquireAsyncJobsDueRunnable  - {} starting to acquire async jobs due
07:40:50 [Thread-2] INFO  org.activiti.engine.impl.asyncexecutor.AcquireTimerJobsRunnable  - {} starting to acquire async jobs due
07:40:50 [Thread-3] INFO  org.activiti.engine.impl.asyncexecutor.ResetExpiredJobsRunnable  - {} starting to reset expired jobs

[B] ----> ScriptB starting
	sleeping for 6 sec...
BBBBBBBBBBBBBBBBBBBBBB
[B] ----> ScriptB ending

[A] ----> ScriptA starting
	sleeping for 6 sec...
done.
AAAAAAAAAAAAAAAAAAAA
[A] ----> ScriptA ending
script task after join! running!
07:41:03 [main] INFO  org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor  - Shutting down the default async job executor [org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor].
07:41:03 [activiti-acquire-timer-jobs] INFO  org.activiti.engine.impl.asyncexecutor.AcquireTimerJobsRunnable  - {} stopped async job due acquisition
07:41:03 [activiti-acquire-async-jobs] INFO  org.activiti.engine.impl.asyncexecutor.AcquireAsyncJobsDueRunnable  - {} stopped async job due acquisition
07:41:03 [activiti-reset-expired-jobs] INFO  org.activiti.engine.impl.asyncexecutor.ResetExpiredJobsRunnable  - {} stopped resetting expired jobs
07:41:03 [main] INFO  org.activiti.engine.impl.test.AbstractTestCase  - database was clean
@salaboy

This comment has been minimized.

Member

salaboy commented Nov 21, 2018

@igdianov nope.. no output for tests in the jenkins pipeline.. it is only showing the error

@salaboy salaboy modified the milestones: Beta4, Beta5 Nov 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment