db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-4323) test failure in lang.ErrorMessageTest with IBM iseries IBM 1.5
Date Thu, 25 Oct 2012 09:06:12 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-4323:

    Attachment: d4323-1a.diff

I haven't been able to reproduce the failure, but here's a patch that I'm planning to commit,
and that I expect to reduce the risk of this happening again.

Currently, the test has a race between two threads that perform the following steps:

T1_1: compile query
T1_2: start executing query
T1_3: lock row

T2_1: start new thread
T2_2: compile query
T2_3: start executing query
T2_4: lock row

The events T1_3 and T2_4 must happen no more than 2 seconds apart.

The patch makes sure that both of the two threads have completed the query compilation before
the race starts. Since there are less steps to be done concurrently, and also the amount of
work done concurrently is more evenly distributed, the chance of a big time difference in
the last step should be smaller.

It does this by splitting up Statement.executeQuery() into prepareStatement() + executeQuery()
and introducing a barrier before the executeQuery() calls to make sure they start at the same

I factored out the already existing Barrier classes from IndexSplitDeadlockTest and DeadlockDetectionTest
for this purpose (since we cannot use java.util.concurrent.CyclicBarrier as long as we support
platforms less capable than Java 5).
> test failure in lang.ErrorMessageTest with IBM iseries IBM 1.5
> --------------------------------------------------------------
>                 Key: DERBY-4323
>                 URL: https://issues.apache.org/jira/browse/DERBY-4323
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions:
>         Environment: IBM iseries, OS: AS/400; OS version: V5R4M0, IBM 1.5 (1.5.0_13-b05)
>            Reporter: Myrna van Lunteren
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_8
>         Attachments: d4323-1a.diff, ErrorMessageTest_derby.log, error-stacktrace.out
> There was this error during the test run - when the ErrorMessageTest was run
by itself later there was no problem, and neither did this show up during the ibm 1.6 run:
> 1) testDeadlockTimeout(org.apache.derbyTesting.functionTests.tests.lang.ErrorMessageTest)junit.framework.ComparisonFailure:
Not a deadlock expected:<...001> but was:<...XL2>

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message