Hi,

I put MVCC + Multithreaded into production with the latest version.
Out of around 11.000 images (type BINARY) about 7.500 got corrupted
giving me exceptions like

org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: org.h2.message.DbException: IO Exception: ""java.io.IOException: Block not found in id [1, -29, -17, 7, -90, 81] [1.4.187/50]"" [90028-186]"; "lob: null table: -3 id: 119466" [90031-186]

So I used the recover tool to recover the corrupted database.
Recover tool gave me error line for every problematic image like this:

Error: java.io.IOException: Block not found in id [1, -80, -118, 7, -124, 91] [1.4.187/50] Error: java.io.IOException: Block not found in id [1, -50, -71, 7, -123, 91] [1.4.187/50] Error: java.io.IOException: Block not found in id [1, -72, -118, 6, -122, 91] [1.4.187/50]

So from an older database version I manually updated those images that had become empty.
All went fine except one to which I was not able to write anything.
It gave me the error

org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: org.h2.message.DbException: IO Exception: ""java.io.IOException: java.nio.BufferUnderflowException"" [90028-186]"; "lob: null table: -3 id: 21742" [90031-186]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:168)
    at org.h2.message.DbException.convertIOException(DbException.java:330)
    at org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:328)
    at org.h2.value.ValueLobDb.getBytes(ValueLobDb.java:312)
    at org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:1054)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at bsh.Reflect.invokeMethod(Unknown Source)
    at bsh.Reflect.invokeObjectMethod(Unknown Source)
    at bsh.Name.invokeMethod(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHArguments.getArguments(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHBlock.evalBlock(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHIfStatement.eval(Unknown Source)
    at bsh.BSHBlock.evalBlock(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHWhileStatement.eval(Unknown Source)
    at bsh.BSHBlock.evalBlock(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHTryStatement.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.source(Unknown Source)
    at bsh.Interpreter.main(Unknown Source)
Caused by: java.io.IOException: org.h2.message.DbException: IO Exception: "java.io.IOException: java.nio.BufferUnderflowException" [90028-186] at org.h2.message.DbException.convertToIOException(DbException.java:364) at org.h2.store.LobStorageRemoteInputStream.read(LobStorageRemoteInputStream.java:73)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    at org.h2.util.IOUtils.copy(IOUtils.java:167)
    at org.h2.util.IOUtils.readBytesAndClose(IOUtils.java:282)
    at org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:326)
    ... 30 more
Caused by: org.h2.message.DbException: IO Exception: "java.io.IOException: java.nio.BufferUnderflowException" [90028-186]
    at org.h2.message.DbException.convert(DbException.java:283)
    at org.h2.engine.SessionRemote.done(SessionRemote.java:629)
    at org.h2.engine.SessionRemote.readLob(SessionRemote.java:779)
at org.h2.store.LobStorageRemoteInputStream.read(LobStorageRemoteInputStream.java:71)
    ... 36 more
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.IOException: java.nio.BufferUnderflowException" [90028-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:287)
    at org.h2.server.TcpServerThread.sendError(TcpServerThread.java:221)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:161)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.nio.BufferUnderflowException
at org.h2.message.DbException.convertToIOException(DbException.java:364)
    at org.h2.util.IOUtils.readFully(IOUtils.java:338)
    at org.h2.server.TcpServerThread.process(TcpServerThread.java:462)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:159)
    ... 1 more
Caused by: java.nio.BufferUnderflowException
    at java.nio.Buffer.nextGetIndex(Buffer.java:498)
    at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:304)
    at org.h2.mvstore.Page.read(Page.java:648)
    at org.h2.mvstore.Page.read(Page.java:196)
    at org.h2.mvstore.MVStore.readPage(MVStore.java:1843)
    at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
    at org.h2.mvstore.Page.getChildPage(Page.java:218)
    at org.h2.mvstore.MVMap.binarySearch(MVMap.java:468)
    at org.h2.mvstore.MVMap.binarySearch(MVMap.java:469)
    at org.h2.mvstore.MVMap.binarySearch(MVMap.java:469)
    at org.h2.mvstore.MVMap.get(MVMap.java:450)
    at org.h2.mvstore.StreamStore.getBlock(StreamStore.java:386)
    at org.h2.mvstore.StreamStore$Stream.nextBuffer(StreamStore.java:503)
    at org.h2.mvstore.StreamStore$Stream.read(StreamStore.java:460)
    at java.io.FilterInputStream.read(FilterInputStream.java:133)
at org.h2.server.TcpServerThread$CachedInputStream.read(TcpServerThread.java:551)
    at org.h2.util.IOUtils.readFully(IOUtils.java:329)
    ... 3 more
    at org.h2.engine.SessionRemote.done(SessionRemote.java:622)
    ... 38 more

I hope this could be helpful in ironing out the bugs.

- Rami

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to