200 crash issue

123 views
Skip to first unread message

wburzyns

unread,
Oct 16, 2019, 3:56:20 PM10/16/19
to H2 Database
Hello,

It looks like there is an intermittent bug lurking in 1.4.200. This occured on a freshly created database during data import performed by a higher-level routine (i.e. not a H2's RUNSCRIPT). The progress of the import at the time of crash was around 3.5%:

        email.com.gmail.wburzyns.matdb.storage.StorageCrashedException:
        email.com.gmail.wburzyns.org.h2.jdbc.JdbcSQLNonTransientConnectionException: (Message 90030 not found); SQL statement:
        INSERT INTO MATDB_DATA VALUES(?, ?, ?) [90030-200]

            at email.com.gmail.wburzyns.matdb.storage.MatDbStorage.dataAdd(MatDbStorage.java:1152)

        Caused by: email.com.gmail.wburzyns.org.h2.jdbc.JdbcSQLNonTransientConnectionException: (Message 90030 not found); SQL
        statement:
        INSERT INTO MATDB_DATA VALUES(?, ?, ?) [90030-200]

            at email.com.gmail.wburzyns.org.h2.message.DbException.getJdbcSQLException(DbException.java:622)

            at email.com.gmail.wburzyns.org.h2.message.DbException.getJdbcSQLException(DbException.java:429)

            at email.com.gmail.wburzyns.org.h2.message.DbException.get(DbException.java:194)

            at
            email.com.gmail.wburzyns.org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:222)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVTable.convertException(MVTable.java:714)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:133)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVTable.addRow(MVTable.java:531)

            at email.com.gmail.wburzyns.org.h2.command.dml.Insert.insertRows(Insert.java:195)

            at email.com.gmail.wburzyns.org.h2.command.dml.Insert.update(Insert.java:151)

            at email.com.gmail.wburzyns.org.h2.command.CommandContainer.update(CommandContainer.java:198)

            at email.com.gmail.wburzyns.org.h2.command.Command.executeUpdate(Command.java:251)

            at
            email.com.gmail.wburzyns.org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:191)

            at email.com.gmail.wburzyns.org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:152)

            at email.com.gmail.wburzyns.matdb.storage.MatDbStorage.dataAdd(MatDbStorage.java:1145)

        Caused by: java.lang.IllegalStateException: File corrupted in chunk 1211, expected page length 4..24576, got
        1211773484 [1.4.200/6]

            at email.com.gmail.wburzyns.org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)

            at email.com.gmail.wburzyns.org.h2.mvstore.Chunk.readBufferForPage(Chunk.java:368)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVStore.readBufferForPage(MVStore.java:1214)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVStore.readPage(MVStore.java:2209)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVMap.readPage(MVMap.java:672)

            at email.com.gmail.wburzyns.org.h2.mvstore.Page$NonLeaf.getChildPage(Page.java:1043)

            at email.com.gmail.wburzyns.org.h2.mvstore.CursorPos.traverseDown(CursorPos.java:58)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVMap.operate(MVMap.java:1804)

            at email.com.gmail.wburzyns.org.h2.mvstore.tx.TransactionMap.set(TransactionMap.java:301)

            at email.com.gmail.wburzyns.org.h2.mvstore.tx.TransactionMap.putIfAbsent(TransactionMap.java:238)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:120)

            ... 8 more
           
           
