google-code-export / h2database

Automatically exported from code.google.com/p/h2database
0 stars 1 forks source link

version 1.3.154 breaks under concurrent load #318

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Our system runs H2 under concurrent load, 8X the number of processors in the 
system concurrent query connections in an embedded db. The only odd setting is 
increasing the page size and cache size.

I get this:
04-28 15:27:09 jdbc[25]: exception
org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: 
page[11494] data leaf table:1227 TEMP_RESULT_SET_1227 entries:0 parent:0 
keys:null offsets:null parent 0 expected 11927"; SQL statement:
select distinct 
9223372036854775807,jtbl0.relid,jtbl0.spanStart,jtbl0.spanEnd,jtbl0.spanPrec,jtb
l0.term0,jtbl0.termtype0,jtbl0.termparent0,jtbl0.termtext0,jtbl0.term1,jtbl0.ter
mtype1,jtbl0.termparent1,jtbl0.termtext1  from OWI_ASSERTIONS_23 jtbl0  
[50000-154]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:156)
    at org.h2.message.DbException.convert(DbException.java:279)
    at org.h2.table.RegularTable.addRow(RegularTable.java:145)
    at org.h2.result.ResultTempTable.addRow(ResultTempTable.java:106)
    at org.h2.result.LocalResult.addRow(LocalResult.java:253)
    at org.h2.command.dml.Select.queryFlat(Select.java:523)
    at org.h2.command.dml.Select.queryWithoutCache(Select.java:617)
    at org.h2.command.dml.Query.query(Query.java:290)
    at org.h2.command.dml.Query.query(Query.java:260)
    at org.h2.command.dml.Query.query(Query.java:37)
    at org.h2.command.CommandContainer.query(CommandContainer.java:78)
    at org.h2.command.Command.executeQuery(Command.java:181)
    at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:96)
    at com.kb.gafdb.jdbc.actions.TSentenceActions$AnyQuery.query(TSentenceActions.java:796)
    at com.kb.gafdb.jdbc.actions.TSentenceActions$AnyQuery.query(TSentenceActions.java:528)
    at com.kb.gafdb.jdbc.actions.JdbcActions$1.iterator(JdbcActions.java:232)
    at com.kb.gafdb.jdbc.actions.JdbcActions$1.iterator(JdbcActions.java:1)
    at com.kb.gafdb.jdbc.store.PiqueGafStore$3.iterator(PiqueGafStore.java:873)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.processFacts(PiqueGafEDBPlan.java:343)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.processOneRegisterExtensionally(PiqueGafEDBPlan.java:253)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.executeCorePoint(PiqueGafEDBPlan.java:156)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.execute(PiqueGafEDBPlan.java:77)
    at com.kb.pique.operator.JoinPlan.executeWithPointListener(JoinPlan.java:1147)
    at com.kb.pique.operator.JoinPlan.execute(JoinPlan.java:1122)
    at com.kb.pique.KickoffEntry.run(KickoffEntry.java:46)
    at com.kb.pique.GeneratorThread.processEntry(GeneratorThread.java:228)
    at com.kb.pique.GeneratorThread.run(GeneratorThread.java:124)
Caused by: java.lang.RuntimeException: page[11494] data leaf table:1227 
TEMP_RESULT_SET_1227 entries:0 parent:0 keys:null offsets:null parent 0 
expected 11927
    at org.h2.message.DbException.throwInternalError(DbException.java:226)
    at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:235)
    at org.h2.index.PageDataNode.addRowTry(PageDataNode.java:128)
    at org.h2.index.PageDataIndex.addTry(PageDataIndex.java:163)
    at org.h2.index.PageDataIndex.add(PageDataIndex.java:128)
    at org.h2.table.RegularTable.addRow(RegularTable.java:127)
    ... 24 more
