Hi Thomas,

I'm experiencing the same problem, hope its not a problem to share it
here in this thread.
I'm using H2 as the backend for Eclipse's CDO framework (http://
www.eclipse.org/cdo/).
Our application executes a proccess that lasts around 8 hours, making
frequent big commits.
The database size after the process finishes is around 2 Gb, and close
to the end of the process this problem manifests:

Caused by: org.h2.jdbc.JdbcSQLException: Archivo corrupto mientras se
leía el registro: "wrong checksum". Solución Posible: use la
herramienta de recuperación (recovery tool)
File corrupted while reading record: "wrong checksum". Possible
solution: use the recovery tool; SQL statement:
COMMIT [90030-132]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:
316)
        at org.h2.message.DbException.get(DbException.java:167)
        at org.h2.message.DbException.get(DbException.java:144)
        at org.h2.store.PageStore.getPage(PageStore.java:494)
        at org.h2.index.PageBtreeIndex.getPage(PageBtreeIndex.java:139)
        at org.h2.index.PageBtreeIndex.writeRowCount(PageBtreeIndex.java:414)
        at org.h2.store.PageStore.writeIndexRowCounts(PageStore.java:316)
        at org.h2.store.PageStore.checkpoint(PageStore.java:339)
        at org.h2.store.PageStore.commit(PageStore.java:1116)
        at org.h2.engine.Database.commit(Database.java:1680)
        at org.h2.engine.Session.commit(Session.java:448)
        at
org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:
120)
        at org.h2.command.CommandContainer.update(CommandContainer.java:70)
        at org.h2.command.Command.executeUpdate(Command.java:198)
        at org.h2.jdbc.JdbcConnection.commit(JdbcConnection.java:415)
        at
org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.commit(DBStoreAccessor.java:
407)
        ... 17 more

>From the stack trace I can see it happens due to inconsistent indices.
Is it possible to reconstruct index data somehow?

- How many connections does your application use concurrently? At
most, one connection writing and 1 or 2 reading.
- Do you use temporary tables? no
- Did you use LOG=0 or LOG=1? used log=2, I believe
- With which version of H2 was this database created? I dont have
access now to my office's computer, but I think it was 1.2.13x
- Did the application run out of memory (once, or multiple times)? No,
I using a Windows 64 bits, 12 gb ram, the JVM instace has -xmx 6GB
- Do you use any settings or special features: I used to use LRU soft
cache, but removed it due to the error, but it keeps happening
- Do you use any H2-specific system properties? no
- Is the application multi-threaded? yes
- What operating system, file system, and virtual machine
    (java -version) do you use? Windows 7 64 bit, JRE 1.6.22, the
database is running on a 64 GB SSD hard disk using NTFS.
- How did you start the Java process (java -Xmx... and so on)? cant
say now which are the exact ones, but the most relevant are permsize
256mb and xmx = 6gb
- Is it (or was it at some point) a networked file system? no
- How big is the database (file sizes)? more than 2 gb, and there is a
single table with several millions of rows
- How much heap memory does the Java process have? 6gb. The database
process runs within an eclipse application. I set 1500000kb of cache
to h2, and the rest is for the cdo server cache.
- Is the database usually closed normally, or is process terminated
    forcefully or the computer switched off? Good question :P I'll
should check that. Any way, the problem happens in a freshly created
database that hasn't been closed. In fact the problem happens in a
fresh H2 database instance receiving commits during 8 hours. at some
point the database gets corrupted.
- Is it possible to reproduce this problem using a fresh database
    (sometimes, or always)? Well, yeah, using our app, while reading
data from the DB at some point the exception comes out.
- Are there any other exceptions (maybe in the .trace.db file)?
    Could you send them please? I'll check that on monday and send it
here.
- Do you still have any .trace.db files, and if yes could you send
them? unfortunatelly, it contains confidential information :(
- Could you send the .h2.db file where this exception occurs?
unfortunatelly, not :(

As a side note, using the recovery tool doesn't work either, the SQL
file also contains the exception serialized!
I'll try to get some more information on monday and post it here.

Cheers
ViK

-- 
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