Hi,

Yes, it looks like something isn't properly synchronized. I would be very
interested in a simple reproducible test case... But unfortunately I'm on
vacation for two weeks so I can't investigate further now.

Regards,
Thomas
Am 11.04.2011 08:18 schrieb "Uli" <[email protected]>:
> I've got the following exception using a database connected with
> MULTITHREADED=TRUE:
>
> org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
> "page[15922033] data leaf table:51 TEMP_RESULT_SET_51 entries:42
> parent:15922302 keys:[273461, 273462, 273463, 273464, 273465, 273466,
> 273467, 273468, 273469, 273470, 273471, 273472, 273473, 273474,
> 273475, 273476, 273477, 273478, 273479, 273480, 273481, 273482,
> 273483, 273484, 273485, 273486, 273487, 273488, 273489, 273490,
> 273491, 273492, 273493, 273494, 273495, 273496, 273497, 273498,
> 273499, 273500, 273501, 273502, 273525, 273525, 273525] offsets:[2022,
> 1996, 1970, 1944, 1918, 1892, 1866, 1840, 1814, 1788, 1762, 1736,
> 1710, 1684, 1658, 1632, 1606, 1580, 1554, 1528, 1502, 1476, 1450,
> 1424, 1398, 1372, 1346, 1320, 1294, 1268, 1242, 1216, 1190, 1164,
> 1138, 1112, 1086, 1060, 1034, 1008, 982, 956, 930, 904, 878]".
> Possible solution: use the recovery tool; SQL statement:
> SELECT GREATEST(time, 1286620057677) "time", value
> FROM view_valuesall
> WHERE s_id = 6898
> AND time <= 1302172057677
> AND COALESCE(timeend, 1302172057677+1) > 1286620057677
> ORDER BY time
> LIMIT 100001 [90030-154]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:
> 327)
> at org.h2.message.DbException.get(DbException.java:167)
> at org.h2.message.DbException.get(DbException.java:144)
> at org.h2.index.PageBtreeIndex.getPage(PageBtreeIndex.java:152)
> at org.h2.index.PageBtreeNode.find(PageBtreeNode.java:300)
> at org.h2.index.PageBtreeNode.find(PageBtreeNode.java:301)
> at org.h2.index.PageBtreeNode.find(PageBtreeNode.java:301)
> at org.h2.index.PageBtreeIndex.find(PageBtreeIndex.java:175)
> at org.h2.index.PageBtreeIndex.find(PageBtreeIndex.java:166)
> at org.h2.result.ResultTempTable.find(ResultTempTable.java:192)
> at org.h2.result.ResultTempTable.addRow(ResultTempTable.java:104)
> 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.SelectUnion.queryWithoutCache(SelectUnion.java:
> 179)
> at org.h2.command.dml.SelectUnion.query(SelectUnion.java:391)
> at org.h2.command.dml.Query.query(Query.java:260)
> at org.h2.index.ViewIndex.find(ViewIndex.java:233)
> at org.h2.index.BaseIndex.find(BaseIndex.java:99)
> at org.h2.index.IndexCursor.find(IndexCursor.java:145)
> at org.h2.table.TableFilter.next(TableFilter.java:321)
> at org.h2.command.dml.Select.queryFlat(Select.java:512)
> 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.JdbcStatement.executeInternal(JdbcStatement.java:173)
> at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)
> ... <stacktrace of my program> ...
>
> The database was created with H2 1.3.1.54 using the SQL script of a
> recovery action.
> (I posted a problem before with SHUTDOWN COMPACT. Although I wrote the
> problem was solved the database was corrupted and so I had to run the
> recovery tool).
> The recovery script was executed with the default database parameters
> (no multithreaded, no mvcc etc.).
> After the script finished the database was closed with SHUTDOWN
> COMPACT.
> The connection to the database is now created with the H2 JDBC driver.
> The exception occurs either with pooled and non pooled connections.
>
> The interesting thing is now:
> - Performing the upper SQL-statement with the *default* database
> connection parameters succeeds.
> - Performing the SQL-statement with MULTITHREADED=TRUE throws the
> exception. The database is corrupted afterwards. Opening the database
> fails with the exception: "org.h2.jdbc.JdbcSQLException: File
> corrupted while reading record: "index not found 51". Possible
> solution: use the recovery tool [90030-154]"
> - I could not reproduce the problem with two multithreaded H2 console
> connections performing the failing SQL statement and another SQL
> statement at the same time.
>
> I think this problem must still exist in 1.3.154 because I never used
> another H2 version with this database.
>
> Thomas: if you are interested I can send you the recovery script or
> the database. BUT: the bzipped2 recovery script is 2.2 GB large and
> bzipped2 database created from it is approx. 10GB large. So I cannot
> send it via email :-)
>
> Uli
>
> --
> You received this message because you are subscribed to the Google Groups
"H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
[email protected].
> For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to