04-28 15:27:10 jdbc[28]: exception
org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: 
page[11494] data leaf table:1231 TEMP_RESULT_SET_1231 entries:0 parent:0 
keys:null offsets:null parent 0 expected 12356"; SQL statement:
select distinct 
9223372036854775807,jtbl0.relid,jtbl0.spanStart,jtbl0.spanEnd,jtbl0.spanPrec,jtb
l0.term0,jtbl0.termtype0,jtbl0.termparent0,jtbl0.termtext0,jtbl0.term1,jtbl0.ter
mtype1,jtbl0.termparent1,jtbl0.termtext1  from OWI_ASSERTIONS_203 jtbl0  
[50000-154]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:156)
    at org.h2.message.DbException.convert(DbException.java:279)
    at org.h2.table.RegularTable.addRow(RegularTable.java:145)
    at org.h2.result.ResultTempTable.addRow(ResultTempTable.java:106)
    at org.h2.result.ResultTempTable.addRows(ResultTempTable.java:116)
    at org.h2.result.LocalResult.addRow(LocalResult.java:249)
    at org.h2.command.dml.Select.queryFlat(Select.java:523)
    at org.h2.command.dml.Select.queryWithoutCache(Select.java:617)
    at org.h2.command.dml.Query.query(Query.java:290)
    at org.h2.command.dml.Query.query(Query.java:260)
    at org.h2.command.dml.Query.query(Query.java:37)
    at org.h2.command.CommandContainer.query(CommandContainer.java:78)
    at org.h2.command.Command.executeQuery(Command.java:181)
    at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:96)
    at com.kb.gafdb.jdbc.actions.TSentenceActions$AnyQuery.query(TSentenceActions.java:796)
    at com.kb.gafdb.jdbc.actions.TSentenceActions$AnyQuery.query(TSentenceActions.java:528)
    at com.kb.gafdb.jdbc.actions.JdbcActions$1.iterator(JdbcActions.java:232)
    at com.kb.gafdb.jdbc.actions.JdbcActions$1.iterator(JdbcActions.java:1)
    at com.kb.gafdb.jdbc.store.PiqueGafStore$3.iterator(PiqueGafStore.java:873)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.processFacts(PiqueGafEDBPlan.java:343)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.processOneRegisterExtensionally(PiqueGafEDBPlan.java:253)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.executeCorePoint(PiqueGafEDBPlan.java:156)
    at com.kb.gafdb.jdbc.store.sm.PiqueGafEDBPlan.execute(PiqueGafEDBPlan.java:77)
    at com.kb.pique.operator.JoinPlan.executeWithPointListener(JoinPlan.java:1147)
    at com.kb.pique.operator.JoinPlan.execute(JoinPlan.java:1122)
    at com.kb.pique.KickoffEntry.run(KickoffEntry.java:46)
    at com.kb.pique.GeneratorThread.processEntry(GeneratorThread.java:228)
    at com.kb.pique.GeneratorThread.run(GeneratorThread.java:124)
Caused by: java.lang.RuntimeException: page[11494] data leaf table:1231 
TEMP_RESULT_SET_1231 entries:0 parent:0 keys:null offsets:null parent 0 
expected 12356
    at org.h2.message.DbException.throwInternalError(DbException.java:226)
    at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:235)
    at org.h2.index.PageDataNode.addRowTry(PageDataNode.java:128)
    at org.h2.index.PageDataIndex.addTry(PageDataIndex.java:163)
    at org.h2.index.PageDataIndex.add(PageDataIndex.java:128)
    at org.h2.table.RegularTable.addRow(RegularTable.java:127)
    ... 25 more

... with 1.3.154, which 1.3.153 works perfectly.

Sadly, I have no simple test case to reproduce this; the system is complex. 
I've moved back to 1.3.153, which works, as does the latest stable (but stable 
is soooo much slower at inserting rows). 

Seen on Jdk 6, Windows 7 64-bit, Linux 64-bit, and XP 32-bit.

Original issue reported on code.google.com by cscha...@gmail.com on 28 Apr 2011 at 7:35

GoogleCodeExporter commented 9 years ago
What is your database URL? I know there is a problem if both MVCC and 
MULTI_THREADED is used. This isn't supported, but the database doesn't detect 
it in some cases. The next version will not allow it.

Original comment by thomas.t...@gmail.com on 27 May 2011 at 10:10

GoogleCodeExporter commented 9 years ago
Resolving as 'works for me'. Please add a comment, I will then reopen the issue.

Original comment by thomas.t...@gmail.com on 2 Jul 2011 at 4:11