Problem with org.camunda.bpm.engine.test.concurrency.DbDeadlockTest

48 views
Skip to first unread message

Frank Langelage

unread,
Jun 10, 2015, 3:49:12 PM6/10/15
to camunda...@googlegroups.com
Hello,

since a few days a build clean / install shows problems with this test in my environment.

Example for H2 as database:
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.086 sec <<< FAILURE! - in org.camunda.bpm.engine.test.concurrency.DbDeadlockTest
testTransactionIsolation(org.camunda.bpm.engine.test.concurrency.DbDeadlockTest)  Time elapsed: 0.085 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Unexpected interruption
    at junit.framework.Assert.fail(Assert.java:57)
    at junit.framework.TestCase.fail(TestCase.java:227)
    at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$ThreadControl.join(ConcurrencyTestCase.java:129)
    at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$ThreadControl.waitUntilDone(ConcurrencyTestCase.java:121)
    at org.camunda.bpm.engine.test.concurrency.DbDeadlockTest.tearDown(DbDeadlockTest.java:112)
    at junit.framework.TestCase.runBare(TestCase.java:146)
    at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.runBare(AbstractProcessEngineTestCase.java:110)
    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:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Same for oracle-12:
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.301 sec <<< FAILURE! - in org.camunda.bpm.engine.test.concurrency.DbDeadlockTest
testTransactionIsolation(org.camunda.bpm.engine.test.concurrency.DbDeadlockTest)  Time elapsed: 0.301 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Unexpected interruption
    at junit.framework.Assert.fail(Assert.java:57)
    at junit.framework.TestCase.fail(TestCase.java:227)
    at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$ThreadControl.join(ConcurrencyTestCase.java:129)
    at org.camunda.bpm.engine.test.concurrency.ConcurrencyTestCase$ThreadControl.waitUntilDone(ConcurrencyTestCase.java:121)
    at org.camunda.bpm.engine.test.concurrency.DbDeadlockTest.tearDown(DbDeadlockTest.java:112)
    at junit.framework.TestCase.runBare(TestCase.java:146)
    at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.runBare(AbstractProcessEngineTestCase.java:110)
    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:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Using my patched version with IBM informix as database this test just hangs, one session waiting for the other one because of locks.
No deadlock. Waiting endless possibly because lock timeout is configured as infinite.

You do not see this problem during your test runs? The class it self not really changed, anything in the underlying classes?
Command for H2: mvn install -Pdistro-serverless -Pdistro-wildfly9
Oracle: mvn install -Pdistro-serverless -Pdistro-wildfly9 -Pdatabase,oracle-12 -Ddatabase.username="..." -Ddatabase.password="..." -Ddatabase.driver="oracle.jdbc.OracleDriver" -Ddatabase.url="jdbc:oracle:thin:@sb2000:1521:DEV"

Regards, Frank

Sebastian Menski

unread,
Jun 10, 2015, 4:09:27 PM6/10/15
to camunda...@googlegroups.com, frank.l...@osnanet.de
Hi Frank,

we are aware of the problem [1]. I disabled the test until we fixed it [2].

Cheers,
Sebastian


Sebastian Menski

unread,
Jun 12, 2015, 3:52:02 AM6/12/15
to camunda...@googlegroups.com, sebastia...@camunda.com, frank.l...@osnanet.de
Hi Frank,

just an update on this issue. We fixed the bug for our databases [1]. I hope it will work for you too again.

Cheers,
Sebastian

Frank Langelage

unread,
Jun 12, 2015, 11:09:50 AM6/12/15
to camunda...@googlegroups.com, frank.l...@osnanet.de
Sebastian,

thanks for the update on this topic.
It works again with H2 and Oracle 12 but unfortunately not with IBM Informix as I had configured it.
Still hanging on this test. When I reduce the isolation level from Commited Read to Dirty Read (equivalent to TRANSACTION_READ_UNCOMMITTED) the test goes, and luckily still all the others, go through.
I absolutely have no clue why this is necessary now and if it will have an impact when using Camunda as a shared engine inside WildFly.

Regards, Frank

Daniel Meyer

unread,
Jun 15, 2015, 6:02:12 AM6/15/15
to camunda...@googlegroups.com
Hi Frank,

if the test fails, then readers are not completely isolated from
writers. The test is not necessary from a functional perspective. Even
if it fails, you will be able to use camunda.
The test just frames the kind of behavior that we require from the
database if the database is used in a highly concurrent scenario.

Cheers,
Daniel

Reply all
Reply to author
Forward
0 new messages