Re: [h2] Moving from H2 1.3.176 to 1.4.187 results in sporadic ArrayIndexOutOfBoundsExceptions?
Hi Thomas, The default page size is 4096 bytes, did you set it manually to 2048 bytes? No, I didn't change it. Do note, that the databases were created with 1.3.176 and the crashes happened with 1.4.187. I've reverted to 1.3.176. That stopped the crashes almost immediately, although we are still getting a few. These newer crash messages refer to 4096 bytes. eg: Caused by: java.lang.ArrayIndexOutOfBoundsException: 4096 at org.h2.store.Data.writeVarInt(Data.java:1187) at org.h2.store.Data.writeValue(Data.java:531) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:394) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:454) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:427) at org.h2.store.PageStore.writeBack(PageStore.java:1047) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:216) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:142) at org.h2.util.CacheLRU.put(CacheLRU.java:116) On Saturday, 9 May 2015 02:12:07 UTC+10, Thomas Mueller wrote: Hi, I don't know what the problem could be. There were no changes in this area. What is strange is: The exception says it is trying to read past the end of a page that is 2048 bytes long. The default page size is 4096 bytes, did you set it manually to 2048 bytes? According to the database URL it doesn't look like. Regards, Thomas On Wednesday, May 6, 2015, Steve McLeod steve@gmail.com javascript: wrote: Today I released an update for my product, Poker Copilot. Until today, it used H2 1.3.176. Today's update uses H2 1.4.187, with MV_STORE=false appended to the database URL. After today's update, we are getting many H2 crash reports on both Windows and OS X. Poker Copilot is a mature product that has been using H2 for six years, and is used by many people each day; until this release we were getting infrequent crash reports. It does initially look like this is a sporadic H2 problem, although I am, of course, open to the idea that it is caused by my own programming mistakes. On OS X, the database URL is jdbc:h2:/Users/steve/Library/Application Support/com.barbarysoftware.pokercopilot/database/pokercopilot;DATABASE_EVENT_LISTENER='com.barbarysoftware.pokercopilot.database.DatabaseListener';COMPRESS_LOB=DEFLATE;MV_STORE=false;CACHE_SIZE=65536 The most common crash reports are variants of: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.writeVarLong(Data.java:1254) at org.h2.store.Data.writeValue(Data.java:523) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:393) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:453) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:426) at org.h2.store.PageStore.writeBack(PageStore.java:1046) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:215) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:141) at org.h2.util.CacheLRU.put(CacheLRU.java:115) at org.h2.store.PageStore.getPage(PageStore.java:857) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:233) at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:279) at org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex. java:426) at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:415) at org.h2.table.RegularTable.getRow(RegularTable.java:106) at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:301) at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45) at org.h2.index.IndexCursor.get(IndexCursor.java:260) at org.h2.table.TableFilter.getValue(TableFilter.java:913) at org.h2.expression.ExpressionColumn.getValue( ExpressionColumn.java:186) at org.h2.command.dml.Select.queryFlat(Select.java:580) at org.h2.command.dml.Select.queryWithoutCache(Select.java:685) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.Query.query(Query.java:36) at org.h2.command.CommandContainer.query( CommandContainer.java:90) at org.h2.command.Command.executeQuery(Command.java:197) ... 18 more and Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.writeStringWithoutLength(Data.java:263) at org.h2.store.Data.writeValue(Data.java:566) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:393) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:453) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:426) at org.h2.store.PageStore.writeBack(PageStore.java:1046) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:215) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:141) at org.h2.util.CacheLRU.put(CacheLRU.java:115)
Re: [h2] Moving from H2 1.3.176 to 1.4.187 results in sporadic ArrayIndexOutOfBoundsExceptions?
Hi, I don't know what the problem could be. There were no changes in this area. What is strange is: The exception says it is trying to read past the end of a page that is 2048 bytes long. The default page size is 4096 bytes, did you set it manually to 2048 bytes? According to the database URL it doesn't look like. Regards, Thomas On Wednesday, May 6, 2015, Steve McLeod steve.mcl...@gmail.com wrote: Today I released an update for my product, Poker Copilot. Until today, it used H2 1.3.176. Today's update uses H2 1.4.187, with MV_STORE=false appended to the database URL. After today's update, we are getting many H2 crash reports on both Windows and OS X. Poker Copilot is a mature product that has been using H2 for six years, and is used by many people each day; until this release we were getting infrequent crash reports. It does initially look like this is a sporadic H2 problem, although I am, of course, open to the idea that it is caused by my own programming mistakes. On OS X, the database URL is jdbc:h2:/Users/steve/Library/Application Support/com.barbarysoftware.pokercopilot/database/pokercopilot;DATABASE_EVENT_LISTENER='com.barbarysoftware.pokercopilot.database.DatabaseListener';COMPRESS_LOB=DEFLATE;MV_STORE=false;CACHE_SIZE=65536 The most common crash reports are variants of: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.writeVarLong(Data.java:1254) at org.h2.store.Data.writeValue(Data.java:523) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:393) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:453) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:426) at org.h2.store.PageStore.writeBack(PageStore.java:1046) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:215) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:141) at org.h2.util.CacheLRU.put(CacheLRU.java:115) at org.h2.store.PageStore.getPage(PageStore.java:857) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:233) at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:279) at org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex. java:426) at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:415) at org.h2.table.RegularTable.getRow(RegularTable.java:106) at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:301) at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45) at org.h2.index.IndexCursor.get(IndexCursor.java:260) at org.h2.table.TableFilter.getValue(TableFilter.java:913) at org.h2.expression.ExpressionColumn.getValue( ExpressionColumn.java:186) at org.h2.command.dml.Select.queryFlat(Select.java:580) at org.h2.command.dml.Select.queryWithoutCache(Select.java:685) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.Query.query(Query.java:36) at org.h2.command.CommandContainer.query(CommandContainer.java:90) at org.h2.command.Command.executeQuery(Command.java:197) ... 18 more and Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.writeStringWithoutLength(Data.java:263) at org.h2.store.Data.writeValue(Data.java:566) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:393) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:453) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:426) at org.h2.store.PageStore.writeBack(PageStore.java:1046) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:215) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:141) at org.h2.util.CacheLRU.put(CacheLRU.java:115) at org.h2.store.PageStore.getPage(PageStore.java:857) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:233) at org.h2.index.PageDataIndex.find(PageDataIndex.java:283) at org.h2.index.BaseIndex.find(BaseIndex.java:127) at org.h2.index.IndexCursor.find(IndexCursor.java:159) at org.h2.table.TableFilter.next(TableFilter.java:329) at org.h2.command.dml.Select.queryFlat(Select.java:573) at org.h2.command.dml.Select.queryWithoutCache(Select.java:685) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.Query.query(Query.java:36) at org.h2.command.CommandContainer.query(CommandContainer.java:90) at org.h2.command.Command.executeQuery(Command.java:197) ... 18 more and org.h2.jdbc.JdbcSQLException: General error: java.lang. ArrayIndexOutOfBoundsException; SQL statement: SET CACHE_SIZE 65536 [5-187] at org.h2.message.DbException.getJdbcSQLException( DbException.java:345) at
[h2] Moving from H2 1.3.176 to 1.4.187 results in sporadic ArrayIndexOutOfBoundsExceptions?
Today I released an update for my product, Poker Copilot. Until today, it used H2 1.3.176. Today's update uses H2 1.4.187, with MV_STORE=false appended to the database URL. After today's update, we are getting many H2 crash reports on both Windows and OS X. Poker Copilot is a mature product that has been using H2 for six years, and is used by many people each day; until this release we were getting infrequent crash reports. It does initially look like this is a sporadic H2 problem, although I am, of course, open to the idea that it is caused by my own programming mistakes. On OS X, the database URL is jdbc:h2:/Users/steve/Library/Application Support/com.barbarysoftware.pokercopilot/database/pokercopilot;DATABASE_EVENT_LISTENER='com.barbarysoftware.pokercopilot.database.DatabaseListener';COMPRESS_LOB=DEFLATE;MV_STORE=false;CACHE_SIZE=65536 The most common crash reports are variants of: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.writeVarLong(Data.java:1254) at org.h2.store.Data.writeValue(Data.java:523) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:393) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:453) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:426) at org.h2.store.PageStore.writeBack(PageStore.java:1046) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:215) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:141) at org.h2.util.CacheLRU.put(CacheLRU.java:115) at org.h2.store.PageStore.getPage(PageStore.java:857) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:233) at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:279) at org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex.java:426) at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:415) at org.h2.table.RegularTable.getRow(RegularTable.java:106) at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:301) at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45) at org.h2.index.IndexCursor.get(IndexCursor.java:260) at org.h2.table.TableFilter.getValue(TableFilter.java:913) at org.h2.expression.ExpressionColumn.getValue( ExpressionColumn.java:186) at org.h2.command.dml.Select.queryFlat(Select.java:580) at org.h2.command.dml.Select.queryWithoutCache(Select.java:685) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.Query.query(Query.java:36) at org.h2.command.CommandContainer.query(CommandContainer.java:90) at org.h2.command.Command.executeQuery(Command.java:197) ... 18 more and Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.writeStringWithoutLength(Data.java:263) at org.h2.store.Data.writeValue(Data.java:566) at org.h2.index.PageBtreeIndex.writeRow(PageBtreeIndex.java:393) at org.h2.index.PageBtreeNode.writeData(PageBtreeNode.java:453) at org.h2.index.PageBtreeNode.write(PageBtreeNode.java:426) at org.h2.store.PageStore.writeBack(PageStore.java:1046) at org.h2.util.CacheLRU.removeOld(CacheLRU.java:215) at org.h2.util.CacheLRU.removeOldIfRequired(CacheLRU.java:141) at org.h2.util.CacheLRU.put(CacheLRU.java:115) at org.h2.store.PageStore.getPage(PageStore.java:857) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:233) at org.h2.index.PageDataIndex.find(PageDataIndex.java:283) at org.h2.index.BaseIndex.find(BaseIndex.java:127) at org.h2.index.IndexCursor.find(IndexCursor.java:159) at org.h2.table.TableFilter.next(TableFilter.java:329) at org.h2.command.dml.Select.queryFlat(Select.java:573) at org.h2.command.dml.Select.queryWithoutCache(Select.java:685) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.Query.query(Query.java:36) at org.h2.command.CommandContainer.query(CommandContainer.java:90) at org.h2.command.Command.executeQuery(Command.java:197) ... 18 more and org.h2.jdbc.JdbcSQLException: General error: java.lang. ArrayIndexOutOfBoundsException; SQL statement: SET CACHE_SIZE 65536 [5-187] at org.h2.message.DbException.getJdbcSQLException( DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.convert(DbException.java:295) at org.h2.command.Command.executeUpdate(Command.java:262) at org.h2.engine.Engine.openSession(Engine.java:196) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145) at org.h2.engine.Engine.createSession(Engine.java:128) at org.h2.engine.Engine.createSession(Engine.java:26) at