After from-scratch restart on yet-again created database the import died at 80%:

        email.com.gmail.wburzyns.matdb.storage.StorageCrashedException:
        email.com.gmail.wburzyns.org.h2.jdbc.JdbcSQLNonTransientException: (Message 90028 not found); SQL statement:
        INSERT INTO MATDB_DATA VALUES(?, ?, ?) [90028-200]

            at email.com.gmail.wburzyns.matdb.storage.MatDbStorage.dataAdd(MatDbStorage.java:1152)

        Caused by: email.com.gmail.wburzyns.org.h2.jdbc.JdbcSQLNonTransientException: (Message 90028 not found); SQL
        statement:
        INSERT INTO MATDB_DATA VALUES(?, ?, ?) [90028-200]

            at email.com.gmail.wburzyns.org.h2.message.DbException.getJdbcSQLException(DbException.java:505)

            at email.com.gmail.wburzyns.org.h2.message.DbException.getJdbcSQLException(DbException.java:429)

            at email.com.gmail.wburzyns.org.h2.message.DbException.get(DbException.java:194)

            at
            email.com.gmail.wburzyns.org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:210)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVTable.convertException(MVTable.java:714)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:133)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVTable.addRow(MVTable.java:531)

            at email.com.gmail.wburzyns.org.h2.command.dml.Insert.insertRows(Insert.java:195)

            at email.com.gmail.wburzyns.org.h2.command.dml.Insert.update(Insert.java:151)

            at email.com.gmail.wburzyns.org.h2.command.CommandContainer.update(CommandContainer.java:198)

            at email.com.gmail.wburzyns.org.h2.command.Command.executeUpdate(Command.java:251)

            at
            email.com.gmail.wburzyns.org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:191)

            at email.com.gmail.wburzyns.org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:152)

            at email.com.gmail.wburzyns.matdb.storage.MatDbStorage.dataAdd(MatDbStorage.java:1145)

        Caused by: java.lang.IllegalStateException: Reading from file split:30:D:/db/200/storage/matfiles.mv.db
        failed at 6558115483 (length 6558687232), read 0, remaining 524288 [1.4.200/1]

            at email.com.gmail.wburzyns.org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)

            at email.com.gmail.wburzyns.org.h2.mvstore.DataUtils.readFully(DataUtils.java:456)

            at email.com.gmail.wburzyns.org.h2.mvstore.FileStore.readFully(FileStore.java:98)

            at email.com.gmail.wburzyns.org.h2.mvstore.Chunk.readBufferForPage(Chunk.java:361)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVStore.readBufferForPage(MVStore.java:1214)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVStore.readPage(MVStore.java:2209)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVMap.readPage(MVMap.java:672)

            at email.com.gmail.wburzyns.org.h2.mvstore.Page$NonLeaf.getChildPage(Page.java:1043)

            at email.com.gmail.wburzyns.org.h2.mvstore.CursorPos.traverseDown(CursorPos.java:58)

            at email.com.gmail.wburzyns.org.h2.mvstore.MVMap.operate(MVMap.java:1804)

            at email.com.gmail.wburzyns.org.h2.mvstore.tx.TransactionMap.set(TransactionMap.java:301)

            at email.com.gmail.wburzyns.org.h2.mvstore.tx.TransactionMap.putIfAbsent(TransactionMap.java:238)

            at email.com.gmail.wburzyns.org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:120)

            ... 8 more

        Caused by: java.io.EOFException

            at email.com.gmail.wburzyns.org.h2.mvstore.DataUtils.readFully(DataUtils.java:444)

            ... 19 more


Apart from the above all my storage-related tests (~150) with 1.4.200 passed multiple times, so these crashes are somewhat suprising.

Filesystem is local NTFS, database is embedded and hence accessed by a single process, H2 URL is "jdbc:h2:split:...;COMPRESS=TRUE;SCOPE_GENERATED_KEYS=TRUE;CACHE_SIZE=131072;MAX_MEMORY_UNDO=100000;MAX_OPERATION_MEMORY=10485760".

Noel Grandin

unread,
Oct 17, 2019, 4:37:06 AM10/17/19
to h2-da...@googlegroups.com

Hi

Would you mind trying without split? Just to try and isolate the component at fault.

Thanks.

wburzyns

unread,
Oct 20, 2019, 3:05:33 PM10/20/19
to H2 Database
I'll give it a try but I don't think that the split filesystem is the culprit here - exactly the same code that crashes with 200 works perfectly OK with 199.

Andrei Tokar

unread,
Oct 20, 2019, 4:18:05 PM10/20/19
to H2 Database
Knowing the changes that went into 1.4.200, let me disagree.
I suspect that split might be exactly the culprit here, another one might be a compression.

wburzyns

unread,
Oct 21, 2019, 2:43:20 PM10/21/19
to H2 Database
It looks like you guys are correct. With "split:" removed from the DB URL I was unable to reproduce the crash.

Interesting observation is that one of the crashes that occurred previously happened when the total DB size was way below the size limit for single file, i.e. there was only one block (".part" files not yet present). This led me to believe that the Split File System is not the culprit.

Reply all
Reply to author
Forward
0 new messages