See <https://builds.apache.org/job/Derby-trunk/2472/changes>
Changes:
[bpendleton] DERBY-6879: Engine deadlock between XA timeout handling and
cleanupOnError
This patch was contributed by Brett Bergquist (brett at thebergquistfamily dot
com)
The original problem to be solved is that a connection that is performing a
XA transaction that discovers an error that must be cleaned up is going to
have a lock on a EmbedConnection and will then require a lock on the
XATransactionState.
And if the same XA transaction times out (because of the XA transaction
timer value) while the original XA transaction is being worked, then the
timeout handling is going to have a lock on the XATransactionState and then
require a lock on the EmbedConnection, triggering the deadlock.
The change in the patch fixes this problem by altering the locking on
the XATransactionState when invoked via the timeout by removing the
synchronization on the "cancel" method and instead using inline
synchronization on the "XATransactionState" while its internals are being
altered.
Then, it releases the XATransactionState lock to allow the
EmbedConnection.rollback method to be invoked without the lock.
Finally, it acquires the lock again to finish cleaning up the
XATransactionState.
------------------------------------------
[...truncated 5403 lines...]
build:
build_base:
compile:
build:
build:
ckversioninfo:
writeversioninfo:
[mkdir] Created dir:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info>
infowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/DBMS.properties>
infowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/tools.properties>
infowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/net.properties>
infowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/dnc.properties>
versioninfo:
checklocaleinfo:
checkmessages-done:
checkmessages:
[touch] Creating
<https://builds.apache.org/job/Derby-trunk/ws/trunk/generated/checkmessages.done>
localeinfo:
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_cs.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_de_DE.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_es.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_fr.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_hu.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_it.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_ja_JP.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_ko_KR.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_pl.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_pt_BR.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_ru.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_zh_CN.properties>
buildlocaleinfo:
localeinfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/locale_zh_TW.properties>
check-binscripts:
binscripts:
makebinscript:
makebinscript:
makebinscript:
makebinscript:
makebinscript:
makebinscript:
buildsource:
vti-demo:
compile-vtidemo:
[javac] Compiling 6 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
demo:
compile:
[javac] Compiling 2 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
[javac] Compiling 3 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
[javac] Compiling 1 source file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
[javac] Compiling 3 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
compile:
[javac] Compiling 1 source file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
checktoursdb:
toursdb:
compile:
builddb:
[echo] Begin building toursdb
runijscript:
[echo] Running script
<https://builds.apache.org/job/Derby-trunk/ws/trunk/generated/toursdb/build_toursdb.sql>
jarup:
[zip] Building zip:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/generated/toursdb/toursdb.jar>
[echo] Finished building toursdb
copyfiles:
[copy] Copying 12 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/tests/demo>
toursdb:
demo:
buildtestinginfo:
tstinginfowriter:
[propertyfile] Creating new property file:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derby/info/tsting.properties>
testing:
testing:
junitcomponents:
[javac] Compiling 54 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
init:
compile:
[javac] Compiling 48 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
copyfiles:
[copy] Copying 1 file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/harness>
FTharness:
copyfiles:
[copy] Copying 1 file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/v1>
[copy] Copying 1 file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/v2>
[copy] Copying 15 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/ImportExport>
[copy] Copying 3 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/ResultSetStream>
[copy] Copying 1 file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/ConnectionMethods>
[copy] Copying 57 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/serializedDataSources>
[copy] Copying 2 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/testData/Derby6587>
compile:
[javac] Compiling 1 source file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
testdata:
copyfiles:
[copy] Copying 4 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/util>
compile:
[javac] Compiling 50 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
FTpolicy:
util:
unitTests:
[javac] Compiling 83 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
[copy] Copying 7 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/unitTests>
copyfiles:
[copy] Copying 23 files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/multi/stress>
FTstress:
copyfiles:
[copy] Copying 1 file to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes/org/apache/derbyTesting/functionTests/tests/compatibility>
compile:
[javac] Compiling 10 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
compilet1:
[javac] Compiling 94 source files to
<https://builds.apache.org/job/Derby-trunk/ws/trunk/classes>
[javac]
<https://builds.apache.org/job/Derby-trunk/ws/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATest.java>:40:
error: cannot find symbol
[javac] import org.apache.derbyTesting.functionTests.util.DeadlockWatchdog;
[javac] ^
[javac] symbol: class DeadlockWatchdog
[javac] location: package org.apache.derbyTesting.functionTests.util
[javac]
<https://builds.apache.org/job/Derby-trunk/ws/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATest.java>:1274:
error: cannot find symbol
[javac] DeadlockWatchdog wd = new DeadlockWatchdog(30 * 1000);
[javac] ^
[javac] symbol: class DeadlockWatchdog
[javac] location: class XATest
[javac]
<https://builds.apache.org/job/Derby-trunk/ws/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATest.java>:1274:
error: cannot find symbol
[javac] DeadlockWatchdog wd = new DeadlockWatchdog(30 * 1000);
[javac] ^
[javac] symbol: class DeadlockWatchdog
[javac] location: class XATest
[javac] 3 errors
BUILD FAILED
<https://builds.apache.org/job/Derby-trunk/ws/trunk/build.xml>:577: The
following error occurred while executing this line:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/java/testing/build.xml>:66:
The following error occurred while executing this line:
<https://builds.apache.org/job/Derby-trunk/ws/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/build.xml>:80:
Compile failed; see the compiler error output for details.
Total time: 49 seconds
Build step 'Invoke Ant' marked build as failure
[WARNINGS] Skipping publisher since build result is FAILURE
Archiving artifacts