db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5448) In the 10.8 branch, back out the concurrency improvements introduced by using SequenceUpdaters to allocate identity values.
Date Fri, 07 Oct 2011 13:31:30 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122793#comment-13122793
] 

Rick Hillegas commented on DERBY-5448:
--------------------------------------

I have re-run NsTest on the sane jars on 10.8 (after checking in derby-5448-01-aa-backoutConcurrencyChanges.diff.
I set the following switches on the command line but I don't see any additional information
in derby.log. Mike, what switches should I set to get the additional information you need
from the lock table?

  -Dderby.stream.error.extendedDiagSeverityLevel=30000 \
  -Dderby.locks.monitor=true \
  -Dderby.locks.deadlockTrace=true \

Unfortunately, this time around I saw a deadlock which involved the identity column (i.e.,
the SYSCOLUMNS row). I am including the deadlock trace and the stack trace. The deadlock is
found while trying to allocate the next identity value. You can see from the stack trace that
this is the old identity generation logic which Derby has been using for the past several
years. At this point it may be useful to do the following:

1) come up with a repro which pops the deadlock faster

2) perform a binary search on the 10.8 branch, looking for the checkin which introduced this
deadlock

ERROR 40001: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
Lock : ROW, SYSCOLUMNS, (5,16)
  Waiting XID : {98270, X} , NSTEST,  insert into nstesttab (id, t_char, t_date, t_decimal,
t_decimal_nn, t_double,  t_float, t_int, t_longint, t_numeric_large, t_real, t_smallint, t_time,
t_timestamp, t_varchar,t_clob,t_blob) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,cast('00000000000000000000000000000000031'
as clob(1K)),cast(X'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031'
as blob(10K)))
  Granted XID : {98178, X} 
Lock : ROW, NSTESTTAB, (603,39)
  Waiting XID : {98178, S} , NSTEST, select max(serialkey) from nstesttab where serialkey
> ?
  Granted XID : {98245, X} 
Lock : ROW, SYSCOLUMNS, (5,16)
  Waiting XID : {98245, X} , NSTEST,  insert into nstesttab (id, t_char, t_date, t_decimal,
t_decimal_nn, t_double,  t_float, t_int, t_longint, t_numeric_large, t_real, t_smallint, t_time,
t_timestamp, t_varchar,t_clob,t_blob) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,cast('00000000000000000000000000000000031'
as clob(1K)),cast(X'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031'
as blob(10K)))
. The selected victim is XID : 98270.
	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:303)
	at org.apache.derby.impl.services.locks.Deadlock.buildException(Deadlock.java:554)
	at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(ConcurrentLockSet.java:629)
	at org.apache.derby.impl.services.locks.AbstractPool.lockObject(AbstractPool.java:119)
	at org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(ConcurrentPool.java:28)
	at org.apache.derby.impl.store.raw.xact.RowLocking3.lockRecordForWrite(RowLocking3.java:248)
	at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.lockPositionForWrite(OpenConglomerate.java:587)
	at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.fetch(GenericConglomerateController.java:382)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSetAutoincrementValue(DataDictionaryImpl.java:8676)
	at org.apache.derby.impl.sql.execute.InsertResultSet.getSetAutoincrementValue(InsertResultSet.java:830)
	at org.apache.derby.impl.sql.execute.BaseActivation.getSetAutoincrementValue(BaseActivation.java:666)
	at org.apache.derby.exe.ac88e70ddcx0132xde76x081bx0000045c93288.e0(Unknown Source)
	at org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGeneratedClass.java:139)
	at org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(RowResultSet.java:148)
	at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java:185)
	at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java:127)
	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:504)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:436)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:317)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1686)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:308)
	at org.apache.derbyTesting.system.nstest.utils.DbUtil.add_one_row(DbUtil.java:201)
	at org.apache.derbyTesting.system.nstest.tester.TesterObject.doIUDOperation(TesterObject.java:148)
	at org.apache.derbyTesting.system.nstest.tester.Tester2.startTesting(Tester2.java:109)
	at org.apache.derbyTesting.system.nstest.NsTest.run(NsTest.java:555)

                
> In the 10.8 branch, back out the concurrency improvements introduced by using SequenceUpdaters
to allocate identity values.
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5448
>                 URL: https://issues.apache.org/jira/browse/DERBY-5448
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation, SQL
>    Affects Versions: 10.8.2.1
>            Reporter: Rick Hillegas
>             Fix For: 10.8.2.1
>
>         Attachments: derby-5448-01-aa-backoutConcurrencyChanges.diff, derby-5448-02-aa-backoutDocsChanges.diff
>
>
> New errors were seen while running NsTest against the 10.8.2 release candidates. These
errors are recorded as DERBY-5430 and DERBY-5422. The first error is a deadlock which occurs
when inserting into the main table of the test. The second error is a problem clearing the
identity cache. These errors have caused people to lose confidence in the concurrency improvements
introduced by DERBY-4437. We should back the DERBY-4437 changes out of the 10.8 branch and
use the trunk to continue debugging the problems disclosed by NsTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message